From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=91.218.175.8 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796444480; b=dB/SnUHLlKB5XAhNOHIFyJhhLd7mo7Q74QWjZkZ0opPNSVerur8GebUyIQNmRxPBFx4X GlbTe+eNdXkN+Nt/WgESG9w8+H4v4pCD3PC/L4210Lagfgs7B7mFbY58/oSzQJyDiQtMF dmY6Hj0n2S/2mcTJd1fYLPIH3wW67zxmIZSpvylX7Wt+stnNXkNmYJimZh00ovm4Nk0KT +/kXT0Gvxgm/zhJbIgmLBQDmQFkm2McInCqVJMh9qvW5B26Ghs5SLrqXwBL9lphb+V7Ew zxpOjNYkUSrAR4qg+MN0P/JJ2Y5EvWHKAE48NR0PGSlqjpu2BaL+4KD+CjRN7Ylb+bg== 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=b4E3CvfHDO8ItAGJLre2T+M115UUxpdOfoWdkRFpa6Y6GZIU0apTodW/koKrcX4D+two sD+GX8GmI3te5Ej1THREnsjzi3b5H9XdNsehDUUVowGaGT/lgcQtfcoOqhhfGbhzijYAl FhnQxWF6iYUUnnKTSNFWipCVs/ugJiRvWqcf54VV22ATJ9L5HnXP7h+zgXnQTTWJk8aAF e/W66lXN9Vy6WKD3ay/rada04tGd0Ej7axguS/nSQ97imOlF8mhmjHADBKvgAI5kbaQQd g9qrCe+sM/DeY+J6E1fT+Nprzr1NDDCWoXeVJqDO7/p10rDtiyFvEFFkwj+/c1jXfag== 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.8 Received: from mta0.migadu.com (out-8.mta0.migadu.com [91.218.175.8]) (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 5C323606A682 for ; Sat, 5 Dec 2026 04:21:18 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 5C323606A682 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: linux-kernel@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: linux-kernel@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: linux-kernel@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