Re: [PATCH] mm/vmscan: wake up flushers conditionally to avoid cgroup OOM

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 29 Aug 2024 18:25:43 +0800 Jingxiang Zeng <jingxiangzeng.cas@xxxxxxxxx> wrote:
> 
> @@ -4919,6 +4920,14 @@ static void lru_gen_shrink_lruvec(struct lruvec *lruvec, struct scan_control *sc
>  	if (try_to_shrink_lruvec(lruvec, sc))
>  		lru_gen_rotate_memcg(lruvec, MEMCG_LRU_YOUNG);
> 
> +	/*
> +	 * If too many pages failed to evict due to page being dirty,
> +	 * memory pressure have pushed dirty pages to oldest gen,
> +	 * wake up flusher.
> +	 */
> +	if (sc->nr.unqueued_dirty >= sc->nr.taken)
> +		wakeup_flusher_threads(WB_REASON_VMSCAN);
> +

Because a) the right domain to processe dirty pages is writeback and b) flusher
runs independent of page reclaimer that has nothing to do with WB_REASON_SYNC,
feel free to erase WB_REASON_VMSCAN instead of adding it once more.




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux