Re: [PATCH] kswapd should only wait on IO if there is IO

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Andrew Morton <akpm@...>
Cc: <linux-kernel@...>, <linux-mm@...>
Date: Thursday, September 27, 2007 - 6:13 pm

On Thu, 27 Sep 2007 14:47:02 -0700
Andrew Morton <akpm@linux-foundation.org> wrote:


Kswapd was no longer sitting in "D" state as often and pages got
freed more promptly.  The test was done on a RHEL kernel with
this change though - I guess I should redo it with a current upstream
kernel.


If the number of pages undergoing IO is really small, waiting
for them may be a waste of time.

Maybe my thinking is wrong, not sure...


Actually, nr_io_pages is also incremented when we run into pages that
are already PageWriteback - even if we did not start the IO ourselves.


It is incrementing sc.nr_io_pages and will wait on IO to complete if
the amount of pages in flight to disk that it scanned over is larger
than the number of pages that it is trying to free.


Good question.  Note that the throttling-but-not-writing window in
the current code is 0.0->1.5, so this patch does reduce the throttling
window compared to the current code.

What is the reason that the current code does IO throttling even if
there is no IO at all in flight?


I'll add a description for the sc.nr_io_pages > sc.swap_cluster_max
test.


Nope, sc.nr_io_pages will also be incremented when the code runs into
pages that are already PageWriteback.

 
-- 
"Debugging is twice as hard as writing the code in the first place.
Therefore, if you write the code as cleverly as possible, you are,
by definition, not smart enough to debug it." - Brian W. Kernighan
-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] kswapd should only wait on IO if there is IO, Rik van Riel, (Thu Sep 27, 5:08 pm)
Re: [PATCH] kswapd should only wait on IO if there is IO, Andrew Morton, (Thu Sep 27, 5:47 pm)
Re: [PATCH] kswapd should only wait on IO if there is IO, Rik van Riel, (Thu Sep 27, 6:13 pm)
Re: [PATCH] kswapd should only wait on IO if there is IO, Andrew Morton, (Thu Sep 27, 6:21 pm)
Re: [PATCH] kswapd should only wait on IO if there is IO, Andrew Morton, (Thu Sep 27, 6:59 pm)