Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp2285980rwb; Mon, 19 Sep 2022 02:47:07 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7FvhRJAw+QtHK/Q1tD4yFrUk8M4KnufRDQeVPhN2wLFP8WtCO4wBijnXKm4KZP0z1ZgrE3 X-Received: by 2002:a17:903:204b:b0:176:a6c5:4277 with SMTP id q11-20020a170903204b00b00176a6c54277mr12069091pla.24.1663580826831; Mon, 19 Sep 2022 02:47:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663580826; cv=none; d=google.com; s=arc-20160816; b=bGIDedv4ZZRwi4KgmPlKZhL6uEp27xWw3Vb/IxQNFLhFG+xHseWoWGmTPkfIeDPnHS 5sIGS1HTOClfcCoWns7CSDAwC5Xw3crp78YqklWQJ+DrEWBiiFY7opSkSG9zB4AXENvr /cMtVqHOhsdpP3k7wADnd/GsOuRnAN34VP/xBU0jGtjd5EzPqkPzGyEJQyoJKEbMf2au TiAwNV1ZJBhiZt0+RF5bV6z9QUbS8kQ5eEfNzpmJswTDGRhNNeJSnNWfqeHrRD9bl8Bt 4Ffi/OsizNIoyhRWhJIBXrL1Qqti7l+A16tfVnkekbyCOTkYJEPIV7ihCMRs/Fg5kEFw DJrQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :organization:references:in-reply-to:message-id:subject:cc:to:from :date:dkim-signature:dkim-signature; bh=u1foqMVRLKucwhtU+4p7jj4OsS55xsQDfzr/9xoTDYE=; b=Wbc4AZxYiVDHZnvlw+YnFr07dgxe3SMAgLapU0NUEPx/4gh4qGjzL80MkGyKxqenvw PWqn6d9xUzuul0gAj8tRuAoFyKj1pW+7OURx9a6e3roVTy87zG4HHX4u/kgt0LHvcJlH i/v3Vzo5CZxVeakeSBH/LT363iXbOc1eYjP2dSgTUb9YLqhHJT3cykR6n04gcenmeODn QUp93fKlWJqihKC2mBVIT99y1t87CtkKL2JeqXAIMurMpzO1rix2kx865KjSU/KfH7W4 Qpy9077FgP4dkdJUNuuGTZv8X02YhPpW5m8FvUa4GKxVwFglO7K6Vpd9/aM6AvldoicA dOTA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=gDbIHBDD; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519 header.b=HcGBeK0U; 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=NONE sp=NONE dis=NONE) header.from=suse.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q19-20020a056a00089300b00527ad0014f6si30870200pfj.339.2022.09.19.02.46.56; Mon, 19 Sep 2022 02:47:06 -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.de header.s=susede2_rsa header.b=gDbIHBDD; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519 header.b=HcGBeK0U; 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=NONE sp=NONE dis=NONE) header.from=suse.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230031AbiISJdr (ORCPT + 99 others); Mon, 19 Sep 2022 05:33:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48758 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230182AbiISJdk (ORCPT ); Mon, 19 Sep 2022 05:33:40 -0400 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 45716140A2; Mon, 19 Sep 2022 02:33:39 -0700 (PDT) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 8BA85221FF; Mon, 19 Sep 2022 09:33:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1663580017; 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=u1foqMVRLKucwhtU+4p7jj4OsS55xsQDfzr/9xoTDYE=; b=gDbIHBDDhT4dTZ5EDxs5haLrHLhypRHT9cJX6mG2DGFPTdF/1lIDNOFq7Uwa4P7/6Lxag2 BeshCW9tdTMzclCyJziQfPa6kxIiOSJxdgl1HVcfaKPDy7SQOlLyU6vUTr3H0kxNEJZTXM gJm3IKIaqwM5W3oryS4w9K1v7YlM1Xk= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1663580017; 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=u1foqMVRLKucwhtU+4p7jj4OsS55xsQDfzr/9xoTDYE=; b=HcGBeK0UFDjAEx3ddw+nM913QDDSytveuYV5Q/qd+/9ucCYraBMF7Sz405vTYuElc9geiY WDbrBOyglC1S0vBQ== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 5376C13ABD; Mon, 19 Sep 2022 09:33:37 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id ALfOEXE3KGOdWAAAMHmgww (envelope-from ); Mon, 19 Sep 2022 09:33:37 +0000 Date: Mon, 19 Sep 2022 11:33:35 +0200 From: Jean Delvare To: Guenter Roeck Cc: linux-watchdog@vger.kernel.org, LKML , Wim Van Sebroeck , Mika Westerberg , "Rafael J. Wysocki" Subject: Re: [PATCH] watchdog: wdat_wdt: Set the min and max timeout values properly Message-ID: <20220919113335.18cebc74@endymion.delvare> In-Reply-To: <5a1c9872-52b5-1f96-6931-801185b03fd4@roeck-us.net> References: <20220806000706.3eeafc9c@endymion.delvare> <5a1c9872-52b5-1f96-6931-801185b03fd4@roeck-us.net> Organization: SUSE Linux X-Mailer: Claws Mail 3.18.0 (GTK+ 2.24.32; x86_64-suse-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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 Hi Guenter, A few questions from an old discussion: On Mon, 8 Aug 2022 04:36:42 -0700, Guenter Roeck wrote: > On 8/5/22 15:07, Jean Delvare wrote: > > To be honest, I'm not sold to the idea of a software-emulated > > maximum timeout value above what the hardware can do, but if doing > > that makes sense in certain situations, then I believe it should be > > implemented as a boolean flag (named emulate_large_timeout, for > > example) to complement max_timeout instead of a separate time value. > > Is there a reason I'm missing, why it was not done that way? > > There are watchdogs with very low maximum timeout values, sometimes less than > 3 seconds. gpio-wdt is one example - some have a maximum value of 2.5 seconds. > rzn1_wd is even more extreme with a maximum of 1 second. With such low values, > accuracy is important, second-based limits are insufficient, and there is an > actual need for software timeout handling on top of hardware. Out of curiosity, what prevents user-space itself from pinging /dev/watchdog every 0.5 second? I assume hardware using such watchdog devices is "special" and would be running finely tuned user-space, so the process pinging /dev/watchdog could be given higher priority or even real-time status to ensure it runs without delays. Is that not sufficient? > At the same time, there is actually a need to make timeouts milli-second based > instead of second-based, for uses such as medical devices where timeouts need > to be short and accurate. The only reason for not implementing this is that > the proposals I have seen so far (including mine) were too messy for my liking, > and I never had the time to clean it up. Reverting milli-second support would > be the completely wrong direction. I might look into this at some point (for example as a SUSE Hackweek project). Did you post your work somewhere? I'd like to take a look. Thanks, -- Jean Delvare SUSE L3 Support