From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=91.218.175.9 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796444480; b=KM/E9Nkz15UReU9IS4caks72GSO7DCPKOcmxJSx1gLmTDr5SyeveaDYtGEahosPSWs+Z x8lwVFxOYxwHFu6SlFH2aLqldqE7FCifzDs+3oLiA0Dn99M6FuNcRvrfurGQButGf1SFa xdqLswKGPktW5l+u4RQEsczrX1JDqLyXLb6zIdWvU33D0wcYMfUYMZezOzlqCwEYmegAG m+vD7/oK1KLuYJJPSUjpDSzfy3pb+aTwLQ4Dnpms3GhV4FmlyX3Rb3Z5HkKfhfPHz8ZOK D8FhwBcgfck0zCYeDlFrO1jA87RowtFUI31rbFPyaHQWXWk1i+0o9Pr6iNWkgXL/syQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796444480; h=DMARC-Filter:X-Envelope-To:DKIM-Signature:X-Envelope-To:Received: X-Mizu-Trace-ID:X-Migadu-Flow:Message-ID:Date:MIME-Version:User-Agent: Subject:To:Cc:References:Content-Language:From:In-Reply-To: Content-Type:Content-Transfer-Encoding; bh=5AOfh0HDxgo3qXLnmnpXS27JxY1CYMA/M8gvBqO3Pr0=; b=xPNXlRvPW0v1SrrwErLraDPwCSyr21odXHRxVtPXK/nxNEpk7tjk/mrRJ9FRwmI7JpqZ BP6pGgx5azzEnK92J4MbydCq/F32EIue+JoWL0hD1+95Rqqs8Zjgo3IfOFgGL7WH3NXYC 2EhQh6hSktG2PcH1SIcoAPnXTgea7cq01GK6fZcXbVpZ0Y/gbhPmYqr+CZBAZH1Mdy1AZ HXijpRbwo1kSPlYDK/CAvPIH8z/nxGfxMtot0Sq3qWKbZPbdy0DlCFFfW2emd8NgXdDCm aStnBKBgo7T5mEW2ngzKlX5ph6TqhiIel1oh8jBOqfmn/4A6DwE6TxapxBnxWwzCqzw== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass header.d=linux.dev header.i=@linux.dev header.a=rsa-sha256 header.s=key1 header.b=THdV89HH; arc=none smtp.remote-ip=91.218.175.9 Received: from mta0.migadu.com (out-9.mta0.migadu.com [91.218.175.9]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 79A05606A683 for ; Sat, 5 Dec 2026 04:21:19 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 79A05606A683 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key, unprotected) header.d=linux.dev header.i=@linux.dev header.a=rsa-sha256 header.s=key1 header.b=THdV89HH X-Envelope-To: cgroups@vger.kernel.org DKIM-Signature: a=rsa-sha256; bh=YlgauoTZ0GgMXDsaYSyi9L4pxP/T8ynZqGnk+qNpAxY=; c=simple/simple; d=linux.dev; h=from:to:subject:date:message-id:mime-version:content-type; s=key1; t=1796444477; v=1; x=1797049277; b=THdV89HHeT5g95gyVUlqBka66DlyUXwiSkdcMbHjGBHY9TQI5a5UobDtxzyfZdMwW8T+kRR0 VrReJkpeqE1ok8je0a9YCBoqpmeq1Vrsy+cWD/+fKfm61buTf04g4pjgrAGIjijeRLlREY88v6V kPRJQUX0S8LVWNZjc10Naykk= X-Envelope-To: cgroups@vger.kernel.org Received: by smtp.migadu.com with ESMTPS id 1e9b75c47e7f5e64; Sat, 05 Dec 2026 04:21:17 +0000 X-Mizu-Trace-ID: 1e9b75c47e7f5e64 X-Migadu-Flow: FLOW_OUT Message-ID: <3df27172-1b43-4bda-b105-cc9e23ecae54@linux.dev> Date: Sat, 5 Dec 2026 12:21:10 +0800 X-Mailing-List: cgroups@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v6 04/12] cpuset: use partition_enable() for remote partition enablement To: Ridong Chen , Waiman Long , Tejun Heo , Johannes Weiner , =?UTF-8?Q?Michal_Koutn=C3=BD?= Cc: cgroups@vger.kernel.org, linux-kernel@vger.kernel.org, Ridong Chen References: <20261129024431.2485721-1-ridong.chen@linux.dev> <20261129024431.2485721-5-ridong.chen@linux.dev> Content-Language: en-US From: Guopeng Zhang In-Reply-To: <20261129024431.2485721-5-ridong.chen@linux.dev> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 在 2026/11/29 10:44, Ridong Chen 写道: > From: Ridong Chen > > Now that the partition_enable() helper is available, replace the > existing implementation for remote partition enablement with this > centralized function to unify the enablement logic. > > As partition_enable() also sends the partition change notification, > update_prstate() may notify again at its end. cgroup_file_notify() > rate-limits the notifications, and the one in update_prstate() will be > removed later. > > Signed-off-by: Ridong Chen > --- > kernel/cgroup/cpuset.c | 13 +++---------- > 1 file changed, 3 insertions(+), 10 deletions(-) > > diff --git a/kernel/cgroup/cpuset.c b/kernel/cgroup/cpuset.c > index 7efec768f212..895e8aa455c1 100644 > --- a/kernel/cgroup/cpuset.c > +++ b/kernel/cgroup/cpuset.c > @@ -1731,8 +1731,8 @@ static void partition_state_update(struct cpuset *cs, int new_prs, > * Transitions a cpuset to a partition root, only for v2. > * It also supports the transition between root and isolated partition. > */ > -static void __maybe_unused partition_enable(struct cpuset *cs, struct cpuset *parent, > - int new_prs, struct cpumask *new_excpus) > +static void partition_enable(struct cpuset *cs, struct cpuset *parent, > + int new_prs, struct cpumask *new_excpus) > { > int old_prs = cs->partition_root_state; > > @@ -1919,14 +1919,7 @@ static int remote_partition_enable(struct cpuset *cs, int new_prs, > if (err) > return err; > > - spin_lock_irq(&callback_lock); > - partition_xcpus_add(new_prs, NULL, tmp->new_cpus); > - cs->remote_partition = true; > - cpumask_copy(cs->effective_xcpus, tmp->new_cpus); > - spin_unlock_irq(&callback_lock); > - cpuset_force_rebuild(); > - WRITE_ONCE(cs->prs_err, 0); > - > + partition_enable(cs, NULL, new_prs, tmp->new_cpus); > /* > * Propagate changes in top_cpuset's effective_cpus down the hierarchy. > */ Reviewed-by: Guopeng Zhang Thanks, Guopeng