Received: by 2002:a05:6358:111d:b0:dc:6189:e246 with SMTP id f29csp841127rwi; Wed, 2 Nov 2022 19:51:29 -0700 (PDT) X-Google-Smtp-Source: AMsMyM51MWcIQp0HCyIBMKa/5W/cu8cz53/dQzDg++11Wa9w2TYrUG5zpTZY7Vl8Ngw+4thbiedy X-Received: by 2002:a17:903:1112:b0:179:ce23:dd57 with SMTP id n18-20020a170903111200b00179ce23dd57mr28723383plh.114.1667443889160; Wed, 02 Nov 2022 19:51:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667443889; cv=none; d=google.com; s=arc-20160816; b=y/zrPpCk1RQceFcx4vPHAU2XuRX383NCMkwmkHQRkW0cerwrrhg0oS2BenvB9pX8rf uooWqyNrZmdtAlaJ0heOtcYYMD97M3UVxLSku72EdFP7l33XogFzLyOkvTPra1/Hno+1 +VirgbbXgYhhIGNH6/Ly3kS/mxbv6zT6nIEBBkZly/ju5wGlLQxVCtEpjnZyOj0z9Bww H/RHZ5F8HeBS8QFAMFT+a4fiADBOhd71CDNvq989/Ox7BTQPE9XC5CKUdAOyQ6wqPL8j O8hvXQiVSDyDC3KNHPNi8KegSgKInUZpm3L31WPTnicGJxA6I53TWHFgASYZpYzsWwfr wg9g== 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:sender:dkim-signature; bh=cWur7HMVd8Ke8GikOufYnkHwwFXOwHuL2p1d2EaRZQ4=; b=ZfvkF8mm97wJJxN8RVG4NKbMWqYwz+2eh+1nipoOE7T9D6JAzzBXu7B9iEY3/Psv6D H4jAnhSiumW/2wFistYgkK0q0cuS32vLRnmyq8pjpnNLwYGp5q52ZsOLqGR81zVNqx7U mHc4qVEizDvCw3DpvWLIy4eOAe08GW5wxfMq3ygmm4tOwdcbUdy1bU1wvtSUtDAe0Ba4 cSnxbBkrkZ1Cmi7Nbj4QKlFkrXbyVSNDZKkRr804fUvFJxv5Buxp9vTESPzwt0ko8DjC RDhtKi4EH8Bn58D5jZT2CKUE6KWPKhK+u3vLs9l5GAm8kUWL8IC05tKAYBdzsxPWox7G klPg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=LHg0QvuI; 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 q71-20020a17090a1b4d00b0021409ca96c2si4108332pjq.23.2022.11.02.19.51.15; Wed, 02 Nov 2022 19:51:29 -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=LHg0QvuI; 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 S230132AbiKCCbi (ORCPT + 98 others); Wed, 2 Nov 2022 22:31:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60432 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229457AbiKCCbg (ORCPT ); Wed, 2 Nov 2022 22:31:36 -0400 Received: from mail-pj1-x102c.google.com (mail-pj1-x102c.google.com [IPv6:2607:f8b0:4864:20::102c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B79E1CCA; Wed, 2 Nov 2022 19:31:35 -0700 (PDT) Received: by mail-pj1-x102c.google.com with SMTP id m14-20020a17090a3f8e00b00212dab39bcdso3939139pjc.0; Wed, 02 Nov 2022 19:31:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:sender:from:to:cc:subject:date:message-id :reply-to; bh=cWur7HMVd8Ke8GikOufYnkHwwFXOwHuL2p1d2EaRZQ4=; b=LHg0QvuIyTZaP2L3VKH46Q9HpSocgocqW64wr5w9rN7A1/45tQRuzDepB3CuHT0ewX rf5d45xvbFIIurHHUmIN783brPGJl/6JAIj9Vqtmb+f/i+2TSwFnRwe6vvhdHvkdVDdg fsUyyhAM43SrXN5uTLLssApnXPbw+YhBQhSKdhD6faQG8mwhlJUNjvBjNXch7g0O3/yA W+EZ+Vu6dwPlKBhGkJDOidgUKpCnwNfuAp3Jgh35C6rCVO8NY4GW1PRi3dCgI39VP3DR OrFLnuaW1R2a24OoNBABG+uQqHtxZkBN6EwP0zq+SuvGQqgor/p446gJtzbBjOJCHVIs RdrQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:sender:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=cWur7HMVd8Ke8GikOufYnkHwwFXOwHuL2p1d2EaRZQ4=; b=p3wJe+gE8sI0e7DWW/wiLeX2Txr8ob2EpIkgiGz2P/7vVYAyZshFU4YIdHr2btlPE4 PfFQsDsrbu+M4nezGhWLKz/P8Hmq+VREeLkBB+FlGLxOkMKUMCiU3k81FKW4a5HQjO3U 5D0OVYugO2hA74e8RcgYlcua1a11WLLPZ228fWnbLimC6NxRLh/yUN53RJuYX8LR7deE 6Z/wcalE6+k520oBIFL2KE5ctYpmmQECCDjoyNgztBXCDobKVDuoKfEnmUJxuIzpjMYb J0SqQOC65aPowYomNXRXdkiPP8WuLb2eqdCSz+glIQZC6ZFDm7/OunXmS2xbuvgy9PRj Q5XQ== X-Gm-Message-State: ACrzQf2Hlya0606dEcq0KHpIMIZqJcPz+jYPMCydS9kcTHnVa+Ty/pP8 mNhSEWeNVPp5vLs9y9zU/00= X-Received: by 2002:a17:90a:311:b0:214:143b:c7ab with SMTP id 17-20020a17090a031100b00214143bc7abmr10942799pje.21.1667442695034; Wed, 02 Nov 2022 19:31:35 -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 v10-20020a17090abb8a00b002137030f652sm2147447pjr.12.2022.11.02.19.31.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 02 Nov 2022 19:31:34 -0700 (PDT) Sender: Tejun Heo Date: Wed, 2 Nov 2022 16:31:33 -1000 From: Tejun Heo To: Haifeng Xu Cc: Michal =?iso-8859-1?Q?Koutn=FD?= , lizefan.x@bytedance.com, hannes@cmpxchg.org, cgroups@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] cgroup: Simplify code in css_set_move_task Message-ID: References: <20221020074701.84326-1-haifeng.xu@shopee.com> <20221027080558.GA23269@blackbody.suse.cz> <20221031131140.GC27841@blackbody.suse.cz> <25f6a188-4cc6-dace-1468-fd5645711515@shopee.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <25f6a188-4cc6-dace-1468-fd5645711515@shopee.com> X-Spam-Status: No, score=-1.7 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, Nov 03, 2022 at 10:13:22AM +0800, Haifeng Xu wrote: > I understand your worries. Can I just check the populated state of > css_set in 'css_set_update_populated' and don't change the order any > more? I think it can also streamline 'css_set_move_task' a bit. FWIW, I don't see much value in the proposed change. The resulting code isn't better in any noticeable way. Even if the change were straightforward, the value of the patch would seem questionable. There's no point in creating code churns like this. Nothing is improved in any material way while creating completely unnecessary risk for subtle breakages. Thanks. -- tejun