From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 7669925B094; Wed, 13 May 2026 13:04:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778677478; cv=none; b=ZnXhbKtPenqi8aJSpt0GetKmMoN+Jqu0CWMvOqEMj9CLei5MavoceTI/2WRizZWt7O48gUQ4UTDqP8+FUv0t6WjcxdNJr4StTxnGSC/ltgUJ+WgqBBulbRxoFEpxM35AlwfmNq5ZpJMBIRgCpx/rBMyiZAoe3BzjFTDI3euisjE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778677478; c=relaxed/simple; bh=6LEu9DtzugsPgS9zY7ikDk3PNAySaXFJrErwGthAkfU=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=cDgAuUuuooH4DASttJopd8bADXLyLqxvHBVPZyLYTq2nrja9qkfhzuwy6fXnN6ps821Z+IAaER5vOCYTGmRy7SkIEdT1DlD/Qs5Fe7oetWSG9oD39/CE1OBDK3eTCKMmIigojT7zwfKeX0nb9oFBIGpgkiib9AfabTHsMdix9OA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=lGsDWVW2; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="lGsDWVW2" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9F9F9C2BCC7; Wed, 13 May 2026 13:04:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1778677478; bh=6LEu9DtzugsPgS9zY7ikDk3PNAySaXFJrErwGthAkfU=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=lGsDWVW2oR08PACx9KcRC8YMpUuN6oYYOvoOWllZtScTRbHp7+islHrOswbDz0e1U Rd/2lD7xK6tofxdt3rjsHrXixgEE2cEIam/CmgAPO+rVJ0EqqFFymekAQgAVcROykG /N7UobOXD+QLpx6gmP6NTOmHQYOBi0pny/Bp5nb7yAfX2fzkn+nP5WBB8+35vCpLep jh4Y8TgC1kC/ozfdDPxCBHLqgSPMWYg5w/mYxRbWDqfzsPeOwoBvd1TnZH2MG/F2uI pbR8JRRzktjhwXI6yger0M0d/hUI8h3I7h6ajlUBWmNi8Qu54RVQUXSLuoGBn6Z7hf kXJB84AOZ4pfg== Date: Wed, 13 May 2026 15:04:35 +0200 From: Frederic Weisbecker To: Thomas Gleixner Cc: Waiman Long , Tejun Heo , Johannes Weiner , Michal =?iso-8859-1?Q?Koutn=FD?= , Jonathan Corbet , Shuah Khan , Catalin Marinas , Will Deacon , "K. Y. Srinivasan" , Haiyang Zhang , Wei Liu , Dexuan Cui , Long Li , Guenter Roeck , "Paul E. McKenney" , Neeraj Upadhyay , Joel Fernandes , Josh Triplett , Boqun Feng , Uladzislau Rezki , Steven Rostedt , Mathieu Desnoyers , Lai Jiangshan , Zqiang , Anna-Maria Behnsen , Ingo Molnar , Chen Ridong , Peter Zijlstra , Juri Lelli , Vincent Guittot , Dietmar Eggemann , Ben Segall , Mel Gorman , Valentin Schneider , K Prateek Nayak , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Simon Horman , cgroups@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-hyperv@vger.kernel.org, linux-hwmon@vger.kernel.org, rcu@vger.kernel.org, netdev@vger.kernel.org, linux-kselftest@vger.kernel.org, Costa Shulyupin , Qiliang Yuan Subject: Re: [PATCH 04/23] tick/nohz: Allow runtime changes in full dynticks CPUs Message-ID: References: <20260421030351.281436-1-longman@redhat.com> <20260421030351.281436-5-longman@redhat.com> <87340od7ev.ffs@tglx> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <87340od7ev.ffs@tglx> Le Tue, Apr 21, 2026 at 10:50:00AM +0200, Thomas Gleixner a écrit : > On Mon, Apr 20 2026 at 23:03, Waiman Long wrote: > > + /* > > + * To properly enable/disable nohz_full dynticks for the affected CPUs, > > + * the new nohz_full CPUs have to be copied to tick_nohz_full_mask and > > + * ct_cpu_track_user/ct_cpu_untrack_user() will have to be called > > + * for those CPUs that have their states changed. Those CPUs should be > > + * in an offline state. > > + */ > > + for_each_cpu_andnot(cpu, cpumask, tick_nohz_full_mask) { > > + WARN_ON_ONCE(cpu_online(cpu)); > > + ct_cpu_track_user(cpu); > > + cpumask_set_cpu(cpu, tick_nohz_full_mask); > > + } > > + > > + for_each_cpu_andnot(cpu, tick_nohz_full_mask, cpumask) { > > + WARN_ON_ONCE(cpu_online(cpu)); > > + ct_cpu_untrack_user(cpu); > > + cpumask_clear_cpu(cpu, tick_nohz_full_mask); > > + } > > +} > > So this writes to tick_nohz_full_mask while other CPUs can access > it. That's just wrong and I'm not at all interested in the resulting > KCSAN warnings. > > tick_nohz_full_mask needs to become a RCU protected pointer, which is > updated once the new mask is established in a separately allocated one. How about just dropping tick_nohz_full_mask that is just ~housekeeping_cpumask(HK_TYPE_KERNEL_NOISE) which itself is becoming RCU protected in this patchset? Thanks. > > Thanks, > > tglx > > -- Frederic Weisbecker SUSE Labs