From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (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 BF2A743441C for ; Thu, 13 Aug 2026 07:00:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786604427; cv=none; b=dtZ2QlS3tIQp6KIHgsUgREks22v3Ttl7dFWGG9ZRtmBojbAX6tBK5ftP2b8UviY1WDBIklQnsoSj7B1KVmm0bmXQM+suvRXj3n0mGBYAlmmhSq41QoxvWiT7x0/SR6ljWWTkqWfIlb6A8mmzmd56v1wk3grqgHu9FdJNAShp3hs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786604427; c=relaxed/simple; bh=xuIoZQMjo/favbcRVpsqNjAqlS5VxMVn4cmLSjJfnT8=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=aX6znJm0Eaq7rs/oqyokLl8bfIp2XQsqR/pgdBGStp+axVnBCWQzQPzmksfgWwNehLJE/SYl3Wdyigk69x/vzfDJ6SVyko85F0LUoD/AF9NQgwyeVCC/kd90mqaeQKXR5EbnMEOXQWjjvmPpqwyfoAN4iaqHGIcEe6x8bGwUV8U= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=4XPWt7Qk; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=TttDPTln; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="4XPWt7Qk"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="TttDPTln" Date: Thu, 13 Aug 2026 09:00:21 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1786604423; 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=mA5FfAAlnFYwRlMRdEaThA0KWcXmeEChrorbKf/cjYU=; b=4XPWt7QkAL6uY9fpZzrBHmh3fVxVC77KIEVqQKwYoqdMClaIoeSuTLjr4pdRcpbJE0OdK/ U4Udz3simp6Z9a9emywa7XoLgNZFV97m3Ls9ElD3HFy8DsVzMmUc3uwMrgAZ7WzNEj5Iui vhkCtTttgXVEIfq6adIAX2XGKiLiIXXDjyIVxE8iu3xM6NDb9ook3AS1cizp0H0c3Oz6hb BYT7Yh7JqEAyiI+TH39zEy5VYgObcNQT35AlkmsQyYOmMqmweJbQiQqMdGk4bKjOsCHFeN lmcnETjItByyhdNZrTwT2Ixm7WXSrL0+Y6EPSlfO85/blYFvY5Dw+o9TDBjMnw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1786604423; 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=mA5FfAAlnFYwRlMRdEaThA0KWcXmeEChrorbKf/cjYU=; b=TttDPTlnE1Bmo2DhvHLUb8L/mM0rIjnwK5qvAQ2y79+yAAN1jPP6JwLUmDHrxszYDyy0TL P+nHKEPFgiFgqSBQ== From: Sebastian Andrzej Siewior To: "Chen, Yu C" Cc: Ben Segall , Dietmar Eggemann , Ingo Molnar , Juri Lelli , K Prateek Nayak , Mel Gorman , Peter Zijlstra , Steven Rostedt , Tim Chen , Valentin Schneider , Vincent Guittot , linux-kernel@vger.kernel.org, "chen.yu@linux.dev" Subject: Re: [PATCH] sched/topology: Add a cpus_read_lock to partition_sched_domains() Message-ID: <20260813070021.UnPOgnla@linutronix.de> References: <20260812095800.gl06ANul@linutronix.de> <8c36c744-973a-4e33-a72a-eed0cffc05da@intel.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable In-Reply-To: <8c36c744-973a-4e33-a72a-eed0cffc05da@intel.com> On 2026-08-12 20:54:49 [+0800], Chen, Yu C wrote: > Hi Sebastian, Hi, > > --- a/kernel/sched/topology.c > > +++ b/kernel/sched/topology.c > > @@ -3498,6 +3498,7 @@ static void partition_sched_domains_locked(int nd= oms_new, cpumask_var_t doms_new > > void partition_sched_domains(int ndoms_new, cpumask_var_t doms_new[], > > struct sched_domain_attr *dattr_new) > > { > > + guard(cpus_read_lock)(); > > sched_domains_mutex_lock(); > > partition_sched_domains_locked(ndoms_new, doms_new, dattr_new); > > sched_domains_mutex_unlock(); >=20 > Thanks for taking a look at this issue. I found that there is a comment > around > partition_sched_domains() says: "Call with hotplug lock held" > Not sure if the caller of partition_sched_domains() rather than > partition_sched_domains() > should grab the cpuhotplug lock? I guess the issue is triggered when How did I miss that part? > CONFIG_CPUSETS=3Dn, in this case rebuild_sched_domains() will not grab > cpuhotplug lock, should we add guard(cpus_read_lock) in > rebuild_sched_domains() > instead? Let me look=E2=80=A6 > thanks, > Chenyu Sebastian