Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp5952967ybf; Thu, 5 Mar 2020 10:08:10 -0800 (PST) X-Google-Smtp-Source: ADFU+vt+1qpl4bODUQlc0rhrbwqssjHgTvsX12/1WSALgm1DjRfTgq2bCNslOGrNR2U7NbgeP3I+ X-Received: by 2002:a05:6830:18ce:: with SMTP id v14mr4685861ote.4.1583431690516; Thu, 05 Mar 2020 10:08:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1583431690; cv=none; d=google.com; s=arc-20160816; b=rCQ1u0QCZmvMvXLIiAl94b1S3Rr3dl6CeMm3POftTGxHmo26Y5KMWJxd1LxosbToPL pG5okwCzii/AeI5XRItnkn/WZJs5L39aL7KnKplGWBq1m4Bs6FCprQiBeiBFAE8b9ELV TlHNasEJPEoTu+9ZZQz0pCdagwNwvNVz8leWf9bmhHRQbuvfXeXGCezxcpQdV3pmRv0Y 2f/iUVfqvTvOalP05qofxwCdmBCsRvOivMReLf5417M5Z/2PEwxeQVsk9+tpU9bH7klB iv5XRe3uXrtXyt8HOMnSZJ/c/xUUF2RDI5oOnySXzyG/kjvogbN1LNiy3jVfZG1nf4UR cyrQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from; bh=MTj4ydnt8UsR6KpNIuiIHbkFqB4Hlkq/sS6T5loyNgw=; b=An9t41qwSdLPRMcSjDTfJr9/Xz9b5arub5RMtQ5NInoSVBBsT2E2ivZ8KaLC9rJ2rk 5UR4KVUbG76vUq2yI9UUO2fQsmu6cIl3H9RgTCLiAskAyBPWjEj3aIJxbllMbjdnP29f vBgwSyAnY/nbTKMe/iMWRcFqGSmI0iKly4D2g+qpgCVeYL9DTDy2E+TreQzCOncUOpvw 9VP3XHPVoTTRtPeJTk6MICE49srjru2RzHeCPlxZx9XjrzkDosPVp/OTrqLWa0qnc2Qt XyzzDVO5njvdC6ZfYKFYPuP8mSLA+nuLsuTquuXl2GqFRlJuXRtqTdcy6IL/v6Omi/W7 IdRA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q26si3821959otc.254.2020.03.05.10.07.58; Thu, 05 Mar 2020 10:08:10 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726251AbgCESH2 (ORCPT + 99 others); Thu, 5 Mar 2020 13:07:28 -0500 Received: from Galois.linutronix.de ([193.142.43.55]:51098 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726083AbgCESH2 (ORCPT ); Thu, 5 Mar 2020 13:07:28 -0500 Received: from p5de0bf0b.dip0.t-ipconnect.de ([93.224.191.11] helo=nanos.tec.linutronix.de) by Galois.linutronix.de with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1j9utt-0002uN-Ug; Thu, 05 Mar 2020 19:07:14 +0100 Received: by nanos.tec.linutronix.de (Postfix, from userid 1000) id 2546210408A; Thu, 5 Mar 2020 19:07:13 +0100 (CET) From: Thomas Gleixner To: Peter Zijlstra , Xi Wang Cc: Ingo Molnar , Juri Lelli , Vincent Guittot , Dietmar Eggemann , Steven Rostedt , Josh Don , linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, Paul Turner Subject: Re: [PATCH] sched: watchdog: Touch kernel watchdog in sched code In-Reply-To: <20200305075742.GR2596@hirez.programming.kicks-ass.net> References: <20200304213941.112303-1-xii@google.com> <20200305075742.GR2596@hirez.programming.kicks-ass.net> Date: Thu, 05 Mar 2020 19:07:13 +0100 Message-ID: <87blpad6b2.fsf@nanos.tec.linutronix.de> MIME-Version: 1.0 Content-Type: text/plain X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Peter Zijlstra writes: > On Wed, Mar 04, 2020 at 01:39:41PM -0800, Xi Wang wrote: >> The main purpose of kernel watchdog is to test whether scheduler can >> still schedule tasks on a cpu. In order to reduce latency from >> periodically invoking watchdog reset in thread context, we can simply >> touch watchdog from pick_next_task in scheduler. Compared to actually >> resetting watchdog from cpu stop / migration threads, we lose coverage >> on: a migration thread actually get picked and we actually context >> switch to the migration thread. Both steps are heavily protected by >> kernel locks and unlikely to silently fail. Thus the change would >> provide the same level of protection with less overhead. >> >> The new way vs the old way to touch the watchdogs is configurable >> from: >> >> /proc/sys/kernel/watchdog_touch_in_thread_interval >> >> The value means: >> 0: Always touch watchdog from pick_next_task >> 1: Always touch watchdog from migration thread >> N (N>0): Touch watchdog from migration thread once in every N >> invocations, and touch watchdog from pick_next_task for >> other invocations. >> > > This is configurable madness. What are we really trying to do here? Create yet another knob which will be advertised in random web blogs to solve all problems of the world and some more. Like the one which got silently turned into a NOOP ~10 years ago :)