----- Original Message ----- From: Felipe Contreras <felipe.contreras@xxxxxxxxx> >>On Fri, Jun 6, 2014 at 4:58 AM, <zhdxzx@xxxxxxxx> wrote: >> Alternatively can we try wait_iff_congested(zone, BLK_RW_ASYNC, HZ/10) ? >> > I see the same problem with that code. > The comments around the congestion_wait, [1] * * Once a zone is flagged ZONE_WRITEBACK, kswapd will count the number * of pages under pages flagged for immediate reclaim and stall if any * are encountered in the nr_immediate check below. */ if (nr_writeback && nr_writeback == nr_taken) zone_set_flag(zone, ZONE_WRITEBACK); [2] /* * If dirty pages are scanned that are not queued for IO, it * implies that flushers are not keeping up. In this case, flag * the zone ZONE_TAIL_LRU_DIRTY and kswapd will start writing * pages from reclaim context. It will forcibly stall in the * next check. */ if (nr_unqueued_dirty == nr_taken) zone_set_flag(zone, ZONE_TAIL_LRU_DIRTY); The "force stall" in [2] conflicts with "start writing pages" in [2], and conflicts with "nr_immediate check below" in [1] as well, IIUC. Would you please try again based only on comment [1](based on v3.15-rc8)? thanks Hillf --- a/mm/vmscan.c Sat Jun 7 18:38:08 2014 +++ b/mm/vmscan.c Sat Jun 7 20:08:36 2014 @@ -1566,7 +1566,7 @@ shrink_inactive_list(unsigned long nr_to * implies that pages are cycling through the LRU faster than * they are written so also forcibly stall. */ - if (nr_unqueued_dirty == nr_taken || nr_immediate) + if (nr_immediate) congestion_wait(BLK_RW_ASYNC, HZ/10); } --?韬{.n?壏?檩jg??a旃??迻)钋?韰骅w+h櫒璀?y/i?⒏?婃⒎?湼Щ烚m???)钋?痂燐^櫒?觥櫒ザ?v夗﨣趓O璁?f?i?⒏?