From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) (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 C0FCB3F0AAA for ; Tue, 28 Apr 2026 11:50:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=90.155.50.34 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777377027; cv=none; b=flJjcZWupkXpGBuvGF6T6lc0xcMz9DFyjQzVtLrwB9E9pkLzjUT+inwZqFXD8Pc9NWfE5mv/J0yTciVbZ9zhOPEg4D5Y+84KbnN06MUJ5Ubr8KiTsN2KKF0TPLluKIusbag2rfwfCpthGfMYjP9gVTdGnoO7RKa75hyLjo+aDSs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777377027; c=relaxed/simple; bh=0X45F1TVCd9A35hw3cl5xl45MAcLq8U9DCzJ2519Yaw=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=pcJMZkIRLkBWzB4zWaJ+0QZGjANV78m53EDpdoEJBv+pG1fGHN1J8pzUj0et0CD2BtILmA0flK1hzypoMXJLoRD1veyPk6LKRzlzu0lVvFTwvk6yUAZkzZSuGlQblE2n4IgZZTXVNBreGTCVF+mPsbROXig00BaZh6Bcevm2CQg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=infradead.org; spf=none smtp.mailfrom=infradead.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b=rVHuLlrh; arc=none smtp.client-ip=90.155.50.34 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=infradead.org Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=infradead.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="rVHuLlrh" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=S5QTO1ykjGqVm4ab88xijSh9Y1FzdJm11lMsmI+hI0U=; b=rVHuLlrhXQAu/boCYbjyOfXDtY 3Tc5oNu/tT8TNeA6wlY9U4FjqHduL4WlwJpezMb3RYUVdjcssKpAyWu0RJ0Ryw9y9dcumgrfP5xz1 7f9gVoJgG4wb619bpuI3s3ijEwRr/WUbSHX71zb1Rr6ccA8GkkxvvI1W/6ds6wi1BdWjqmxMhsnnz ZfEP/Jy2dwpCN0kME9LvsILWrDLynPhARHgqgC+4bx39Nf0dFQEvRZJGCAsdMb7L9hB4O2EK9VM4x vixQBe8/2PDoZJQ78OYF8DHffSLjvQWs6nwioOmoViIWheb46Dvpecd6xGjX7pWI1+4y+nukupHt8 cJN0WX9g==; Received: from 77-249-17-252.cable.dynamic.v4.ziggo.nl ([77.249.17.252] helo=noisy.programming.kicks-ass.net) by casper.infradead.org with esmtpsa (Exim 4.98.2 #2 (Red Hat Linux)) id 1wHgxG-00000003kCf-0bqz; Tue, 28 Apr 2026 11:50:18 +0000 Received: by noisy.programming.kicks-ass.net (Postfix, from userid 1000) id 283E9301CEB; Tue, 28 Apr 2026 13:50:17 +0200 (CEST) Date: Tue, 28 Apr 2026 13:50:17 +0200 From: Peter Zijlstra To: Andrea Righi Cc: K Prateek Nayak , Ingo Molnar , Juri Lelli , Vincent Guittot , Dietmar Eggemann , Steven Rostedt , Ben Segall , Mel Gorman , Valentin Schneider , Christian Loehle , Koba Ko , Felix Abecassis , Balbir Singh , Joel Fernandes , Shrikanth Hegde , linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/6] sched/fair: Use guard(rcu) for sched_domain RCU sections Message-ID: <20260428115017.GW3102624@noisy.programming.kicks-ass.net> References: <20260428051720.3180182-1-arighi@nvidia.com> <20260428051720.3180182-2-arighi@nvidia.com> <0882ce78-a51f-4317-a1b4-624e39e65507@amd.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=us-ascii Content-Disposition: inline In-Reply-To: On Tue, Apr 28, 2026 at 12:43:22PM +0200, Andrea Righi wrote: > > and since this is only called from: > > > > sched_tick() /* IRQs disabled */ > > sched_balance_trigger() > > nohz_balancer_kick() > > > > with IRQs disabled, we can get rid of that rcu_read_lock() entirely. > > Yeah, all makes sense. I'll update the patch dropping rcu_read_lock/unlock() > completely. > > Is it worth adding a lockdep_assert_irqs_disabled()? I think the rcu_dereference_all() thing will go scream if it doesn't have any of IRQs/preempt/rcu disabled.