mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-04 04:02:26 +00:00
mm: fix shrink nr.unqueued_dirty counter issue
It is needed to ensure sc->nr.unqueued_dirty > 0, which can avoid setting PGDAT_DIRTY flag when sc->nr.unqueued_dirty and sc->nr.file_taken are both zero. Link: https://lkml.kernel.org/r/20240112012353.1387-1-justinjiang@vivo.com Signed-off-by: Zhiguo Jiang <justinjiang@vivo.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
This commit is contained in:
parent
5059aa6334
commit
bbc251f30e
@ -5990,7 +5990,8 @@ static void shrink_node(pg_data_t *pgdat, struct scan_control *sc)
|
||||
set_bit(PGDAT_WRITEBACK, &pgdat->flags);
|
||||
|
||||
/* Allow kswapd to start writing pages during reclaim.*/
|
||||
if (sc->nr.unqueued_dirty == sc->nr.file_taken)
|
||||
if (sc->nr.unqueued_dirty &&
|
||||
sc->nr.unqueued_dirty == sc->nr.file_taken)
|
||||
set_bit(PGDAT_DIRTY, &pgdat->flags);
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user