Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp36734238rwd; Tue, 11 Jul 2023 05:11:23 -0700 (PDT) X-Google-Smtp-Source: APBJJlFl5JR2BCszGf6kYTigktuun46HAWeHvZAqQCd9J+Vcvn6r1T1SlVmYO/f+QsB/q0GzFoL6 X-Received: by 2002:a05:6512:3104:b0:4fb:7626:31a8 with SMTP id n4-20020a056512310400b004fb762631a8mr11240744lfb.27.1689077483260; Tue, 11 Jul 2023 05:11:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689077483; cv=none; d=google.com; s=arc-20160816; b=omNd11Bon97564OUJFTcOefMS7E61OslwTNK+2yN/Th6VNlhlLwFsraM7+gp33EY2W 7lIT4t1kIrreHcBnalduxkXMQvREtkS0P+JBmtD7a4NTGU+MScnS4ImINsDxCCX51gTo J2hL23WirWFK7HhwGBv8cz56rMvAqJr2O9aeZra6Z/1SZW/heUo1aR7efSfaqmAoH/cY an+9HAOYTRBPwrb1Do30w+6J20XLMj3UHG1/ZSYarxoZrQ8B4seYxlQvmDx6nvt/unws B7yuCbVdgUzSRb+KqCElp44fqJimGG46lCPU3PI8T1XFI/2KTrvZIwEfxbf+935IxR/B VfBA== 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; bh=4te5JwumvF8/GIgkO+TJ0V5B1TkpxMPkr04XN6p1A28=; fh=Xdfeb+zOGOgNT9DQ61VUSQp99ptNBe/m7fU/bLG3+Po=; b=WHJrvaiHk0OvHIGEm49P7uZ7BQlvrO4E+MFtCKOlqEwhwJfirclC1iSJMz3xmMsrEL bWJWeDdNLJ0HICSvQWwiCshJTaTTaI9MMxWNCoF3uVZkjhnKMmfhJMwfF9Ip+x2HIGgn /5OfoL3OB8LgKCfAiRrxYzI8GRDLKyOPomT0X0fvJKN5N9pOYRz8HukZIPAOiES0Im/B FjKUR1h+R1d+/3e7YQ8w1r/AdZKXYDm1rV3AKC8IjShHj8ahBf8G2vf6M5C1ARBITTk8 TAuMk725+E3BqoHf+n+JI3jb4/EjbIiSKVelmlRXpvVXw9YJjJdTJVhMhiOT55tnDKa8 1biA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=VZJbzOP9; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h25-20020a50ed99000000b0051e03b85e7dsi1965168edr.438.2023.07.11.05.10.39; Tue, 11 Jul 2023 05:11:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=VZJbzOP9; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=suse.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231294AbjGKLw7 (ORCPT + 99 others); Tue, 11 Jul 2023 07:52:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37632 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229868AbjGKLw4 (ORCPT ); Tue, 11 Jul 2023 07:52:56 -0400 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EED0210FC; Tue, 11 Jul 2023 04:52:52 -0700 (PDT) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 8F82821D09; Tue, 11 Jul 2023 11:52:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1689076371; 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=4te5JwumvF8/GIgkO+TJ0V5B1TkpxMPkr04XN6p1A28=; b=VZJbzOP9afXhZN7G+sPdUEroSa0FtkyX6R848TJmsI6bwBCCzelW/44TukY+ylg/n2eRgQ +aKbEHzo+IgUHChuHawdB5oSk1EA0paU+2ES+ZtylsWY50PVEZLah94VKtl3TuGfOKWumd 65r259bjXC3jaokWPET6XBTaeGYyy9E= Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 736A71390F; Tue, 11 Jul 2023 11:52:51 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id 9hgZG5NCrWRrKgAAMHmgww (envelope-from ); Tue, 11 Jul 2023 11:52:51 +0000 Date: Tue, 11 Jul 2023 13:52:50 +0200 From: Michal =?utf-8?Q?Koutn=C3=BD?= To: Miaohe Lin Cc: Waiman Long , tj@kernel.org, hannes@cmpxchg.org, lizefan.x@bytedance.com, cgroups@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] cgroup/cpuset: update parent subparts cpumask while holding css refcnt Message-ID: References: <20230701065049.1758266-1-linmiaohe@huawei.com> <74f1906e-fe58-c745-a851-b160374f7acf@redhat.com> <30b1f809-a11b-efe8-289c-04a801f20207@huawei.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="rpxvczwrelgzbfqd" Content-Disposition: inline In-Reply-To: <30b1f809-a11b-efe8-289c-04a801f20207@huawei.com> X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --rpxvczwrelgzbfqd Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Jul 11, 2023 at 10:52:02AM +0800, Miaohe Lin = wrote: > commit 2bdfd2825c9662463371e6691b1a794e97fa36b4 > Author: Waiman Long > Date: Wed Feb 2 22:31:03 2022 -0500 >=20 > cgroup/cpuset: Fix "suspicious RCU usage" lockdep warning Aha, thanks for the pointer. I've also found a paragraph in [1]: > In addition, the -rt patchset turns spinlocks into a sleeping locks so > that the corresponding critical sections can be preempted, which also > means that these sleeplockified spinlocks (but not other sleeping > locks!) may be acquire within -rt-Linux-kernel RCU read-side critical > sections. That suggests (together with practical use) that dicussed spinlocks should be fine in RCU read section. And the possible reason is deeper in generate_sched_domains() that do kmalloc(..., GFP_KERNEL). Alas update_cpumask_hier() still calls generate_sched_domains(), OTOH, update_parent_subparts_cpumask() doesn't seem so. The idea to not relieve rcu_read_lock() in update_cpumask() iteration (instead of the technically unneeded refcnt bump) would have to be verified with CONFIG_PROVE_RCU && CONFIG_LOCKDEP. WDYT? Michal [1] https://www.kernel.org/doc/html/latest/RCU/Design/Requirements/Requirem= ents.html?highlight=3Drcu+read+section#specialization --rpxvczwrelgzbfqd Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYKAB0WIQQpEWyjXuwGT2dDBqAGvrMr/1gcjgUCZK1CkAAKCRAGvrMr/1gc jslQAP9hbBzspCiXduaN1xbeQyV+ZnUhEAOznzhyLOo8+dDxRgEA3FXd5SDDuVMJ 87l6UFwCe1ThIrCymWRsgFxk2a+AJws= =Xt4s -----END PGP SIGNATURE----- --rpxvczwrelgzbfqd--