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 1FCEDC433ED for ; Sat, 24 Apr 2021 10:26:17 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id AAE2B6141C for ; Sat, 24 Apr 2021 10:26:16 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org AAE2B6141C Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=sony.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id E62A36B0036; Sat, 24 Apr 2021 06:26:15 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id E12BE6B006C; Sat, 24 Apr 2021 06:26:15 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id D00F66B006E; Sat, 24 Apr 2021 06:26:15 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0213.hostedemail.com [216.40.44.213]) by kanga.kvack.org (Postfix) with ESMTP id B3E896B0036 for ; Sat, 24 Apr 2021 06:26:15 -0400 (EDT) Received: from smtpin25.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 5BC2718030455 for ; Sat, 24 Apr 2021 10:26:15 +0000 (UTC) X-FDA: 78066880710.25.6044725 Received: from JPTOSEGREL01.sonyericsson.com (jptosegrel01.sonyericsson.com [124.215.201.71]) by imf09.hostedemail.com (Postfix) with ESMTP id 037B56000106 for ; Sat, 24 Apr 2021 10:26:08 +0000 (UTC) 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 X-Rspamd-Server: rspam01 X-Rspamd-Queue-Id: 037B56000106 X-Stat-Signature: snj69mtens1hh5egho7czeptoyahfpb5 Received-SPF: none (sony.com>: No applicable sender policy available) receiver=imf09; identity=mailfrom; envelope-from=""; helo=JPTOSEGREL01.sonyericsson.com; client-ip=124.215.201.71 X-HE-DKIM-Result: none/none X-HE-Tag: 1619259968-938427 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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.