From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (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 4863D3CFF46 for ; Tue, 21 Apr 2026 14:26:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776781563; cv=none; b=Y27Vgwq+uNxy5QuckC1cE5jO87q+YVLP0j8HAu6aSEIxMYHOmflc3NSfrmtpOhcdNVGRxvfUAvB3xRR8MWzndO6UTOMYY/MUTFL7Y2wKUeZ1VZoU+0wr4yKhuzMHpc0SKzZw+95qwdG/WzPPmjik5RVEfdq36g984m49YbjefL8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776781563; c=relaxed/simple; bh=SG9TyVz2FKGn4It97z8qxSOz48ceXBCGCNeEx9UkI/8=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=AfT4aV055/X4/QNQZIr1YoLIkPvZWox+KDx5/C5Y37MbEd58aejOqcBEMTnx+sTqtAzWB2ZmMHwQf0TiPzlvCsGtDDxe4gTjEPeN0wh4JqQ9RWb00SdcrYDMcx267tFsC5zQCboAZ6jg3YFO3O1sixSwhCgM1XYpgoTdGBG5bTc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=Uc6aM+Mw; arc=none smtp.client-ip=170.10.129.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="Uc6aM+Mw" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1776781561; 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=cpQv2nmOkTVoNtTsiQ2DrTic771j3rKCjuGbBpejCvU=; b=Uc6aM+Mw+M1bAILK/qr82kXCzxBjMNWcY/4CsHjmBo5t3Z4MRBHeseqJGral8sQFwL4rfi r+EOz7hdz7xwqgGxIAuHOKBo5h9sH0UUDHhCGv46GYvi6cDFS5m2mmb6b7RjMkddNL3MLT KWozQBrbqa/diQFkhtRZkz8fCMJMFIM= Received: from mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-453-xs3N2oRYOFOjpa-3JwwkQg-1; Tue, 21 Apr 2026 10:25:58 -0400 X-MC-Unique: xs3N2oRYOFOjpa-3JwwkQg-1 X-Mimecast-MFC-AGG-ID: xs3N2oRYOFOjpa-3JwwkQg_1776781553 Received: from mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.93]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 248D51956054; Tue, 21 Apr 2026 14:25:52 +0000 (UTC) Received: from [10.22.81.187] (unknown [10.22.81.187]) by mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 2506C180047F; Tue, 21 Apr 2026 14:25:44 +0000 (UTC) Message-ID: <0281dde0-e00f-4f38-a15a-3ade02ecbb59@redhat.com> Date: Tue, 21 Apr 2026 10:25:43 -0400 Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 10/23] cpu: Use RCU to protect access of HK_TYPE_TIMER cpumask To: Thomas Gleixner , Tejun Heo , Johannes Weiner , =?UTF-8?Q?Michal_Koutn=C3=BD?= , Jonathan Corbet , Shuah Khan , Catalin Marinas , Will Deacon , "K. Y. Srinivasan" , Haiyang Zhang , Wei Liu , Dexuan Cui , Long Li , Guenter Roeck , Frederic Weisbecker , "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 Cc: 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 References: <20260421030351.281436-1-longman@redhat.com> <20260421030351.281436-11-longman@redhat.com> <87wly0bsh5.ffs@tglx> Content-Language: en-US From: Waiman Long In-Reply-To: <87wly0bsh5.ffs@tglx> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.93 On 4/21/26 4:57 AM, Thomas Gleixner wrote: > On Mon, Apr 20 2026 at 23:03, Waiman Long wrote: >> As HK_TYPE_TIMER cpumask is going to be changeable at run time, use >> RCU to protect access to the cpumask. >> >> Signed-off-by: Waiman Long >> --- >> kernel/cpu.c | 2 ++ >> 1 file changed, 2 insertions(+) >> >> diff --git a/kernel/cpu.c b/kernel/cpu.c >> index bc4f7a9ba64e..0d02b5d7a7ba 100644 >> --- a/kernel/cpu.c >> +++ b/kernel/cpu.c >> @@ -1890,6 +1890,8 @@ int freeze_secondary_cpus(int primary) >> cpu_maps_update_begin(); >> if (primary == -1) { >> primary = cpumask_first(cpu_online_mask); >> + >> + guard(rcu)(); >> if (!housekeeping_cpu(primary, HK_TYPE_TIMER)) >> primary = housekeeping_any_cpu(HK_TYPE_TIMER); > housekeeping_cpu() and housekeeping_any_cpu() can operate on two > different CPU masks once the runtime update is enabled. > > Seriously? Good point, will fix that in the next version. Cheers, Longman