Received: by 2002:a05:6a10:a841:0:0:0:0 with SMTP id d1csp2215763pxy; Sat, 24 Apr 2021 08:29:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwTTPUvAG+t+FT3lIRgxiQfnbrEtwAmQKQLpDXa7PdPsYsW8mn7XUsWFOOxRR7J2a59AB2/ X-Received: by 2002:a50:ed03:: with SMTP id j3mr741636eds.334.1619278195835; Sat, 24 Apr 2021 08:29:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1619278195; cv=none; d=google.com; s=arc-20160816; b=ysKB2SJe2jWy2zbZYCzopFFblZwgO9jtbG+Lu2VcM2f6QC5ExH//6eB9De/GA8S985 qq5jNL2v+q71f3yOs6aDaNzH6ckh/GJpKx7tjrNdp0Oxo1yMwAwyHye7vb1AkmPIZgN9 OsKIqoHZ43BdTiWr/0kRQ8I0CmIYKRsuLHYZbsFBCJjG9utkTwejix25oV6is2MB3BQL P6K3SJ7lxwpbqm+cbwaZ6jVAMlNnV8bW7HhNaZlTVPHjwqnzXKwA29eveIksKsWkLnMm fCXoIzJSO/xmuvFqc8YEdVq69Jsr/mYrAR0tKH6Wp0gRjo0Sr0WEc9Kkt7Nmji3Gbx5F nBRg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :to:subject; bh=nzE1AHdA1EP05u/BQn1cXGCBemJTj49yoaVFoM/jnwk=; b=fyMiTZxJwKUmh+/lctuh0Dt2qLLthLYsZ93yuDq5C9YKamKwTxgum/AdlbHTh0bi35 bVk6WeSRGGytah5LjWg5YRE5CIAWDe2z6YfIczsUFBhHGqYrKn7C/mBcRU/z4/726/sm I5G9IL5Rm1cV423HVwJkghQPuYItrSJv88I2uTtAK52jGRLBMjeQQ2rmt/llLIqhDDXj 2Ncg+AP4z+4+zoUqw7oCShX48T8zoAO0xvCsF+ekx4rM5LMLl2LJjuqtA1QDnJCw2Tvj mFB/NQoTeRLdjNbem6rdkzkEf7xPIl3mjFzE5hiLnb1mrWz39pzqm/suqtXdjWDECsx/ Zh+g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q1si8607670ejy.298.2021.04.24.08.29.02; Sat, 24 Apr 2021 08:29:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232051AbhDXPYS (ORCPT + 99 others); Sat, 24 Apr 2021 11:24:18 -0400 Received: from www262.sakura.ne.jp ([202.181.97.72]:51905 "EHLO www262.sakura.ne.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231814AbhDXPYS (ORCPT ); Sat, 24 Apr 2021 11:24:18 -0400 Received: from fsav303.sakura.ne.jp (fsav303.sakura.ne.jp [153.120.85.134]) by www262.sakura.ne.jp (8.15.2/8.15.2) with ESMTP id 13OFNbNP083442; Sun, 25 Apr 2021 00:23:37 +0900 (JST) (envelope-from penguin-kernel@i-love.sakura.ne.jp) Received: from www262.sakura.ne.jp (202.181.97.72) by fsav303.sakura.ne.jp (F-Secure/fsigk_smtp/550/fsav303.sakura.ne.jp); Sun, 25 Apr 2021 00:23:37 +0900 (JST) X-Virus-Status: clean(F-Secure/fsigk_smtp/550/fsav303.sakura.ne.jp) Received: from [192.168.1.9] (M106072142033.v4.enabler.ne.jp [106.72.142.33]) (authenticated bits=0) by www262.sakura.ne.jp (8.15.2/8.15.2) with ESMTPSA id 13OFNbuq083438 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NO); Sun, 25 Apr 2021 00:23:37 +0900 (JST) (envelope-from penguin-kernel@i-love.sakura.ne.jp) Subject: Re: [RFC PATCH] watchdog: Adding softwatchdog To: Guenter Roeck , Peter Enderborg , Wim Van Sebroeck , Andrew Morton , linux-watchdog@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, Shakeel Butt References: <20210424102555.28203-1-peter.enderborg@sony.com> <20210424102555.28203-2-peter.enderborg@sony.com> From: Tetsuo Handa Message-ID: <844e3ecb-62c3-856a-7273-e22eee35e80f@i-love.sakura.ne.jp> Date: Sun, 25 Apr 2021 00:23:32 +0900 User-Agent: Mozilla/5.0 (Windows NT 6.3; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.10.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2021/04/24 23:41, Guenter Roeck wrote: > On 4/24/21 3:25 AM, Peter Enderborg wrote: >> This is not a rebooting watchdog. It's function is to take other >> actions than a hard reboot. On many complex system there is some >> kind of manager that monitor and take action on slow systems. >> Android has it's lowmemorykiller (lmkd), desktops has earlyoom. >> This watchdog can be used to help monitor to preform some basic >> action to keep the monitor running. >> >> It can also be used standalone. This add a policy that is >> killing the process with highest oom_score_adj and using >> oom functions to it quickly. I think it is a good usecase >> for the patch. Memory siuations can be problematic for >> software that monitor system, but other prolicys can >> should also be possible. Like picking tasks from a memcg, or >> specific UID's or what ever is low priority. >> --- > > NACK. Besides this not following the new watchdog API, the task > of a watchdog is to reset the system on failure. Its task is most > definitely not to re-implement the oom killer in any way, shape, > or form. > I don't think this proposal is a watchdog. I think this proposal is a timer based process killer, based on an assumption that any slowdown which prevents the monitor process from pinging for more than 0.5 seconds (if HZ == 1000) is caused by memory pressure.