Received: by 2002:ab2:6203:0:b0:1f5:f2ab:c469 with SMTP id o3csp2679410lqt; Mon, 22 Apr 2024 19:53:46 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVAja3cBiVkJMQOR1t8r6tYbFU0WDaewLkJkWwWCrKHMCmP717caunjTukY8SFxWjJFIdros6NcdIPh3HRlJ0CoOMpFciJFbre3IZ8RFA== X-Google-Smtp-Source: AGHT+IF3bhVagrwT1BlzCu/BP4kBxkX1ZXmQvj7VKCHpQyZC2kXsU8rJ6zMRZ3+wRxcwqkoFtiw9 X-Received: by 2002:ad4:424f:0:b0:6a0:5aaf:7486 with SMTP id l15-20020ad4424f000000b006a05aaf7486mr13735427qvq.56.1713840825931; Mon, 22 Apr 2024 19:53:45 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713840825; cv=pass; d=google.com; s=arc-20160816; b=hOjMP8TXMmNxC6wFNtnUzlGfJH7drRAP9n+XtEN730FOuTGrXQgC63isOekJRHJbxx oDrLNFPFLqoU5u31NVkeVqvehTMHNehvUMQR1WUMsPpWfXJczQqNkYngaNyHXoJLQ2JH lVHH1EN74CzJvq841zT1/Katzyt4u8frP2glSpn0nBPt/ONNElCw9oHCHiRhdT4nKaOk uxEQ9aJ4mMxXCslj89c0rhQO1THLw+rIK2FQ4MdSBkh+ZMQdKkP8G2uVzCr5zwsfNsoK 513stj6kIR418d/96dQ21DdomK6HJkz50TltJ5o09tQGs+Y40ItXNjMWWnaY8tfCanjn WZFw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=vHHK5+Fqa6ZKdYDjyl4I1FINs9qOnFj81l/KGssjU38=; fh=H4UMJDtxejWT8MoSRyTn71QzRR5CrCcXuRBwqCo5b8s=; b=ocrv97KdqXjEAfRAMU9lvTWHyh5GxY+d2oJ9syy/najMINOiRtmVmixVUXwbHt0Ghc LFavzD1QbwRpnI6rsYgfky0yVTFhW6ghmKA0bnzeMhz6aGTo99x1G4ADJvBr7vboSwSF u8CReP4lxEy+gXzoTnSxEGcv9PrvneQMeo9lu+GdG3+k/Q+0xBFmrBaiA23XufJ484Gb V2VVSZSZvz2yBKZKf0MvbjBmR/fZG3yZsuyQIO8KR9UzWto2he4iWi91YeiC7P6EDrvB Uw4qXuQhmV6GoynOjFeL+WVNX3vcEXyT4RnK6rBoDyodbh1iqV4W48mqVFzfUAm9HNXT /qbw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=S3Jy6hV7; arc=pass (i=1 spf=pass spfdomain=redhat.com dkim=pass dkdomain=redhat.com dmarc=pass fromdomain=redhat.com); spf=pass (google.com: domain of linux-kernel+bounces-154435-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-154435-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id iv7-20020ad45ce7000000b0069b71ceff38si12271044qvb.278.2024.04.22.19.53.45 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Apr 2024 19:53:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-154435-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=S3Jy6hV7; arc=pass (i=1 spf=pass spfdomain=redhat.com dkim=pass dkdomain=redhat.com dmarc=pass fromdomain=redhat.com); spf=pass (google.com: domain of linux-kernel+bounces-154435-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-154435-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id A7DDD1C215BF for ; Tue, 23 Apr 2024 02:53:45 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id ED89918659; Tue, 23 Apr 2024 02:53:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="S3Jy6hV7" Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7917517BD2 for ; Tue, 23 Apr 2024 02:53:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713840818; cv=none; b=GXXFzWmqN0d5BD8mEX4Qyvj8zCvm/BQ8oAQYfpI8lkxfbivuiA3o1XczWgp05DM4TmPiDygDv3lBGgAcwaLW0ol5j+rv7W5igTqpxUjs5jNbaBxVn+pszgmM/rUIKefCb7ZrKqV1BWQxeZteHlxqv2Rlb0q4v02l9cpXbg/8hdQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713840818; c=relaxed/simple; bh=hUy2NwK4SfQ20dn+seKulwjQP7VZkvebQQGsFBI5Nhs=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=IBmjI2hHiAiBxjZ1MNtK7mnGYzZqL9OjvF7EVlVEHGNLcnskBPC5UnPf52nPGXXIH+kBe1GKC1jwFCV63dyXq2ZLdot3M/sE4vR1aAedz4jidGFoyoopZKiraMC8V6B3ci4iVujMlKALsbKExV/FKKHxrTYyp99ibjDZeDpqAzY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=S3Jy6hV7; arc=none smtp.client-ip=170.10.133.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1713840815; 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=vHHK5+Fqa6ZKdYDjyl4I1FINs9qOnFj81l/KGssjU38=; b=S3Jy6hV7CIhvAau0bZpYusjK7Bxl5uRKqsKWgsIuIXo+5lnunbQUMan4ByilA7xEPaV9Ub qywcNX3hXYvpaakZpVi5bV2uSvMHIrkcZqJU2HEJROUpSRy8SKUYQ6gC6We1M1f1/RWuGJ Axzv3AFRsW4Xhf6x8WtT+mQbN3eE8tQ= Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-424-GyatvBUCNXakD_kWV3bhqg-1; Mon, 22 Apr 2024 22:53:31 -0400 X-MC-Unique: GyatvBUCNXakD_kWV3bhqg-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 6DDE3382C469; Tue, 23 Apr 2024 02:53:31 +0000 (UTC) Received: from [10.22.32.240] (unknown [10.22.32.240]) by smtp.corp.redhat.com (Postfix) with ESMTP id DA80E2166B32; Tue, 23 Apr 2024 02:53:30 +0000 (UTC) Message-ID: Date: Mon, 22 Apr 2024 22:53:30 -0400 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2 -next] cgroup/cpuset: Avoid clearing CS_SCHED_LOAD_BALANCE twice To: Xiu Jianfeng , lizefan.x@bytedance.com, tj@kernel.org, hannes@cmpxchg.org Cc: cgroups@vger.kernel.org, linux-kernel@vger.kernel.org References: <20240423024439.1064922-1-xiujianfeng@huawei.com> Content-Language: en-US From: Waiman Long In-Reply-To: <20240423024439.1064922-1-xiujianfeng@huawei.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.6 On 4/22/24 22:44, Xiu Jianfeng wrote: > In cpuset_css_online(), CS_SCHED_LOAD_BALANCE will be cleared twice, > the former one in the is_in_v2_mode() case could be removed because > is_in_v2_mode() can be true for cgroup v1 if the "cpuset_v2_mode" > mount option is specified, that balance flag change isn't appropriate > for this particular case. > > Signed-off-by: Xiu Jianfeng > > --- > v2: remove the one in is_in_v2_mode() case. > --- > kernel/cgroup/cpuset.c | 5 ----- > 1 file changed, 5 deletions(-) > > diff --git a/kernel/cgroup/cpuset.c b/kernel/cgroup/cpuset.c > index d8d3439eda4e..bb9bf25889c9 100644 > --- a/kernel/cgroup/cpuset.c > +++ b/kernel/cgroup/cpuset.c > @@ -4051,11 +4051,6 @@ static int cpuset_css_online(struct cgroup_subsys_state *css) > cs->effective_mems = parent->effective_mems; > cs->use_parent_ecpus = true; > parent->child_ecpus_count++; > - /* > - * Clear CS_SCHED_LOAD_BALANCE if parent is isolated > - */ > - if (!is_sched_load_balance(parent)) > - clear_bit(CS_SCHED_LOAD_BALANCE, &cs->flags); > } > > /* Thank for the v2. Reviewed-by: Waiman Long