Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp474169imw; Thu, 14 Jul 2022 05:10:23 -0700 (PDT) X-Google-Smtp-Source: AGRyM1sriVWYofR8OCpkEKcz3lY1s66KfPTKpzrd5TzYq+6fd8pYYDENyZwLCpLA0VG7zVrxB0Xn X-Received: by 2002:a05:6402:270d:b0:43a:d1e8:460b with SMTP id y13-20020a056402270d00b0043ad1e8460bmr11679984edd.40.1657800622877; Thu, 14 Jul 2022 05:10:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657800622; cv=none; d=google.com; s=arc-20160816; b=SIRC12aEovL5GYfXACxYFCkYvIHld3NI0odEEaAmuOHypCbcoMj8ylygI0KC5ynkE4 pfPCPGrsUm4PRMlrKQsSNyO071Jh1YPfZZKhA/OvKPLNHxMH5VTBzYpFs1L5G0ULzM1i LED0NGRV+iz4IUdmEnFzfEHRjfiFjCs05H4rFPnbKZL/7iGwWOLQGk/HqQ26+xOKj6q7 M+mFGiA+eGonQWDky6cgBpsnDw96XXWgM9P+8TtEUDHbzV824Q1S6hd4oe7jQDCqDzAX 6qhp65n0Sh8JAiO8j2az0B8XN1OfwvBOKsd505DtA56jPVnlR4gLBT00zZwLqQtDSKof KdGA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:references :in-reply-to:subject:cc:to:dkim-signature:dkim-signature:from; bh=XN6FukeOkgwZ5eOLCbkFNEc5JFvPVvJVxrDFWQ+otX8=; b=GeHknS06fzllI8I/it1II0OVotQ930D0azr2yAsXn+kNeyf+LLVNKAz3+bf0jurwte 9SkaAfGPWvuSupPZ88UebbY9wHDEiABG/PJTL4FbF/HOQqXQdS6o6+p2ArYpk6vwVrS4 RIuL7oaxOuChZk+irQYDfw+EpLTPb+kPyxwo4Yps5T3SBowINUpNCvvHhIJY6CELynmf Kj0b7aXr6mwGS1HetWrONGfjUGKmL/mC1SJwC/5VFzyyl2Sb+pSDY3cIaIme+Q33Qrcv sajyQ0HURpqzaIExE97Wvf74Tute0k1Vcp0x5JQbWjRh2a2hm2OPi7SHolFZfxbOOk8D O1/w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=sMwnU3qb; dkim=neutral (no key) header.i=@linutronix.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c5-20020a056402120500b0042ddac25209si1714315edw.92.2022.07.14.05.09.56; Thu, 14 Jul 2022 05:10:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=sMwnU3qb; dkim=neutral (no key) header.i=@linutronix.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238370AbiGNLql (ORCPT + 99 others); Thu, 14 Jul 2022 07:46:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59672 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229666AbiGNLqk (ORCPT ); Thu, 14 Jul 2022 07:46:40 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E428A5A44B; Thu, 14 Jul 2022 04:46:39 -0700 (PDT) From: John Ogness DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1657799198; 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: in-reply-to:in-reply-to:references:references; bh=XN6FukeOkgwZ5eOLCbkFNEc5JFvPVvJVxrDFWQ+otX8=; b=sMwnU3qbV+b8Wv2npTUlOowTXHkY1kWpGzJfAqV4YVCJxANkFKt2Si4xHbZdVHZmuQ8oNd 0x/jdFnyZincBOLrzM1oqLSJBHgn1DYRWvk7MCje7WFxNFhMjYBOPe2JkfTfO4bFmPBP93 H92QNpoVphfL8nB7nJSC06WTQrcnw51Xto2dctxivEN+iqpNKo9LyeD+O4Fwr/6fa9FGSP KOEMf+e1sWH0jpaQ1xDrvs7pvx/gL/1BTqEPlb7aXuoeQkxN9slCWb9gH+VAmqWfjpji0K ENKsk3azHFWeIvxULM6tLdAjLSDP0Rr8cMblLbJk5Hkn+h+qmYSb5EvKusB8aA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1657799198; 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: in-reply-to:in-reply-to:references:references; bh=XN6FukeOkgwZ5eOLCbkFNEc5JFvPVvJVxrDFWQ+otX8=; b=EAOmilPMjV1ZoGyEoz8L/+yBYppgRVe56A9R2WG/mK2JtxNdpcOdFw9/KgUqfs0QaPEN2A ZlsaAKbdwL/2b0Bw== To: Zhouyi Zhou Cc: Michael Ellerman , Benjamin Herrenschmidt , paulus@samba.org, Nicholas Piggin , ldufour@linux.ibm.com, pmladek@suse.com, Julia.Lawall@inria.fr, linuxppc-dev , linux-kernel , lance@osuosl.org, "Paul E. McKenney" , rcu Subject: Re: [PATCH linux-next] powerpc: use raw_smp_processor_id in arch_touch_nmi_watchdog In-Reply-To: References: <20220714013131.12648-1-zhouzhouyi@gmail.com> <87tu7k6o7n.fsf@jogness.linutronix.de> Date: Thu, 14 Jul 2022 13:52:37 +0206 Message-ID: <87pmi77w82.fsf@jogness.linutronix.de> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-3.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,INVALID_DATE_TZ_ABSURD, RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2022-07-14, Zhouyi Zhou wrote: > Thank John for correcting me ;-) After looking more closely, I do not think disabling migration is the correct fix either. The per-cpu variable @wd_timer_tb is written from 2 functions: - watchdog_timer_interrupt() <-- irq handler - arch_touch_nmi_watchdog() <-- called from preemptible Since watchdog_timer_interrupt() is called from irq context, I expect that interrupts need to be disabled for the update in arch_touch_nmi_watchdog(). Perhaps a using a per-cpu local_lock_t with local_lock_irqsave() to protect write access to @wd_timer_tb? John Ogness