Received: by 2002:ac0:e34a:0:0:0:0:0 with SMTP id g10csp619924imn; Thu, 28 Jul 2022 10:37:00 -0700 (PDT) X-Google-Smtp-Source: AA6agR6wSC/zOwjTBxIJ1kjoggzJ/hXCOkspAgM1Y56l90mQx+nplJdcyq1rMfbJBgK6AkuUzI4t X-Received: by 2002:a17:90b:890:b0:1f3:e57:1b01 with SMTP id bj16-20020a17090b089000b001f30e571b01mr446986pjb.139.1659029819982; Thu, 28 Jul 2022 10:36:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1659029819; cv=none; d=google.com; s=arc-20160816; b=XX0dartg1e2Yu25x4/OI2XrRlOS+kEU56cCNwWRqlFN4XKvIXijggSIISQkCd9DUzb 9ZP+B6JV/K7wIggNZOBV5mzUzMUzLiRPMwBGlCZg/cf8Ajx31VyJXOtKXys5tsfit8La ZMSUM5QjHNnNzs/tuyUb9UNbK0wc79fBZZpSIZsUivSL7Wd+kPZIwItmZpA0LhNrBomv Hg0/CxiA9zkcqz5Gx0HtFJGr+Tr5hrxzrngZoQ5u4IeoHfo40lPdf/mFDCi72cDzcv4H 08WSbSYMB1kyy3vKIlOoJTuqhVAKEevEDjGdTiFcWA2qRp8mj/Nw3zxIFgZ4NbPgx0UU Xvqw== 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-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:sender:dkim-signature; bh=yPjjAlHvkDbffFb+wNaNKaLJK2amB18Tv3U4RxiGxog=; b=XiTuTqDlh3s6SP5o9XYKSdxcjC05MvEw1jDJHd6Unl/fWoM6ZnxsTed9lt7amN5WAp qMwnz+tujIUaXlCv8ns1bAPCpziOQEgPxRWZd8pERNTR/yhsnS0O6htshZKjxnNzM/vM GdraWWmOl4DzP4O+R1n7fbynQRxr6gXd+g3W4OQIvtzxsftOYwqDsY4dZfBJVvUAdexj qIFNOXzC60+rUJR1xsIDbEwucNY30oZAU/kM+3uiYj/YWAtpY98+8yLY38yDQmyOnj9i 7QCu0ww26Yml5wF/LWGU6qYjGYqpAC3/3wCo4cmp+IygPysxaTmzY51gAUvoFeJqrBaS oxJg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=ejdELvaM; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id p42-20020a056a000a2a00b0052ae4903fb7si1317530pfh.330.2022.07.28.10.36.45; Thu, 28 Jul 2022 10:36:59 -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=@gmail.com header.s=20210112 header.b=ejdELvaM; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232538AbiG1R0P (ORCPT + 99 others); Thu, 28 Jul 2022 13:26:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36776 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232513AbiG1R0I (ORCPT ); Thu, 28 Jul 2022 13:26:08 -0400 Received: from mail-pf1-x432.google.com (mail-pf1-x432.google.com [IPv6:2607:f8b0:4864:20::432]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AEB3D12D1D; Thu, 28 Jul 2022 10:26:07 -0700 (PDT) Received: by mail-pf1-x432.google.com with SMTP id c3so2456772pfb.13; Thu, 28 Jul 2022 10:26:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:sender :from:to:cc; bh=yPjjAlHvkDbffFb+wNaNKaLJK2amB18Tv3U4RxiGxog=; b=ejdELvaM315ArBoL4nBGJKiTx05RJpFOTrByKL0vtASdXa4d3m9POeYXVINfmdTV3Q bgp0vNy+cRh4ZauFeqHTGWaUfJwD0cfZGRNbdiY16zWcAn9QbdmrIbjWGiqUP/VNLDW0 SYSkW2RT7FuEEIEgPGYQySBWnwjHrM+pkSUp8sm9UuAYl7KdjmNxst0wTF1W6eyRhHc/ iOdEygDMIi7uGGHfRzBu8/KVrkh0hSL+gtvUf1IqpY/YsBdItP84W/40tzv8ejvtpvOX WTukcr84KeTz+8ZF6+t/tYSB+5S6UqWC+1PmlgGkqLno1Nq8oQGsZB6yQg5vLHGPYtJ9 WizQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:sender :x-gm-message-state:from:to:cc; bh=yPjjAlHvkDbffFb+wNaNKaLJK2amB18Tv3U4RxiGxog=; b=Dl7KgorMOfdivh0j6fvVVR8uF7rUACmNiFpQGRbwpERu/HWa5s1rxZHO9WV1QfmOox p1fHGFEk8RQG8Yfhic9EDS6SW+ZTcCiho0fkOMn3AZNkPszmjkYvH+ucEkVpBaeV1uiN R2zg6WSyyeNaxVamvKB2cAWYJqFBFQc/DhxyHAcgzzc2wSXbZepA7vjMtSw+vo/Cif3r gLkmZzgOX4Wyi3xdJEb2W+/87PPx0k30lDRh3uCcUKZZJ9wUMC9pbVWFWTdCScxNpmEh Gyi8GWci5sd9VinUdMKb/8ARNBmZ8jC9RhKuKXHYH7ZPH1YgsrliETMmBpYoSBsWKoUc oqig== X-Gm-Message-State: AJIora9COYyw/EkY99x3r/l4Gze/jH6mLRXm+bpOfNGCwoNFCplpGLlX EHgm4BcS2qdLm3i6T+LOGRI= X-Received: by 2002:a62:3086:0:b0:52b:fd6c:a49d with SMTP id w128-20020a623086000000b0052bfd6ca49dmr18083324pfw.26.1659029167041; Thu, 28 Jul 2022 10:26:07 -0700 (PDT) Received: from localhost (2603-800c-1a02-1bae-a7fa-157f-969a-4cde.res6.spectrum.com. [2603:800c:1a02:1bae:a7fa:157f:969a:4cde]) by smtp.gmail.com with ESMTPSA id x5-20020aa79a45000000b0052b4f4c6a8fsm1003917pfj.209.2022.07.28.10.26.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Jul 2022 10:26:06 -0700 (PDT) Sender: Tejun Heo Date: Thu, 28 Jul 2022 07:26:05 -1000 From: Tejun Heo To: Michal =?iso-8859-1?Q?Koutn=FD?= Cc: Waiman Long , Ingo Molnar , Peter Zijlstra , Juri Lelli , Vincent Guittot , Dietmar Eggemann , Steven Rostedt , Ben Segall , Mel Gorman , Daniel Bristot de Oliveira , Valentin Schneider , Zefan Li , Johannes Weiner , cgroups@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 2/2] cgroup: Skip subtree root in cgroup_update_dfl_csses() Message-ID: References: <20220728005815.1715522-1-longman@redhat.com> <20220728005815.1715522-2-longman@redhat.com> <20220728144426.GA26631@blackbody.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20220728144426.GA26631@blackbody.suse.cz> X-Spam-Status: No, score=-1.5 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE, SPF_PASS autolearn=no 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 On Thu, Jul 28, 2022 at 04:44:26PM +0200, Michal Koutn? wrote: > On Wed, Jul 27, 2022 at 08:58:15PM -0400, Waiman Long wrote: > > The cgroup_update_dfl_csses() function updates css associations when a > > cgroup's subtree_control file is modified. Any changes made to a cgroup's > > subtree_control file, however, will only affect its descendants but not > > the cgroup itself. > > I find this correct. > > > So there is no point in migrating csses associated with that cgroup. > > We can skip them instead. > > Alone it's not such a big win but it componds with the recent Tejun's > threadgroup_rwsem elision. The chance is that if you're writing to a cgroup's subtree_control, that cgroup is gonna be empty. The only case I can think of that this would make a difference is w/ threaded cgroups, but it does make sense. Thanks. -- tejun