From: Hillf Danton <hdanton@sina.com>
To: Jingxiang Zeng <linuszeng@tencent.com>
Cc: Jingxiang Zeng <jingxiangzeng.cas@gmail.com>,
linux-mm@kvack.org, Yu Zhao <yuzhao@google.com>,
Kairui Song <kasong@tencent.com>,
Matthew Wilcox <willy@infradead.org>,
Michal Hocko <mhocko@suse.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mm/vmscan: wake up flushers conditionally to avoid cgroup OOM
Date: Mon, 2 Sep 2024 18:59:59 +0800 [thread overview]
Message-ID: <20240902105959.1637-1-hdanton@sina.com> (raw)
In-Reply-To: <20240829102543.189453-1-jingxiangzeng.cas@gmail.com>
On Thu, 29 Aug 2024 18:25:43 +0800 Jingxiang Zeng <jingxiangzeng.cas@gmail.com> 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.
next prev parent reply other threads:[~2024-09-02 11:00 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-29 10:25 Jingxiang Zeng
2024-08-31 0:38 ` Andrew Morton
2024-09-01 20:39 ` Kairui Song
2024-09-01 22:40 ` Andrew Morton
2024-09-02 10:59 ` Hillf Danton [this message]
2024-09-06 0:00 ` Wei Xu
2024-09-11 1:29 ` jingxiang zeng
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240902105959.1637-1-hdanton@sina.com \
--to=hdanton@sina.com \
--cc=jingxiangzeng.cas@gmail.com \
--cc=kasong@tencent.com \
--cc=linuszeng@tencent.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mhocko@suse.com \
--cc=willy@infradead.org \
--cc=yuzhao@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox