lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Z4e3TVP4p25zj9xw@casper.infradead.org>
Date: Wed, 15 Jan 2025 13:25:33 +0000
From: Matthew Wilcox <willy@...radead.org>
To: Donet Tom <donettom@...ux.ibm.com>
Cc: Andrew Morton <akpm@...ux-foundation.org>, linux-mm@...ck.org,
	linux-kernel@...r.kernel.org, Gregory Price <gourry@...rry.net>,
	Yu Zhao <yuzhao@...gle.com>, Ritesh Harjani <ritesh.list@...il.com>,
	"Aneesh Kumar K . V" <aneesh.kumar@...nel.org>,
	David Hildenbrand <david@...hat.com>,
	Huang Ying <ying.huang@...ux.alibaba.com>,
	Johannes Weiner <hannes@...xchg.org>
Subject: Re: [RFC] mm/swap.c: Enable promotion of unmapped MGLRU page cache
 pages

On Wed, Jan 15, 2025 at 06:06:25AM -0600, Donet Tom wrote:
> An MGLRU page cache page is eligible for promotion when:
> 
> 1. Memory Tiering and pagecache_promotion_enabled are enabled
> 2. It resides in a lower memory tier.
> 3. It is referenced.
> 4. It is part of the working set.
> 5. It belongs to the active list.
> For MGLRU, the youngest generation and the youngest generation - 1
> are treated as the active list.

... why do you only promote folios if they belong to a memcg?

> +promo_candid:
> +	if (!folio_test_isolated(folio) &&
> +		(sysctl_numa_balancing_mode & NUMA_BALANCING_MEMORY_TIERING) &&
> +		numa_pagecache_promotion_enabled) {
> +		memcg = folio_memcg(folio);
> +		if (memcg) {
> +			lruvec = mem_cgroup_lruvec(memcg, folio_pgdat(folio));
> +			gen = folio_lru_gen(folio);
> +
> +			if ((gen < MAX_NR_GENS) && lru_gen_is_active(lruvec, gen))
> +				promotion_candidate(folio);
> +		}

Should there be an 'else' clause here?  Or should it be:

		lruvec = mem_cgroup_lruvec(memcg, folio_pgdat(folio));
		gen = folio_lru_gen(folio);
		if ((gen < MAX_NR_GENS) && lru_gen_is_active(lruvec, gen))
			promotion_candidate(folio);


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ