Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp940234pxb; Wed, 6 Apr 2022 04:54:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwuUlrz0ID+21IpZsElqmeCo2TQZr7lzcPB/MTkcvcS5NS6cJuMKWwkeTTUiwwg+TndlFsq X-Received: by 2002:a17:90b:380e:b0:1c7:74f6:ae60 with SMTP id mq14-20020a17090b380e00b001c774f6ae60mr9189179pjb.5.1649246078634; Wed, 06 Apr 2022 04:54:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649246078; cv=none; d=google.com; s=arc-20160816; b=uqxVWp0xeGLTjz//hxoYqnRBUNVj5YRgiDN46/tfvDrJh/OCWoQI6T1AP0Qkmzxpua okYEYs2Ug+ui+KDZLTdOntfjDKjYtihGcJjPHoEOcBjT3whyP/oLmyMaaFpr8nUCpspy o6fjWzTGKTM+7z6cU3mO7wAKw/1EEjfKc7AZFLJR09MdAIpwBOolpVu8wq4E3g+zyUd7 GQ5KY93UEw2dkZWQUbap9972EcWkhDpLKRjinws4xHcKlnaDl50GacI5ipnH08w5o62p uzhC8VySaD6Hs4BRuhLbaQY9BxHI7mszitiDLuh1OviYYQhoGiLekTfzqQrz1Wc9FF/6 +chg== 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-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=RpbIKh1r4/BW29+SALiRPg7XSNqIUw9inRFZ3VtgfiY=; b=nT8lgyMbJKm3/XqLuzxeAVRIz7jPadLFFiZMYEbSNbr1RX02OWFZE/+yPLm2xVoM5N JRyGU7czF6w4qL9yxGSpbt/ycLg9g/1gpFb+ZavhJGKP4ihDRaSrKZDmUKZ/yMFDMnuu QGVH8QwMvo6n8QS3B1uJxz/RLeKjI4vGv2eCsRsT1nBhM2gNYPSO0Qc+iVZDHwN0eBXL xPxmeieH3z7qXo0j3LD3Q1hxQcEchBlBZmuGCoHmNQTsV86/5v5hNTSnGGbl6XzdWzyJ Il9kZIM7mdHHwZTM1prRASOBMebfpWfQk4B40BjzmZvo8mS5j1BtA1jmEp89XRlGlhlc Z2qw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@roeck-us.net header.s=default header.b=rnlkEyAZ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id ot6-20020a17090b3b4600b001bd14e01fbasi5364929pjb.168.2022.04.06.04.54.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Apr 2022 04:54:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=fail header.i=@roeck-us.net header.s=default header.b=rnlkEyAZ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email [IPv6:2620:137:e000::1:20]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 3F79758533E; Wed, 6 Apr 2022 03:15:23 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1849133AbiDFCdQ (ORCPT + 99 others); Tue, 5 Apr 2022 22:33:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54496 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1447044AbiDEWWw (ORCPT ); Tue, 5 Apr 2022 18:22:52 -0400 Received: from gateway30.websitewelcome.com (gateway30.websitewelcome.com [192.185.180.41]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 80552170097 for ; Tue, 5 Apr 2022 14:16:23 -0700 (PDT) Received: from cm12.websitewelcome.com (cm12.websitewelcome.com [100.42.49.8]) by gateway30.websitewelcome.com (Postfix) with ESMTP id C8F3E5F99 for ; Tue, 5 Apr 2022 16:15:52 -0500 (CDT) Received: from 162-215-252-75.unifiedlayer.com ([208.91.199.152]) by cmsmtp with SMTP id bqWmndZUb9AGSbqWmnEeZE; Tue, 05 Apr 2022 16:15:52 -0500 X-Authority-Reason: nr=8 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=roeck-us.net; s=default; h=In-Reply-To:Content-Type:MIME-Version:References :Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To:Content-Transfer-Encoding :Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=RpbIKh1r4/BW29+SALiRPg7XSNqIUw9inRFZ3VtgfiY=; b=rnlkEyAZ4vKF3WOJgUmnyodVrd C9uslS+M0meUurmet+JAVGBKXdhvwkIsWqpuSeJ3EcCqFEYMEjuAqUGDZmtQnL3BCd9vAK27T05Oa 7tPV96MzU0+N8l6/JBVEpE2FB90fN6F/nYDinDJWCPLn6wR28z+e6Z0zxJrDOG2YR0wzLBYxMWkg0 dR9uykoHq/SLgOZElDtv6iSGL0s4P52SjaEyDGDYrvNa3y//i4/710EKGF3oVJKIuPV9+BEfzMLi2 zoDNoDnzROHbpBYgHf9NVeN34NkjbHdapgBTLoJPWoo/3DBJHTwTEStObnVxjVyZCG838QavMbBdM zLCwH4jg==; Received: from 108-223-40-66.lightspeed.sntcca.sbcglobal.net ([108.223.40.66]:57868 helo=localhost) by bh-25.webhostbox.net with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1nbqWm-003GUy-8P; Tue, 05 Apr 2022 21:15:52 +0000 Date: Tue, 5 Apr 2022 14:15:51 -0700 From: Guenter Roeck To: Sebastian Ene Cc: Wim Van Sebroeck , Rob Herring , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-watchdog@vger.kernel.org, will@kernel.org, qperret@google.com, maz@kernel.org Subject: Re: [PATCH 2/2] watchdog: Add a mechanism to detect stalls on guest vCPUs Message-ID: <20220405211551.GB2121947@roeck-us.net> References: <20220405141954.1489782-1-sebastianene@google.com> <20220405141954.1489782-3-sebastianene@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220405141954.1489782-3-sebastianene@google.com> X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - bh-25.webhostbox.net X-AntiAbuse: Original Domain - vger.kernel.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - roeck-us.net X-BWhitelist: no X-Source-IP: 108.223.40.66 X-Source-L: No X-Exim-ID: 1nbqWm-003GUy-8P X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: 108-223-40-66.lightspeed.sntcca.sbcglobal.net (localhost) [108.223.40.66]:57868 X-Source-Auth: guenter@roeck-us.net X-Email-Count: 6 X-Source-Cap: cm9lY2s7YWN0aXZzdG07YmgtMjUud2ViaG9zdGJveC5uZXQ= X-Local-Domain: yes X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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 Sebastian, On Tue, Apr 05, 2022 at 02:19:55PM +0000, Sebastian Ene wrote: > This patch adds support for a virtual watchdog which relies on the > per-cpu hrtimers to pet at regular intervals. > The watchdog subsystem is not intended to detect soft and hard lockups. It is intended to detect userspace issues. A watchdog driver requires a userspace compinent which needs to ping the watchdog on a regular basis to prevent timeouts (and watchdog drivers are supposed to use the watchdog kernel API). What you have here is a CPU stall detection mechanism, similar to the existing soft/hard lockup detection mechanism. This code does not belong into the watchdog subsystem; it is similar to the existing hard/softlockup detection code (kernel/watchdog.c) and should reside at the same location. Having said that, I could imagine a watchdog driver to be used in VMs, but that would be similar to existing watchdog drivers. The easiest way to get there would probably be to just instantiate one of the watchdog devices already supported by qemu. Guenter