2009-07-08 20:03:38

by Mitchell Erblich

[permalink] [raw]
Subject: Simple Code change suggestion : pdflush() : clean pages in 1/2 time

Group,

pdflush threads clean dirty pages.

Under the past simple assumption that a greater number of
page daemon threads will have the TENDENCY to clean
the pages faster.

A simple change is to create 2x the number of threads
within the same timeframe as before.

Thus, in mm/pdflush.c _pdflush() thread creation is done
in 1/2 HZ. ( "/" or ">>" , compiler will optimize)
Above 1 sec omment should also be changed.

IMO, We could do in 1/4 or 1/8 HZ, but load (backlog of dirty
pages)
should then be tracked and watermarks set and determine whether
keep adding additional threads allows us to clean the pages faster.
(Yes, did that / done that and the code is/was ... too complicated)

The 2nd part is to prevent thread creation / destruction thrashing,
keep around the extra threads to handle the bursts of frees so HZ
is still kept to limit exit rate.

Mitchell Erblich