All of lore.kernel.org
 help / color / mirror / Atom feed
From: Baolin Wang <baolin.wang@linux.alibaba.com>
To: Max Kellermann <max.kellermann@ionos.com>,
	akpm@linux-foundation.org, kasong@tencent.com,
	qi.zheng@linux.dev, shakeel.butt@linux.dev, baohua@kernel.org,
	axelrasmussen@google.com, yuanchu@google.com, weixugc@google.com,
	baoquan.he@linux.dev, david@kernel.org, ljs@kernel.org,
	liam@infradead.org, vbabka@kernel.org, rppt@kernel.org,
	surenb@google.com, mhocko@suse.com, hannes@cmpxchg.org,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org,
	rcu@vger.kernel.org
Subject: Re: [PATCH v3 5/5] mm/mglru: reschedule between memcg reclaim attempts
Date: Mon, 23 Nov 2026 18:09:07 +0800	[thread overview]
Message-ID: <cc47e669-a662-4d80-950e-d44bb4c311a3@linux.alibaba.com> (raw)
In-Reply-To: <20261116081403.216452-6-max.kellermann@ionos.com>



On 11/16/26 4:14 PM, Max Kellermann wrote:
> shrink_one() can return immediately for empty or protected memcgs, and
> try_to_shrink_lruvec() can break out before reaching its
> cond_resched().  A scan through many memcgs can repeatedly rotate
> entries without giving other runnable tasks a scheduling opportunity.
> 
> Call cond_resched_tasks_rcu_qs() (as the existing shrink_lruvec() loop
> does) after shrink_one(), while the memcg reference still pins the
> cursor and before reacquiring the RCU read lock.  Also call it between
> bins and nulls-marker retries, covering scans that skip every entry.
> 
> Signed-off-by: Max Kellermann <max.kellermann@ionos.com>
> ---

LGTM.
Reviewed-by: Baolin Wang <baolin.wang@linux.alibaba.com>

      parent reply	other threads:[~2026-11-23 10:09 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-16  8:13 [PATCH v3 0/5] mm: multi-gen LRU: reduce memcg rotation overhead Max Kellermann
2026-11-16  8:13 ` [PATCH v3 1/5] include/linux/rculist_nulls: add hlist_nulls_add_behind_rcu() Max Kellermann
2026-11-17  8:14   ` sashiko-bot
2026-11-19 19:55     ` Barry Song
2026-11-16  8:14 ` [PATCH v3 2/5] mm/vmscan: move code to lru_gen_{add,del}_memcg() Max Kellermann
2026-11-23  1:35   ` Barry Song
2026-11-23  9:40   ` Baolin Wang
2026-11-16  8:14 ` [PATCH v3 3/5] mm/mglru: cache the last memcg node, make tail insertion constant time Max Kellermann
2026-11-23  1:53   ` Barry Song
2026-11-23 13:40     ` Max Kellermann
2026-11-23  9:59   ` Baolin Wang
2026-11-23 13:31     ` Max Kellermann
2026-11-16  8:14 ` [PATCH v3 4/5] mm/mglru: avoid redundant rotations of young memcgs Max Kellermann
2026-11-23  2:01   ` Barry Song
2026-11-23 13:13     ` Max Kellermann
2026-11-23 13:27       ` Barry Song
2026-11-16  8:14 ` [PATCH v3 5/5] mm/mglru: reschedule between memcg reclaim attempts Max Kellermann
2026-11-23  2:24   ` Barry Song
2026-11-23 10:09   ` Baolin Wang [this message]

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=cc47e669-a662-4d80-950e-d44bb4c311a3@linux.alibaba.com \
    --to=baolin.wang@linux.alibaba.com \
    --cc=akpm@linux-foundation.org \
    --cc=axelrasmussen@google.com \
    --cc=baohua@kernel.org \
    --cc=baoquan.he@linux.dev \
    --cc=david@kernel.org \
    --cc=hannes@cmpxchg.org \
    --cc=kasong@tencent.com \
    --cc=liam@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=ljs@kernel.org \
    --cc=max.kellermann@ionos.com \
    --cc=mhocko@suse.com \
    --cc=qi.zheng@linux.dev \
    --cc=rcu@vger.kernel.org \
    --cc=rppt@kernel.org \
    --cc=shakeel.butt@linux.dev \
    --cc=surenb@google.com \
    --cc=vbabka@kernel.org \
    --cc=weixugc@google.com \
    --cc=yuanchu@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.