lkml.org 
[lkml]   [2010]   [Nov]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 3/3] mlock: avoid dirtying pages and triggering writeback
On Thu, Nov 18, 2010 at 10:11:43AM +1100, Dave Chinner wrote:
> I don't think ->page_mkwrite can be worked around - we need that to
> be called on the first write fault of any mmap()d page to ensure it
> is set up correctly for writeback. If we don't get write faults
> after the page is mlock()d, then we need the ->page_mkwrite() call
> during the mlock() call.

OK, so I'm not an mm hacker, so maybe I'm missing something. Could
part of this be fixed by simply sending the write faults for
mlock()'ed pages, so page_mkwrite() gets called when the page is
dirtied. Seems like a real waste to have the file system pre-allocate
all of the blocks for a mlock()'ed region. Why does mlock() have to
result in the write faults getting suppressed when the page is
actually dirtied?

- Ted


\
 
 \ /
  Last update: 2010-11-18 00:55    [W:0.131 / U:0.180 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site