Re: [PATCH 3/3] mlock: avoid dirtying pages and triggering writeback

Theodore Tso
2010-11-18T10:43:17Z

On Nov 18, 2010, at 12:46 AM, Nick Piggin wrote:

> The right way to fix this would not be to introduce the new regression
> but either/both: a specific syscall to mlock-for-read which does not do
> any reservations, fix filesystem hook to allow reservation without
> implying dirtying. A simple flag to page_mkwrite will be enough (plus
> the logic to call it from VM).

Why is it at all important that mlock() force block allocation for sparse blocks? It's not at all specified in the mlock() API definition that it does that.

Are there really programs that assume that mlock() == fallocate()?!?

-- Ted