Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp608482rwd; Thu, 8 Jun 2023 05:33:49 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7J+7owp3wWtwqpCcf4RoT6xtZA9+XlOXyGMI7oQWvOEhPNWz5bButjhSbehMOQ6HgzIay7 X-Received: by 2002:a05:6a20:9189:b0:112:1e0d:14ae with SMTP id v9-20020a056a20918900b001121e0d14aemr6965701pzd.7.1686227629534; Thu, 08 Jun 2023 05:33:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686227629; cv=none; d=google.com; s=arc-20160816; b=UXYgzs5y/wPq2b4wI6CL2dcLXv8uqrnZevRErdx33mLHyUQ9fDcIr07qOcmK37/bOm vn6qhRML3lEvZykCk+lLf09CaScxVNgp/QsFnTI1R/D1ASQo9GmoYZi0FGBIdiS7kbfN xnE3bXdTcwSniaJD2vdNIE7r4p9foaupGAmjSCXFRKtw2nWth88ZLJLBGecZd3/tg3AA +nWyP+S03MqVAyo5b3/EYPbImJJuhSMwVWZEoXn8GLJIs8h4IN5+02RFe5vGLIkVbIcq aquvIXDMFgVnhWorbQ6HLp3PALDyKiV9qRgb7T0HGaQ3PGE6W6cu5bnQWxBHMkdcgVIH HVHg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=j6zJ80tFIxXTVHRh/16qEQREsJv1j4C9vyoJ2KH4/8c=; b=kZP11JSJlHOvuPKmztPL81vSOD7kPn9JhvrMG5hJk71kkPLm7GQsXHG/LKVAjQs6hb 6bfbFlYMr5hIyZOHNWIvGqI8nVRtPHQADa67JWpOI7NgbNPd74aDyIE9FmTn52NbbPQs bH2e/u2uzkyD2jdeF8cOzLPSrbva1Zj+RgArE/0OZMHdZAYcNhvAaL7IX2S1j0rh2C3v AUXXRcRTZzkzhl37ly0+/41pDU9sj7NDuiin94URzcAvcc7cIAXhYiv8P0p1+DOHiJpt REg6auALyhkYQYbHc11evnpfawBRc2sxByYpkd9kt9hO2SqbubcQXmFT1WY8kWHtx4cg s4/w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Jn5R2nPh; 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=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id v189-20020a6389c6000000b0051b70b1f1f5si916408pgd.608.2023.06.08.05.33.37; Thu, 08 Jun 2023 05:33:49 -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=@redhat.com header.s=mimecast20190719 header.b=Jn5R2nPh; 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=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236189AbjFHMXF (ORCPT + 99 others); Thu, 8 Jun 2023 08:23:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45204 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235563AbjFHMXD (ORCPT ); Thu, 8 Jun 2023 08:23:03 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B724710FB for ; Thu, 8 Jun 2023 05:22:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1686226933; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=j6zJ80tFIxXTVHRh/16qEQREsJv1j4C9vyoJ2KH4/8c=; b=Jn5R2nPh9iQOJlcDo96TKO5iBp4pLvftcS104teanOLKIDwjIEr9JRwQBSuLKHkaBL0Uy3 isenmNh5JyTO6jHMlMC5Txfq5YWv07OKOiWKBGm0jfcjbtnIXGJNS7XXMi+eoq2RUfHL9y rjMyQtPXsLCvtrrFDnoYwzozK9QiEXI= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-552-GWZMmb5uNSyfOTz4Eqrylw-1; Thu, 08 Jun 2023 08:22:07 -0400 X-MC-Unique: GWZMmb5uNSyfOTz4Eqrylw-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 03CDA3803512; Thu, 8 Jun 2023 12:22:07 +0000 (UTC) Received: from [10.22.8.251] (unknown [10.22.8.251]) by smtp.corp.redhat.com (Postfix) with ESMTP id 547E0C1603B; Thu, 8 Jun 2023 12:22:06 +0000 (UTC) Message-ID: <7ff8c948-c5e2-ac5b-6633-8583b8cb75fe@redhat.com> Date: Thu, 8 Jun 2023 08:22:06 -0400 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.7.1 Subject: Re: [PATCH] cgroup/cpuset: Fix comment in cpuset_hotplug_workfn Content-Language: en-US To: suhua , lizefan.x@bytedance.com, tj@kernel.org, hannes@cmpxchg.org Cc: cgroups@vger.kernel.org, linux-kernel@vger.kernel.org References: <20230608085439.27501-1-suhua.tanke@gmail.com> From: Waiman Long In-Reply-To: <20230608085439.27501-1-suhua.tanke@gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 3.1 on 10.11.54.8 X-Spam-Status: No, score=-2.2 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE 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 On 6/8/23 04:54, suhua wrote: > "synchronize cpus_allowed to cpu_active_mask" > -> "synchronize cpu_active_mask to cpus_allowed" > > Signed-off-by: suhua > --- > kernel/cgroup/cpuset.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/kernel/cgroup/cpuset.c b/kernel/cgroup/cpuset.c > index b0aee733b92b..4810d29e2d63 100644 > --- a/kernel/cgroup/cpuset.c > +++ b/kernel/cgroup/cpuset.c > @@ -3739,7 +3739,7 @@ static void cpuset_hotplug_workfn(struct work_struct *work) > if (!cpus_updated && top_cpuset.nr_subparts_cpus) > cpus_updated = true; > > - /* synchronize cpus_allowed to cpu_active_mask */ > + /* synchronize cpu_active_mask to cpus_allowed */ > if (cpus_updated) { > spin_lock_irq(&callback_lock); > if (!on_dfl) The comment is a bit outdated. The synchronization is only meant for cgroup v1, but it is correct in this regard. We are matching cpus_allowed of top_cpuset to cpu_active_mask, not the other way around. Cheers, Longman