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=-6.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_GIT 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 4DCC3C433ED for ; Sat, 24 Apr 2021 10:46:32 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 22B0A61029 for ; Sat, 24 Apr 2021 10:46:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234643AbhDXKrJ (ORCPT ); Sat, 24 Apr 2021 06:47:09 -0400 Received: from jptosegrel01.sonyericsson.com ([124.215.201.71]:6262 "EHLO JPTOSEGREL01.sonyericsson.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234715AbhDXKrH (ORCPT ); Sat, 24 Apr 2021 06:47:07 -0400 X-Greylist: delayed 1212 seconds by postgrey-1.27 at vger.kernel.org; Sat, 24 Apr 2021 06:47:07 EDT From: Peter Enderborg To: Wim Van Sebroeck , Guenter Roeck , Andrew Morton , , , , Shakeel Butt Subject: [RFC PATCH] watchdog: Adding softwatchdog Date: Sat, 24 Apr 2021 12:25:54 +0200 Message-ID: <20210424102555.28203-1-peter.enderborg@sony.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 Content-Type: text/plain X-SEG-SpamProfiler-Analysis: v=2.3 cv=DLnxHBFb c=1 sm=1 tr=0 a=fZcToFWbXLKijqHhjJ02CA==:117 a=3YhXtTcJ-WEA:10 a=TSGv57Xde0NnBCbwJi0A:9 X-SEG-SpamProfiler-Score: 0 Precedence: bulk List-ID: X-Mailing-List: linux-watchdog@vger.kernel.org First it is not a new softdog. This adds function that do other actions than a reboot. It intended to be used to help userspace management and monitoring going but can be used standalone too. The idea is to use watchdog interface, instead of reboot, a timer function do a softer action. In this case it is using oom_score_adj to pick a task to kill. So this is assuming that watchdog kicker is not respoding due to high memory pressure. A other usecase might be a selecting a task from a UID or what ever is problematic, it does not have to be a memory issue. But core thing is to have other actions than hard reboot. The patch need more works, but it can be tested as it is.