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: <65h3s447i3fkygdtilucda2q6uaygtzfpxb6vsjgwoeybwwgtw@6ahmtj47ggzh>
Date:   Thu, 7 Dec 2023 17:46:04 +0100
From:   Michal Koutný <mkoutny@...e.com>
To:     Waiman Long <longman@...hat.com>
Cc:     Tejun Heo <tj@...nel.org>, Zefan Li <lizefan.x@...edance.com>,
        Johannes Weiner <hannes@...xchg.org>,
        Yafang Shao <laoar.shao@...il.com>, cgroups@...r.kernel.org,
        linux-kernel@...r.kernel.org,
        Stephen Rothwell <sfr@...b.auug.org.au>,
        Yosry Ahmed <yosryahmed@...gle.com>
Subject: Re: [PATCH-cgroup v2] cgroup: Move rcu_head up near the top of
 cgroup_root

On Thu, Dec 07, 2023 at 08:46:14AM -0500, Waiman Long <longman@...hat.com> wrote:
> Commit 77070eeb8821 ("cgroup: Avoid false cacheline sharing of read
> mostly rstat_cpu") happens to be the last straw that breaks it.

FTR, when I build kernel from that commit, I can see

> struct cgroup_root {
> 	struct kernfs_root *       kf_root;              /*     0     8 */
> 	unsigned int               subsys_mask;          /*     8     4 */
> 	int                        hierarchy_id;         /*    12     4 */
> 
> 	/* XXX 48 bytes hole, try to pack */
> 
> 	/* --- cacheline 1 boundary (64 bytes) --- */
> 	struct cgroup              cgrp __attribute__((__aligned__(64))); /*    64  2368 */
> 
> 	/* XXX last struct has 8 bytes of padding */
> 
> 	/* --- cacheline 38 boundary (2432 bytes) --- */
> 	struct cgroup *            cgrp_ancestor_storage; /*  2432     8 */
> 	atomic_t                   nr_cgrps;             /*  2440     4 */
> 
> 	/* XXX 4 bytes hole, try to pack */
> 
> 	struct list_head           root_list;            /*  2448    16 */
> 	struct callback_head       rcu __attribute__((__aligned__(8))); /*  2464    16 */
> 	unsigned int               flags;                /*  2480     4 */
> 	char                       release_agent_path[4096]; /*  2484  4096 */
> 	/* --- cacheline 102 boundary (6528 bytes) was 52 bytes ago --- */
> 	char                       name[64];             /*  6580    64 */
> 
> 	/* size: 6656, cachelines: 104, members: 11 */
> 	/* sum members: 6592, holes: 2, sum holes: 52 */
> 	/* padding: 12 */
> 	/* paddings: 1, sum paddings: 8 */
> 	/* forced alignments: 2, forced holes: 1, sum forced holes: 48 */
> } __attribute__((__aligned__(64)));

2480 has still quite a reserve below 4096. (I can't see an CONFIG_*
affecting this.)

Perhaps, I missed something from the linux-next merging thread?


Michal

Download attachment "signature.asc" of type "application/pgp-signature" (229 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ