mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Ross Dickson <ross@datscreative.com.au>
To: libor@topspin.com
Cc: linux-kernel@vger.kernel.org, manfred@colorfullife.com
Subject: Re: locking user space memory in kernel
Date: Thu, 8 Apr 2004 16:20:11 +1000	[thread overview]
Message-ID: <200404081620.11051.ross@datscreative.com.au> (raw)

Libor Michalek wrote: 
 
>----- Forwarded message from Manfred Spraul <manfred@colorfullife.com> ----- 
 > 
 > 
 >>Date: Sun, 21 Mar 2004 12:31:59 +0100 
 >>From: Manfred Spraul <manfred@colorfullife.com> 
 >>To: Eli Cohen <mlxk@mellanox.co.il> 
 >>Cc: linux-kernel@vger.kernel.org 
 >>Subject: Re: locking user space memory in kernel 
 >> 
 >>Hi Eli, 
 >> 
 >>I think just get_user_pages() should be sufficient: the pages won't be 
 >>swapped out. You don't need to set VM_LOCKED in vma->vm_flags to prevent 
 >>the swap out. In the worst case, the pte is cleared a that will cause a 
 >>soft page fault, but the physical address won't change. Multiple 
 >>get_user_pages() calls on overlapping regions are ok, the page count is 
 >>an atomic_t, at least 24-bit large. 
 >> 
 >> 
 > 
 > The soft page fault is a problem if the device is going to write data 
 >into the buffer and then notify the user that the buffer now contains 
 >valid data. If the soft page fault occurs before the device has written 
 >to the page list, once the user is notified of the write and reads the 
 >buffer, it will no longer be the same pages as the ones to which the 
 >device wrote. 
 > 

I know of an open source driver for image acquisition cards iti-fg that does
"PAGEWISE transfer of image frames directly into user space". The
release notes mention the memory locking.

It is available here
http://oss.gom.com/

Regards
Ross.


             reply	other threads:[~2004-04-08  6:17 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-04-08  6:20 Ross Dickson [this message]
  -- strict thread matches above, loose matches on Subject: below --
2004-04-08  0:45 Libor Michalek
2004-04-08  5:22 ` Manfred Spraul
2004-03-21 11:31 Manfred Spraul
2004-03-21 14:12 ` Manfred Spraul
2004-03-21 16:40 ` Roland Dreier
2004-03-21 17:15   ` Manfred Spraul
2004-03-21 18:18     ` Roland Dreier
2004-03-22 13:15       ` Eli Cohen
2004-03-22 15:22       ` Eli Cohen
2004-03-22 19:34         ` Manfred Spraul
2004-03-21 11:18 Eli Cohen
2004-03-21 11:35 ` Arjan van de Ven

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=200404081620.11051.ross@datscreative.com.au \
    --to=ross@datscreative.com.au \
    --cc=libor@topspin.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=manfred@colorfullife.com \
    /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

Powered by JetHome