Received: by 2002:a05:6359:6284:b0:131:369:b2a3 with SMTP id se4csp3084668rwb; Mon, 7 Aug 2023 08:03:39 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGxc1+B9aj0lqzq2xwZz7omOsWwQR+uG24G43FDdlntXc3f2VJV8k6lI8RL7PQP+Zi+df59 X-Received: by 2002:a17:906:200a:b0:99b:49ce:b4cc with SMTP id 10-20020a170906200a00b0099b49ceb4ccmr8030197ejo.64.1691420619087; Mon, 07 Aug 2023 08:03:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691420619; cv=none; d=google.com; s=arc-20160816; b=I3AlE1FCosnhFDiB5tMzVVX6xeSYSLU1otpm17IEVBpiTFoDu04dTrXwtpU5Wo5vqA PCww+IK/BzCjUsP7nEDicNsiRpRbUp8QP7qaYkLPSnIuAXFVTHvS3nZ2v8j5cWLl7cdX s0Ax+0lf75vQ6ooVoAM4ZMzxiph8O8TeWWMP62nZMcKW4MjhU4bl1lSSTFczml/mm7Ud YZkp3hBDPd3vowSEr/qxHMRGaaIdPIXqTcxMUeN+fOiXrk6qKGa8HgSi0rDt7hQDLWvb w9joCSUxJOgq4VfFUshvvOwzhDPzEKvlYf1RwFaFCqcXgiObhVMRW9uCJ4IbtdYaVE3u M8BA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=5sO+ISmA3blEzydvQ5tSDlYEwVxNgQwIYJuThjSRudg=; fh=+PJUDy7fZCft8+NNLKu2ooqxSgsBN4qUNwbk2V+F74Q=; b=V8N9uMOGhitSrrZCad+228hTrPlUuP419jF9315Z15ejjk17xJeiPOrHOcldTOYcJo 5paywtU9cQNIcrmCqKbhBCJSvGxhtZTQQs1B8mBwzc5YqRcYlOSYc3uN3G/hWZifn7f3 awtwLr11HGZACsl34O/i6kC+V8dfE3cKq78wbKayoXEkRPDrWtfRh0eAORNfaDIVU3Cs t/ypjekjS/VTcIkhRoAhvwdbP0e7eWWKYXH4zoe/AjTEu2MVL6nouzBjxiiXwGMEfvLw WWylD9naIsLvmYxhQ9IAmSlVkzb4lsqXOWAU9V2DBJBCPYY/90mmhs09MiYAWza357Ls M30Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=Zz18dUdB; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=suse.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j10-20020a170906474a00b0099bcd480030si5499820ejs.879.2023.08.07.08.03.12; Mon, 07 Aug 2023 08:03:39 -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=@suse.com header.s=susede1 header.b=Zz18dUdB; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=suse.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233038AbjHGN5B (ORCPT + 99 others); Mon, 7 Aug 2023 09:57:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41882 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234707AbjHGN4f (ORCPT ); Mon, 7 Aug 2023 09:56:35 -0400 Received: from smtp-out1.suse.de (smtp-out1.suse.de [IPv6:2001:67c:2178:6::1c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0ADC13A9E for ; Mon, 7 Aug 2023 06:54:19 -0700 (PDT) Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out1.suse.de (Postfix) with ESMTP id E3CDE21A82; Mon, 7 Aug 2023 13:54:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1691416447; h=from:from:reply-to: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=5sO+ISmA3blEzydvQ5tSDlYEwVxNgQwIYJuThjSRudg=; b=Zz18dUdBnGBh3kyIA8F29HRu7yZrtnmtNDDPKFvgyFYbq6B024R6nrngjQPUr+ma/fJnPs BzluzzCOA3IhnaGialPArEZin4oqEFiWNTbOOax3fs32Yu3TKGZGCKE3dYN6NSg4ZVvFa2 tmqQfUOV3G/c69jhtfwuaSTnjuk51/I= Received: from suse.cz (unknown [10.100.201.202]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by relay2.suse.de (Postfix) with ESMTPS id C203D2C142; Mon, 7 Aug 2023 13:54:07 +0000 (UTC) Date: Mon, 7 Aug 2023 15:54:04 +0200 From: Petr Mladek To: Liu Song Cc: Andrew Morton , dianders@chromium.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] watchdog/hardlockup: set watchdog_hardlockup_warned to true as early as possible Message-ID: References: <20230805160144.121875-1-liusong@linux.alibaba.com> <20230805101705.3a38ce9aacc924f1c9f0842b@linux-foundation.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS 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 Sun 2023-08-06 10:52:57, Liu Song wrote: > > 在 2023/8/6 01:17, Andrew Morton 写道: > > When resending, please tell us some more about the effects of the > > change. Presumably there are circumstances in which excess output is > > produced? If so, describe these circumstances and the observed > > effects. > > Hi, > > I haven't found duplicate warnings in the real environment. > > However, considering that when system occurs hard lockup is basically > abnormal, it > > seems more reasonable to set "watchdog_hardlockup_warned" to ture, rather > than > > waiting for all kinds of information to be printed. I believe that this is not needed. watchdog_hardlockup_check(cpu, regs) is called on a CPU periodically. There are two callers: + buddy detector checks the particular CPU when the solflockup's hrtimer callback is called. See watchdog_hardlockup_kick() in watchdog_timer_fn(). + perf detector checks the particular CPU from a perf callback, see watchdog_overflow_callback(). Neither timer nor perf callbacks might be nested. They are naturally serialized on a given CPU. So, races are not possible in this case. Best Regards, Petr