Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp1787721rdb; Thu, 7 Dec 2023 08:46:20 -0800 (PST) X-Google-Smtp-Source: AGHT+IHZWfbCPQL/ieF7bDjOfonH8x4r8blJEe7HrP4vlJBTdSEDK6iHx1tSMtEcQyGkFfluveQj X-Received: by 2002:aa7:9d9a:0:b0:6cb:a434:b58f with SMTP id f26-20020aa79d9a000000b006cba434b58fmr3370786pfq.33.1701967580247; Thu, 07 Dec 2023 08:46:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701967580; cv=none; d=google.com; s=arc-20160816; b=A7muPXwnvrGD+7X6j1nfd6JplbttggalTLreb2yU23jNZu2MFIwjNnzyaDBzOQhnnn gEtzMN3R61iYu7Cg4o/OQuoELon/s0WeBGpxTHi7CM4sN8ZdlNEN2Jc8k424QysBXkjP 9Fzr7pzJMXFwc2F3+mx+NFWNt16oLh/qEjWznspJHFGL0CGhXquIoM7XClGtbMvpFW5B O6jLfA61WnHwPord3nrA91DPKUtLRmd/OiSpsGMDRTMrTnUlW3cvOju0rPAqlKCdtqU6 ADv7xMBIYsuUET+NDHSb2mtApNhDi+6MMMYGqkhfewVvD+K/58uAhEp8hE6GFws3IhH7 2ZQQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature :dkim-signature; bh=W4o5AJYQxRQ7xI7OJGpx4sGxsNO6SfxiY/aIwYIlBMw=; fh=sRPxfRQrKULK1w6GjxxUExiydOJ/G6ZA4FLLgVy+uSU=; b=zKnwEZMLF2STtvOSvYW3j3+gK3jfIO0qoO89qxG5X3maI8RpcTHFDsuFJfWnykO2w/ mr+WnKkoPtjdtflbUSJxaMCw0vWMtUQDjwmF4QxliZViG+MlEyVLoWgzxNirIuBENk7I 0OLKjcbZ1EK4ffKX+ib+YrHcRYfWj15jAYnCInpU+EGZ4ieVEORQBf/LrVqMzk+QhA7b AXVPYCTvlQmMyCqNhManFkfCNiV5CJym+vpeH1V1ewGnBqVO1ufS/GvXbrGzKhOUMZCj +C6RQnKkHl3xibBhZeHbp29mJyi4y3VsDQyvhZ5JuTUFOUlaKLLd7gA3mu6wYqybv/31 9VDA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b="nK/helao"; dkim=pass header.i=@suse.com header.s=susede1 header.b="nK/helao"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=suse.com Return-Path: Received: from howler.vger.email (howler.vger.email. [2620:137:e000::3:4]) by mx.google.com with ESMTPS id b9-20020a056a000a8900b006ce9acdf9efsi1492451pfl.79.2023.12.07.08.46.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Dec 2023 08:46:20 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) client-ip=2620:137:e000::3:4; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b="nK/helao"; dkim=pass header.i=@suse.com header.s=susede1 header.b="nK/helao"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=suse.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id ACF0182CEFCD; Thu, 7 Dec 2023 08:46:17 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232784AbjLGQqC (ORCPT + 99 others); Thu, 7 Dec 2023 11:46:02 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60886 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232488AbjLGQqA (ORCPT ); Thu, 7 Dec 2023 11:46:00 -0500 Received: from smtp-out2.suse.de (smtp-out2.suse.de [IPv6:2a07:de40:b251:101:10:150:64:2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2E5B010D1; Thu, 7 Dec 2023 08:46:07 -0800 (PST) Received: from imap2.dmz-prg2.suse.org (imap2.dmz-prg2.suse.org [10.150.64.98]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id A62071FBAA; Thu, 7 Dec 2023 16:46:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1701967565; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=W4o5AJYQxRQ7xI7OJGpx4sGxsNO6SfxiY/aIwYIlBMw=; b=nK/helao8UuRYPbf5PTb5WnKD2dW1pIgAbiTjBiHsPy5TwwiKzduacVuf+XBYbDzqqc0XB Py+coW3Htj10SCh519vgWzg2uwfFBguI7UqXhD/PpWd6ULfELsB8I8CdT3cYHQGQSjxXlv vTv/uEeM+oxaAhNuDKt7zqJ3jOw8/YE= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1701967565; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=W4o5AJYQxRQ7xI7OJGpx4sGxsNO6SfxiY/aIwYIlBMw=; b=nK/helao8UuRYPbf5PTb5WnKD2dW1pIgAbiTjBiHsPy5TwwiKzduacVuf+XBYbDzqqc0XB Py+coW3Htj10SCh519vgWzg2uwfFBguI7UqXhD/PpWd6ULfELsB8I8CdT3cYHQGQSjxXlv vTv/uEeM+oxaAhNuDKt7zqJ3jOw8/YE= Received: from imap2.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap2.dmz-prg2.suse.org (Postfix) with ESMTPS id 91A68139E3; Thu, 7 Dec 2023 16:46:05 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap2.dmz-prg2.suse.org with ESMTPSA id Drj4Is32cWUSUwAAn2gu4w (envelope-from ); Thu, 07 Dec 2023 16:46:05 +0000 Date: Thu, 7 Dec 2023 17:46:04 +0100 From: Michal =?utf-8?Q?Koutn=C3=BD?= To: Waiman Long Cc: Tejun Heo , Zefan Li , Johannes Weiner , Yafang Shao , cgroups@vger.kernel.org, linux-kernel@vger.kernel.org, Stephen Rothwell , Yosry Ahmed Subject: Re: [PATCH-cgroup v2] cgroup: Move rcu_head up near the top of cgroup_root Message-ID: <65h3s447i3fkygdtilucda2q6uaygtzfpxb6vsjgwoeybwwgtw@6ahmtj47ggzh> References: <20231207134614.882991-1-longman@redhat.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="yoh2mfr4t3txcwc4" Content-Disposition: inline In-Reply-To: <20231207134614.882991-1-longman@redhat.com> X-Spam-Level: X-Spam-Score: -1.40 Authentication-Results: smtp-out2.suse.de; none X-Spam-Level: X-Spam-Score: -1.40 X-Spamd-Result: default: False [-1.40 / 50.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; FREEMAIL_ENVRCPT(0.00)[gmail.com]; TO_MATCH_ENVRCPT_ALL(0.00)[]; TAGGED_RCPT(0.00)[]; MIME_GOOD(-0.20)[multipart/signed,text/plain]; NEURAL_HAM_LONG(-1.00)[-1.000]; RCVD_COUNT_THREE(0.00)[3]; DKIM_SIGNED(0.00)[suse.com:s=susede1]; NEURAL_HAM_SHORT(-0.20)[-1.000]; RCPT_COUNT_SEVEN(0.00)[9]; SIGNED_PGP(-2.00)[]; FUZZY_BLOCKED(0.00)[rspamd.com]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; MID_RHS_NOT_FQDN(0.50)[]; FREEMAIL_CC(0.00)[kernel.org,bytedance.com,cmpxchg.org,gmail.com,vger.kernel.org,canb.auug.org.au,google.com]; RCVD_TLS_ALL(0.00)[]; SUSPICIOUS_RECIPS(1.50)[] X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on howler.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Thu, 07 Dec 2023 08:46:17 -0800 (PST) --yoh2mfr4t3txcwc4 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Dec 07, 2023 at 08:46:14AM -0500, Waiman Long = 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 */ >=20 > /* XXX 48 bytes hole, try to pack */ >=20 > /* --- cacheline 1 boundary (64 bytes) --- */ > struct cgroup cgrp __attribute__((__aligned__(64))); /* = 64 2368 */ >=20 > /* XXX last struct has 8 bytes of padding */ >=20 > /* --- cacheline 38 boundary (2432 bytes) --- */ > struct cgroup * cgrp_ancestor_storage; /* 2432 8 */ > atomic_t nr_cgrps; /* 2440 4 */ >=20 > /* XXX 4 bytes hole, try to pack */ >=20 > 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 */ >=20 > /* 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 --yoh2mfr4t3txcwc4 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYKAB0WIQQpEWyjXuwGT2dDBqAGvrMr/1gcjgUCZXH2ygAKCRAGvrMr/1gc jpZuAP9RgMwrR6LBFr+2ohXuCMXaICW4Vd3Wj2jt2+aVwhZUMwEAv+h6B/ZFotnw BWbde0bO3MEumhkx4R695l/j/sSxdws= =dUG2 -----END PGP SIGNATURE----- --yoh2mfr4t3txcwc4--