lkml.org 
[lkml]   [2000]   [Oct]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: sys_mlock/sys_munlock
On  6 Oct 00 at 17:45, Atul Mukker. wrote:
> Hi,
> Can i use sys_mlock and sys_munlock in my driver module to lock/unlock the
> user address pages.
>
> Thanks
>
> P.S. Please mark your mail CC to atulm@ami.com

VMware's vmmon and in-kernel raw devices (and kiobufs) use simple
incrementing/decrementing page count - first cause pagein (vmmon uses
get_user(), kiobufs something more sophisticated), then use get_page
on that page. To release, use put_page().

But do not forget to look at my today's report about page->mapping == NULL...
If you'll do it with shared-mapped pages, and someone truncates file
they are mapped from, bad things can happen under 2.4.0 :-(
Best regards,
Petr Vandrovec
vandrove@vc.cvut.cz

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 12:39    [W:0.021 / U:53.480 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site