Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp4771157rwb; Mon, 21 Nov 2022 11:40:11 -0800 (PST) X-Google-Smtp-Source: AA0mqf69yUnhIWSvqAaJx05poI44nJiP63zKnCQ8qkfvMJSAqZ/8LP+92NQEtg0PJHcTG7W55C95 X-Received: by 2002:a17:906:38a:b0:7a7:1d4f:c7d9 with SMTP id b10-20020a170906038a00b007a71d4fc7d9mr5076389eja.402.1669059610878; Mon, 21 Nov 2022 11:40:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669059610; cv=none; d=google.com; s=arc-20160816; b=gDn/2OiTrDJB6b47m2Ikp1bp52KxSohrldhJUrog7hcQNNSF9pJZClGcSI+wkCYpii hsro1aagXLshLezk/8KtIREr+6rh0xewS6sObGmqhA7q58jx93QMfkXjV+uGV1xaVM3Y jzjppuyC6UjO65VJd2tKm38UYv3aTrU+f0EUcFJr7fPdLTm/FhJrGjCyhSmDOkkmOwFq eeDHluuyA+QiQ3bEr3TppMt4T3Nl4LkTPncResg6UJWe8sRWvmsDJaon9yhPDVJcpyd7 AiLsSnJzMt/grOm33CUmrYbRUMavTSRjT9dV6oPHANib1IYsCUD2vTE8Jc5KRSSY74Ez kSVQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=kOkPtxy1B+aPiwWUMn6zq0m1QzdZL/48YTvASqRGnL4=; b=FH5hMuPpTBJ+lt1sqfBcqC0u1oBVUL/2QGi9eoZn9fj7XPVW0/vjYUKyNNMXnW1Ano bhjMwGEToNHgVVVEgzVAQQMPTSWDACHSrDJA1Dya6Iw3g7ysNU02XFcLnwAgHFrdHw7/ Vgl4972Si2jswiMpztKSjvnIJGE0kJg9zxnXdwZSqzygllgYwoDcOV2m183n6aVBmG5d 4MXAwDzVKnytE3bz+OcOkaPrwzlLqM5Ynf9HmgFkE2KEBiWY3D6bxK8zFYj6gGVzKK35 mW+x0ow3TS7nhW1E111XDCOWa7MnXDWEl3uNDWgYDy2evgXT/ETzLqfSAXPd8DdoEPvK Q6mQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=eWMES88F; 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 y19-20020aa7c253000000b00469d35e2f13si617818edo.522.2022.11.21.11.39.48; Mon, 21 Nov 2022 11:40:10 -0800 (PST) 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=eWMES88F; 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 S230115AbiKUSur (ORCPT + 91 others); Mon, 21 Nov 2022 13:50:47 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54662 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230040AbiKUSuq (ORCPT ); Mon, 21 Nov 2022 13:50:46 -0500 Received: from smtp-out2.suse.de (smtp-out2.suse.de [IPv6:2001:67c:2178:6::1d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5A445C67E9; Mon, 21 Nov 2022 10:50:45 -0800 (PST) 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-out2.suse.de (Postfix) with ESMTPS id EB5D31F8B5; Mon, 21 Nov 2022 18:50:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1669056643; 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=kOkPtxy1B+aPiwWUMn6zq0m1QzdZL/48YTvASqRGnL4=; b=eWMES88FsBzrH40LiK+qYy1lxRyYmEbH8g8dpl52Ug6pzifOHVL20SZLjKE2E6+eGQlmQq 0SPeOxmtxbUghhnfMAFejUqhU2tnuReqkc/p/TwqTbR1ON2k0YK3Fv2aPRmcUvuLGo6Egc 3ToqnD7s5N+41BcgKlBBW/cdlMD2+vs= 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 C01F01377F; Mon, 21 Nov 2022 18:50:43 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id vtqHLYPIe2N0KwAAMHmgww (envelope-from ); Mon, 21 Nov 2022 18:50:43 +0000 Date: Mon, 21 Nov 2022 19:50:42 +0100 From: Michal =?iso-8859-1?Q?Koutn=FD?= To: Waiman Long Cc: Tejun Heo , Zefan Li , Johannes Weiner , cgroups@vger.kernel.org, linux-kernel@vger.kernel.org, Sebastian Andrzej Siewior Subject: Re: [PATCH 2/2] cgroup/cpuset: Optimize cpuset_attach() on v2 Message-ID: <20221121185042.GA15225@blackbody.suse.cz> References: <20221112221939.1272764-1-longman@redhat.com> <20221112221939.1272764-3-longman@redhat.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="sm4nu43k4a2Rpi4c" Content-Disposition: inline In-Reply-To: <20221112221939.1272764-3-longman@redhat.com> User-Agent: Mutt/1.10.1 (2018-07-13) 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_PASS 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 --sm4nu43k4a2Rpi4c Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Sat, Nov 12, 2022 at 05:19:39PM -0500, Waiman Long wrote: > + /* > + * In the default hierarchy, enabling cpuset in the child cgroups > + * will trigger a number of cpuset_attach() calls with no change > + * in effective cpus and mems. In that case, we can optimize out > + * by skipping the task iteration and update. > + */ > + if (cgroup_subsys_on_dfl(cpuset_cgrp_subsys) && > + !cpus_updated && !mems_updated) { I'm just wondering -- why is this limited to the default hierarchy only? IOW why can't v1 skip too (when favorable constness between cpusets). Thanks, Michal --sm4nu43k4a2Rpi4c Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- iHUEARYIAB0WIQTrXXag4J0QvXXBmkMkDQmsBEOquQUCY3vIfwAKCRAkDQmsBEOq ueSvAQCyC6t+4Kgc9Ku5M0Twd+wYTQLyFcMCodNhZGs2DG56GQEA96Cg26FgHBCF 4fx2Ow2jpg02roncB1d72afOmf7dwwc= =Py+0 -----END PGP SIGNATURE----- --sm4nu43k4a2Rpi4c--