mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Carsten Otte" <cotte.de@gmail.com>
To: "Martin Drab" <drab@kepler.fjfi.cvut.cz>
Cc: hugh@veritas.com,
	"Linux Kernel Mailing List" <linux-kernel@vger.kernel.org>
Subject: Re: Question about memory mapping mechanism
Date: Thu, 8 Mar 2007 15:20:02 +0100	[thread overview]
Message-ID: <5c77e7070703080620i3e2a3a64sf9d3121e4f6d382a@mail.gmail.com> (raw)
In-Reply-To: <Pine.LNX.4.64.0703081345010.21317@kepler.fjfi.cvut.cz>

On 3/8/07, Martin Drab <drab@kepler.fjfi.cvut.cz> wrote:
> The thing is that I'd like to prevent kernel to swap these pages out,
> because then I may loose some data when they are not available in time
> for the next round.

One think you could do is grab a reference to the pages upfront. When
you stop pushing data out to the userspace, or at least when the file
is released, you need to drop that reference again. You could even do
a kmap_atomic(), which would give you a kernel space mapping. That
way, you avoid copy_to_user for that data.
I am not sure if that's the "proper way", just my $0.02 how I would
try to solve it.

Carsten

  reply	other threads:[~2007-03-08 14:20 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-08 13:16 Martin Drab
2007-03-08 14:20 ` Carsten Otte [this message]
     [not found] ` <5c77e7070703080617r63cbccfevd2c6d678f16c2b03@mail.gmail.com>
2007-03-08 21:36   ` Martin Drab
2007-03-09  0:07     ` Martin Drab
2007-03-09  1:31       ` Martin Drab
2007-03-13 20:49         ` Hugh Dickins
2007-05-21 18:39           ` Martin Drab
2007-05-29 17:58             ` Hugh Dickins
2007-03-08 23:21 ` Martin Drab
2007-03-09  0:27 ` Jeremy Fitzhardinge
2007-03-09  0:38   ` Martin Drab
     [not found] <fa.8Fy6n0Le4Y2mDfeEy936/5bbJHA@ifi.uio.no>
2007-03-09  0:35 ` Robert Hancock
2007-03-09  0:52   ` Martin Drab

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5c77e7070703080620i3e2a3a64sf9d3121e4f6d382a@mail.gmail.com \
    --to=cotte.de@gmail.com \
    --cc=drab@kepler.fjfi.cvut.cz \
    --cc=hugh@veritas.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®