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] [day] [month] [year] [list]
Message-ID: <accb281c-3c2a-4162-ab14-38e883d1ff72@redhat.com>
Date: Tue, 23 Sep 2025 10:28:15 +0200
From: David Hildenbrand <david@...hat.com>
To: xu.xin16@....com.cn, akpm@...ux-foundation.org
Cc: shakeel.butt@...ux.dev, hannes@...xchg.org, mhocko@...nel.org,
 roman.gushchin@...ux.dev, chengming.zhou@...ux.dev, muchun.song@...ux.dev,
 linux-kernel@...r.kernel.org, linux-mm@...ck.org, cgroups@...r.kernel.org
Subject: Re: [PATCH linux-next v3 1/6] memcg: add per-memcg ksm_rmap_items
 stat


> +
> +/* Show the ksm statistic count at memory.stat under cgroup mountpoint */
> +void memcg_stat_ksm_show(struct mem_cgroup *memcg, struct seq_buf *s)
> +{
> +	struct memcg_ksm_stat ksm_stat;
> +
> +	if (mem_cgroup_is_root(memcg)) {
> +		/* Just use the global counters when root memcg */
> +		ksm_stat.ksm_rmap_items = ksm_rmap_items;
> +	} else {
> +		/* Initialization */
> +		ksm_stat.ksm_rmap_items = 0;
> +		/* Summing all processes'ksm statistic items */
> +		mem_cgroup_scan_tasks(memcg, evaluate_memcg_ksm_stat, &ksm_stat);

What happens here if you have to tasks that share the same MM? (CLONE_VM 
without CLONE_THREAD)?

Wouldn't we end up counting the same MM multiple times?

-- 
Cheers

David / dhildenb


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ