On Sun, 21 Oct 2007 23:19:41 +0300 Artem Bityutskiy <Artem.Bityutskiy@nokia.com> wrote:
Yeah, I was just thinking that as I read this ;)
We could just skip locked pages altogether in writeback. Perhaps in
WB_SYNC_NONE mode, or perhaps add a new flag in writeback_control to select
this behaviour.
It _should_ be the case that the number of locked-and-dirty pages which
writeback encounters is very small, so skipping locked pages during
writeback-for-memory-flushing won't have any significant effect. The first
step should be to add a new /proc/vmstat field to count these pages and
then do broad testing (especially on blocksize<pagesize filesystems) to
confirm the theory.
We'll still need to synchronously lock the page in
writeback-for-data-integrity mode though.
-