Messages in this thread | | | Date | Tue, 19 Mar 2013 10:57:48 +0000 | From | Mel Gorman <> | Subject | Re: [PATCH 07/10] mm: vmscan: Block kswapd if it is encountering pages under writeback |
| |
On Mon, Mar 18, 2013 at 07:37:42PM +0800, Simon Jeons wrote: > On 03/17/2013 09:04 PM, Mel Gorman wrote: > >Historically, kswapd used to congestion_wait() at higher priorities if it > >was not making forward progress. This made no sense as the failure to make > >progress could be completely independent of IO. It was later replaced by > >wait_iff_congested() and removed entirely by commit 258401a6 (mm: don't > >wait on congested zones in balance_pgdat()) as it was duplicating logic > >in shrink_inactive_list(). > > > >This is problematic. If kswapd encounters many pages under writeback and > >it continues to scan until it reaches the high watermark then it will > >quickly skip over the pages under writeback and reclaim clean young > >pages or push applications out to swap. > > > >The use of wait_iff_congested() is not suited to kswapd as it will only > >stall if the underlying BDI is really congested or a direct reclaimer was > >unable to write to the underlying BDI. kswapd bypasses the BDI congestion > >as it sets PF_SWAPWRITE but even if this was taken into account then it > > Where will check this flag? >
may_write_to_queue
-- Mel Gorman SUSE Labs
| |