linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Hillf Danton <hdanton@sina.com>
To: Yu Zhao <yuzhao@google.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Johannes Weiner <hannes@cmpxchg.org>,
	Jonathan Corbet <corbet@lwn.net>,
	Michael Larabel <Michael@michaellarabel.com>,
	Michal Hocko <mhocko@kernel.org>, Mike Rapoport <rppt@kernel.org>,
	Roman Gushchin <roman.gushchin@linux.dev>,
	Suren Baghdasaryan <surenb@google.com>,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org,
	linux-mm@google.com
Subject: Re: [PATCH mm-unstable v1 6/8] mm: multi-gen LRU: per-node lru_gen_folio lists
Date: Sat,  3 Dec 2022 12:20:31 +0800	[thread overview]
Message-ID: <20221203042031.6978-1-hdanton@sina.com> (raw)
In-Reply-To: <20221201223923.873696-7-yuzhao@google.com>

On 1 Dec 2022 15:39:22 -0700 Yu Zhao <yuzhao@google.com>
> @@ -477,6 +477,16 @@ static void mem_cgroup_update_tree(struct mem_cgroup *memcg, int nid)
>  	struct mem_cgroup_per_node *mz;
>  	struct mem_cgroup_tree_per_node *mctz;
>  
> +	if (lru_gen_enabled()) {
> +		struct lruvec *lruvec = &memcg->nodeinfo[nid]->lruvec;
> +
> +		/* see the comment on MEMCG_NR_GENS */
> +		if (soft_limit_excess(memcg) && lru_gen_memcg_seg(lruvec) != MEMCG_LRU_HEAD)
> +			lru_gen_rotate_memcg(lruvec, MEMCG_LRU_HEAD);
> +
> +		return;

The heuristic of rotation is so weak a signal in the background noise
produced by prandom_u32_max(MEMCG_NR_BINS), wonder if mcgroup lru works
no fine without it.

> +	}
> +
>  	mctz = soft_limit_tree.rb_tree_per_node[nid];
>  	if (!mctz)
>  		return;
> @@ -3526,6 +3536,9 @@ unsigned long mem_cgroup_soft_limit_reclaim(pg_data_t *pgdat, int order,
>  	struct mem_cgroup_tree_per_node *mctz;
>  	unsigned long excess;
>  
> +	if (lru_gen_enabled())
> +		return 0;
> +
>  	if (order > 0)
>  		return 0;
>  


  reply	other threads:[~2022-12-03  4:20 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-01 22:39 [PATCH mm-unstable v1 0/8] mm: multi-gen LRU: memcg LRU Yu Zhao
2022-12-01 22:39 ` [PATCH mm-unstable v1 1/8] mm: multi-gen LRU: rename lru_gen_struct to lru_gen_folio Yu Zhao
2022-12-01 22:39 ` [PATCH mm-unstable v1 2/8] mm: multi-gen LRU: rename lrugen->lists[] to lrugen->folios[] Yu Zhao
2022-12-01 22:39 ` [PATCH mm-unstable v1 3/8] mm: multi-gen LRU: remove eviction fairness safeguard Yu Zhao
2022-12-11  3:59   ` Chen Wandun
2022-12-01 22:39 ` [PATCH mm-unstable v1 4/8] mm: multi-gen LRU: remove aging " Yu Zhao
2022-12-01 22:39 ` [PATCH mm-unstable v1 5/8] mm: multi-gen LRU: shuffle should_run_aging() Yu Zhao
2022-12-01 22:39 ` [PATCH mm-unstable v1 6/8] mm: multi-gen LRU: per-node lru_gen_folio lists Yu Zhao
2022-12-03  4:20   ` Hillf Danton [this message]
2022-12-01 22:39 ` [PATCH mm-unstable v1 7/8] mm: multi-gen LRU: clarify scan_control flags Yu Zhao
2022-12-02  4:17   ` Hillf Danton
2022-12-01 22:39 ` [PATCH mm-unstable v1 8/8] mm: multi-gen LRU: simplify arch_has_hw_pte_young() check Yu Zhao
2022-12-20 21:49 ` JavaScript / Ampere Altra benchmark with MGLRU Yu Zhao

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=20221203042031.6978-1-hdanton@sina.com \
    --to=hdanton@sina.com \
    --cc=Michael@michaellarabel.com \
    --cc=akpm@linux-foundation.org \
    --cc=corbet@lwn.net \
    --cc=hannes@cmpxchg.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@google.com \
    --cc=linux-mm@kvack.org \
    --cc=mhocko@kernel.org \
    --cc=roman.gushchin@linux.dev \
    --cc=rppt@kernel.org \
    --cc=surenb@google.com \
    --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