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

From: Theodore Tso
Date: Thu Nov 18 2010 - 05:43:20 EST



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


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