From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 019D9C04A68 for ; Thu, 28 Jul 2022 17:26:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232562AbiG1R0P (ORCPT ); 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-Google-Smtp-Source: AGRyM1uy/NMK3Xo/sOiP6IlnS3FGumPYGCCPVQATvURXvdtWvP8ma2XFFEeB3n9jgi1ApjbEWfa3DQ== 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> 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