Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1489290imu; Wed, 16 Jan 2019 21:14:35 -0800 (PST) X-Google-Smtp-Source: ALg8bN5U3Ns6gBV6d0uqLP5DNEY2Fdnya2vw/j+dvKN3QCfDX9/Jc0k9kY7GpdfJVqxIeQAdIJyp X-Received: by 2002:a62:28c9:: with SMTP id o192mr13727277pfo.57.1547702075656; Wed, 16 Jan 2019 21:14:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547702075; cv=none; d=google.com; s=arc-20160816; b=oYWH7JwSbfjfJOndTpY3+BNGb3ASbuXoHWhQunewaKrG1c2IFUcFafjM2lOUeh+GU0 X7zf2pwJeQA+SKLghsRgBHjhZxAslYOHJxtwoQh2ffblP7fojmSLFXACj0vCFXbBPb9i 9BN1kKKGMUHvQyuUhxvDgvWmuZ9bnWUgYXo+odcIwFgU/g28/yoGVjHWtqsPqJiqegwU Zeox2dcczJmTxmrI7p3bjqQc6Donhq7NDjKWLeLgXPYWpItxr+elBBLITzuKmtTrNAfg Hi9gt5C8UDzbh3Phmn4dyDIomdh8huRMTIPdyV0ZrC5hOn6lbuEGqGpCoRwXRTDzITu5 /5yQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:message-id :in-reply-to:date:references:subject:cc:to:from:dkim-signature; bh=cQB9rzXu6IIyWGE4rBq3324xGrsxfBHHLKXsSOdVsE8=; b=VJ6oi1ZZTDZPJ7e2R5wbIznla7/vwouQxc7GfLjWqC7RFjw7yz+8rYhAv44hsRogWo VSv0npvZIGYmbPX6KlbRlQDUVqwxdcwjRcFTNShhJ8U2EAUOVasfixRbe/W6o5Zh02f0 SvRMV8TYudFCLep1/SUMIw3X46BVFtBg5vqdg1vttBacrz8sVxGcMqWFwt192gQiHxOU cX7kXD3yLa9eRVjbwY9Ys6aFWO2rNXQXZs2Sifmftz/swcRTvl+gsnyFBnswjG2rUbbG 7z8CtoN9knpg7cUKA2ul4chuP8vcFCrxuMZmavtqRFYEnn6WUZ7yNK89xArJSStjUI3q 0WTw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@haabendal.dk header.s=20140924 header.b=2aNsSdUA; 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 g19si623863pgj.358.2019.01.16.21.14.20; Wed, 16 Jan 2019 21:14:35 -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; dkim=pass header.i=@haabendal.dk header.s=20140924 header.b=2aNsSdUA; 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 S2404783AbfAPPBJ (ORCPT + 99 others); Wed, 16 Jan 2019 10:01:09 -0500 Received: from mailrelay4-1.pub.mailoutpod1-cph3.one.com ([46.30.210.185]:23952 "EHLO mailrelay4-1.pub.mailoutpod1-cph3.one.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2393805AbfAPPBJ (ORCPT ); Wed, 16 Jan 2019 10:01:09 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=haabendal.dk; s=20140924; h=content-type:mime-version:message-id:in-reply-to:date:references:subject:cc: to:from:from; bh=cQB9rzXu6IIyWGE4rBq3324xGrsxfBHHLKXsSOdVsE8=; b=2aNsSdUA+6s4XLpKs0tyfk2RWoBuIvUG/Cm7kAHGTn71db8iG2h65DxGeZsAUBNtfgnDzM1VyN9ur p4azDcPMxjB3Zw5miWjhIR/zf5kTlKF+1xdJ15FwWXm+E9fzmyM757EjJK6qTKUMUB2+8K8DgA9fch om8FyLLFuG70e1Do= X-HalOne-Cookie: 0b32515dc14c55f8adf2817b6a7d371658f604a5 X-HalOne-ID: 4e1533be-199d-11e9-834b-d0431ea8bb10 Received: from localhost (unknown [87.49.44.116]) by mailrelay4.pub.mailoutpod1-cph3.one.com (Halon) with ESMTPSA id 4e1533be-199d-11e9-834b-d0431ea8bb10; Wed, 16 Jan 2019 14:45:02 +0000 (UTC) From: Esben Haabendal To: Rasmus Villemoes Cc: "linux-watchdog\@vger.kernel.org" , Guenter Roeck , Wim Van Sebroeck , Jonathan Corbet , "linux-kernel\@vger.kernel.org" , "linux-doc\@vger.kernel.org" , "martin\@hundeboll.net" , Rasmus Villemoes Subject: Re: [PATCH v8 0/3] watchdog: allow setting deadline for opening /dev/watchdogN References: <20190116121432.26732-1-rasmus.villemoes@prevas.dk> Date: Wed, 16 Jan 2019 15:45:02 +0100 In-Reply-To: <20190116121432.26732-1-rasmus.villemoes@prevas.dk> (Rasmus Villemoes's message of "Wed, 16 Jan 2019 12:14:41 +0000") Message-ID: <87pnsw3bm9.fsf@haabendal.dk> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Rasmus Villemoes writes: > If a watchdog driver tells the framework that the device is running, > the framework takes care of feeding the watchdog until userspace opens > the device. If the userspace application which is supposed to do that > never comes up properly, the watchdog is fed indefinitely by the > kernel. This can be especially problematic for embedded devices. > > The existing handle_boot_enabled cmdline parameter/config option > partially solves that, but that is only usable for the subset of > hardware watchdogs that have (or can be configured by the bootloader > to have) a timeout that is sufficient to make it realistic for > userspace to come up. Many devices have timeouts of only a few > seconds, or even less, making handle_boot_enabled insufficient. > > These patches allow one to set a maximum time for which the kernel > will feed the watchdog, thus ensuring that either userspace has come > up, or the board gets reset. This allows fallback logic in the > bootloader to attempt some recovery (for example, if an automatic > update is in progress, it could roll back to the previous version). > > The patches have been tested on a Raspberry Pi 2 and a Wandboard. > > Changes in v8: Redo on top of 5.0-rc1 - in particular, adapt to the > jiffies->ktime_t conversion (1ff68820 "watchdog: core: make sure the > watchdog_worker is not deferred"). Add a patch to make the hardware > timeout at the deadline as requested by Guenther - which was actually > made very easy by the ktime_t conversion. > > v7 submission at > > Rasmus Villemoes (3): > watchdog: introduce watchdog.open_timeout commandline parameter > watchdog: introduce CONFIG_WATCHDOG_OPEN_TIMEOUT > watchdog: make the device time out at open_deadline when open_timeout > is used > > .../watchdog/watchdog-parameters.txt | 9 ++++ > drivers/watchdog/Kconfig | 9 ++++ > drivers/watchdog/watchdog_dev.c | 42 +++++++++++++++---- > 3 files changed, 53 insertions(+), 7 deletions(-) For the whole series: Acked-by: Esben Haabendal