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: <Z9r-YQDAXIur81i0@slm.duckdns.org>
Date: Wed, 19 Mar 2025 07:26:57 -1000
From: Tejun Heo <tj@...nel.org>
To: Mateusz Guzik <mjguzik@...il.com>
Cc: Greg Thelen <gthelen@...gle.com>, Johannes Weiner <hannes@...xchg.org>,
	Michal Koutný <mkoutny@...e.com>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Eric Dumazet <edumzaet@...gle.com>,
	Yosry Ahmed <yosryahmed@...gle.com>, cgroups@...r.kernel.org,
	linux-mm@...ck.org, linux-kernel@...r.kernel.org,
	Eric Dumazet <edumazet@...gle.com>
Subject: Re: [PATCH] cgroup/rstat: avoid disabling irqs for O(num_cpu)

On Wed, Mar 19, 2025 at 11:47:32AM +0100, Mateusz Guzik wrote:
...
> Is not this going a little too far?
> 
> the lock + irq trip is quite expensive in its own right and now is
> going to be paid for each cpu, as in the total time spent executing
> cgroup_rstat_flush_locked is going to go up.

Lock/unlock when the cacheline is already on the cpu is pretty cheap and on
modern x86 cpus at least irq on/off are also only a few cycles, so you
probably wouldn't be able to tell the difference.

Thanks.

-- 
tejun

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ