From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C5A55C3F2D2 for ; Thu, 5 Mar 2020 18:07:29 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 9CB0A20716 for ; Thu, 5 Mar 2020 18:07:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726351AbgCESH2 (ORCPT ); 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 :)