From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wr1-f44.google.com (mail-wr1-f44.google.com [209.85.221.44]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 73AA53B27C5 for ; Mon, 23 Mar 2026 15:58:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.44 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774281504; cv=none; b=RHKYKaTjVnr4MndzTCw4QWdoQE12a3WJcU7OkA1gqCA+VhREnTnWLXHNl+X56lggYmonANwt6leInoZ/zC7c2evi/iZ9bKgldgziUzoUewiSEF/BglaJTc9KmyXug0Rzp8F/3why5ZUfWOeKfdfEoQzCkkjkI7zysGlTK+Btt00= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774281504; c=relaxed/simple; bh=SIjbg6eQXOuP0jmqsWy91IC/EBDBEn/9XloeItaVU68=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=G/qo7EHHXKdsYpEhVOgZWeBvZ7UfafFPkkZlPbNwr8RmlygTRkWYvfqWramxE+AGaH/X4X0yqbgwzW/neV+EKCjIjd8oyq0rjM6CK/z1djNud21mIdXBgg1p1gzU8oK3eNGzaQEGZbbF6DEMqjGB3PrXg4bnXhWYxAy3k7K2/o8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com; spf=pass smtp.mailfrom=suse.com; dkim=pass (2048-bit key) header.d=suse.com header.i=@suse.com header.b=cgHXN7np; arc=none smtp.client-ip=209.85.221.44 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=suse.com header.i=@suse.com header.b="cgHXN7np" Received: by mail-wr1-f44.google.com with SMTP id ffacd0b85a97d-439b611274bso2429089f8f.3 for ; Mon, 23 Mar 2026 08:58:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1774281502; x=1774886302; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=8zPvozvDLJbXtRtO+DHPg5/yA/CXI1wJZEDcBqH6tn8=; b=cgHXN7npgAa66dLMAJomcLstkLy5RwlIwYGHigdgK/tyGfVYeJeYv3XlzNpAwSDwCT Jphw/S2X+aS8Ne1+/5Z6iG1+vRZTEB/L/R8ivUz0h3ZfoCKnSLBW8YdZLWklN7I1JBCS wP/sY/SJ30kwrZCr7OAOyT5mc1fPOCtOYnIQuaTfTiH7b5qOS3nWDb/fKZ5gmMNYna/j iLaqX8w9RgYC7MXS8zFJf/PRl2zjjC8j5w8NMeSIruq4X00LkbPwsLobFqkON40F2Sfk naqy3xbO/hzb3KGGXZczqRfFwE58zDHJrioLvrUHPIMuU/tO0VqF3S8lHdS72/EryZGg 2wig== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1774281502; x=1774886302; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-gg:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=8zPvozvDLJbXtRtO+DHPg5/yA/CXI1wJZEDcBqH6tn8=; b=QAGURwVsUgjLSpMxt+gab3tEnLy7hP+zrYpxoU6HVGz3h43lTs/JcLdk1FDiLunpdA RUqsOVLikf902vOQQWOicbD0DgI72nprg6kODze8y3htce0n935F3gEU1iPd1F71tSsY TQhdmqeqecDXZ6xZgk//otrUQ8Cd9W/+Q/A5Gp9j5uIKdl/d3HpkhwogUii8GBT0hKhU mQiDKH3uC0ETotURCgJs/Z+3ZbIW8r2io00+StsrUo1gLUGXfceQSDTPTba6/fMxIfD9 yuDVl38BP5BiRMWkK4KV9lCydYPF9W1zQaNR0VTPyjgF6PNg2prlhrRwXR64EwdExV6x Hybg== X-Forwarded-Encrypted: i=1; AJvYcCUZ3EGFCRlNbi3bS3VtAiveulku2OVqXDT2j6VY0rxcu7iJFdQHJkYU91GnDUvrufQS2vkLXzjrl6QhnSI=@vger.kernel.org X-Gm-Message-State: AOJu0YxIJou4zTmL7y+CtQxC+Sh7fGr3dLAdKWzAG6t//Go+R6wrIChY 5dAvA14N/LGM8piilyOGB8YJlwy/tWubPLS2BRSfZCdCKbHQqi8bNdcNCHgHjfE2kHA= X-Gm-Gg: ATEYQzyKUc8MWnUpFshW5t+bk0Dry3SR8HkzMl7p9LAVVlTjsS2VkEJ/ZH5DR2dAFjn alGUtSq1pZ2GDXiDkiu/psFwmNNgsjd8NwXBvkztf3I8xVGP5MK5iONXGycLG43XdflALNn5bEe Kzcl1sh4+PzUjRuDS9aHxrnJydyYDCPlwlNOXAqCIwAwx/9P5FiC7vFgT8FEq2e0IYlnNfNH69A HhLhzQYJW/Hq9RX3VZtY3gOvAyXHiYQawHLUJ7EVzF69NoplIgw7kWVP18ac6w7tTSSSUT4heJu LbJ61jjmNyoeDS7RPvXwxdpg+YmutZmVf0K3V3GtzDA61D25AYEJSymH4YovJhSPCSH2umVFgeq TcepDvVpVoW0EtjhZ/pldH8r1sgDCCxs89lnEUjTwhif+XwLiS2XhxBVEUYAOE3+S04Dz3cAgGN IcyygIkkP8v+OaHmWq4/HE0k16iA== X-Received: by 2002:a05:6000:2302:b0:439:b339:7ee8 with SMTP id ffacd0b85a97d-43b64244554mr19220543f8f.21.1774281501697; Mon, 23 Mar 2026 08:58:21 -0700 (PDT) Received: from pathway.suse.cz ([176.114.240.130]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-43b646b0b0csm29070120f8f.15.2026.03.23.08.58.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 Mar 2026 08:58:21 -0700 (PDT) Date: Mon, 23 Mar 2026 16:58:19 +0100 From: Petr Mladek To: mrungta@google.com Cc: Jinchao Wang , Yunhui Cui , Stephane Eranian , Ian Rogers , Li Huafei , Feng Tang , Max Kellermann , Jonathan Corbet , Douglas Anderson , Andrew Morton , Florian Delizy , Shuah Khan , linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org Subject: Re: [PATCH v2 2/5] watchdog: Update saved interrupts during check Message-ID: References: <20260312-hardlockup-watchdog-fixes-v2-0-45bd8a0cc7ed@google.com> <20260312-hardlockup-watchdog-fixes-v2-2-45bd8a0cc7ed@google.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: <20260312-hardlockup-watchdog-fixes-v2-2-45bd8a0cc7ed@google.com> On Thu 2026-03-12 16:22:03, Mayank Rungta via B4 Relay wrote: > From: Mayank Rungta > > Currently, arch_touch_nmi_watchdog() causes an early return that > skips updating hrtimer_interrupts_saved. This leads to stale > comparisons and delayed lockup detection. > > I found this issue because in our system the serial console is fairly > chatty. For example, the 8250 console driver frequently calls > touch_nmi_watchdog() via console_write(). If a CPU locks up after a > timer interrupt but before next watchdog check, we see the following > sequence: > > * watchdog_hardlockup_check() saves counter (e.g., 1000) > * Timer runs and updates the counter (1001) > * touch_nmi_watchdog() is called > * CPU locks up > * 10s pass: check() notices touch, returns early, skips update > * 10s pass: check() saves counter (1001) > * 10s pass: check() finally detects lockup > > This delays detection to 30 seconds. With this fix, we detect the > lockup in 20 seconds. > > Reviewed-by: Douglas Anderson > Signed-off-by: Mayank Rungta I agree with Doug's analyze and it looks good to me: Reviewed-by: Petr Mladek Best Regards, Petr