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 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 86442C433F5 for ; Thu, 12 May 2022 15:06:50 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 0ACB06B0075; Thu, 12 May 2022 11:06:50 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 035A86B0078; Thu, 12 May 2022 11:06:49 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id D80378D0001; Thu, 12 May 2022 11:06:49 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id C6B716B0075 for ; Thu, 12 May 2022 11:06:49 -0400 (EDT) Received: from smtpin14.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id 99E4920F56 for ; Thu, 12 May 2022 15:06:49 +0000 (UTC) X-FDA: 79457418138.14.199C41E Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) by imf11.hostedemail.com (Postfix) with ESMTP id D8609400AE for ; Thu, 12 May 2022 15:06:43 +0000 (UTC) Received: from pps.filterd (m0098404.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 24CC1wn2004224; Thu, 12 May 2022 14:01:37 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=message-id : date : mime-version : subject : to : cc : references : from : in-reply-to : content-type : content-transfer-encoding; s=pp1; bh=PZKeUa51MnK6JBOqFyls3O7ght9z6gRfDZMSkyjlB54=; b=BXRgERzMIxLm/scsT3BPr0w/UG1SxHJPDqG50kbAvqSAXBWbX2p7KoSS2kZemsg/fWCK /EYxrJGAsgGo8X1NYMBNpRwvh8+OtiPeLC3X049bqc3l7ZencIQwxwqFWIdGb6sV8u5B S/L7EwmuDkOpHZ0TKZa+ZI1UQs3dRQ7NlvMjyhjMFZdc7xdPopfENlh+tcC9Efy4qXbL boCeBfq9IbosNGQuQZ0FgnRbbFidbj2pAuTRBT4VNBnRzoDJjXwAvO2O2pTS0HXWEOno hIeBKwa3W9+QRQqGF2TievLb7nQNeVijoQaNW5wWq3B/baoxuWt2IiajNzZ1PZMDjibO Ig== Received: from ppma03dal.us.ibm.com (b.bd.3ea9.ip4.static.sl-reverse.com [169.62.189.11]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3g11vr313y-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 12 May 2022 14:01:36 +0000 Received: from pps.filterd (ppma03dal.us.ibm.com [127.0.0.1]) by ppma03dal.us.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 24CDwSM0029524; Thu, 12 May 2022 14:01:36 GMT Received: from b03cxnp07027.gho.boulder.ibm.com (b03cxnp07027.gho.boulder.ibm.com [9.17.130.14]) by ppma03dal.us.ibm.com with ESMTP id 3fwgdacfvy-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 12 May 2022 14:01:35 +0000 Received: from b03ledav006.gho.boulder.ibm.com (b03ledav006.gho.boulder.ibm.com [9.17.130.237]) by b03cxnp07027.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 24CE1YnN30278062 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 12 May 2022 14:01:34 GMT Received: from b03ledav006.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id D069DC605F; Thu, 12 May 2022 14:01:34 +0000 (GMT) Received: from b03ledav006.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id ADD80C6059; Thu, 12 May 2022 14:01:34 +0000 (GMT) Received: from [9.211.56.168] (unknown [9.211.56.168]) by b03ledav006.gho.boulder.ibm.com (Postfix) with ESMTP; Thu, 12 May 2022 14:01:34 +0000 (GMT) Message-ID: <08e04659-2d06-2eb0-0ba8-8717a2d2bd48@linux.ibm.com> Date: Thu, 12 May 2022 09:01:34 -0500 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.8.0 Subject: Re: [PATCH] mm: Add config option for default panic_on_oom value Content-Language: en-US To: Andrew Morton Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org References: <20220511183400.47940-1-eajames@linux.ibm.com> <20220511145648.3c421ff592df32766319ea2d@linux-foundation.org> <20220511153616.9298d246adb1c7fea9ab453b@linux-foundation.org> From: Eddie James In-Reply-To: <20220511153616.9298d246adb1c7fea9ab453b@linux-foundation.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-TM-AS-GCONF: 00 X-Proofpoint-GUID: HzQyKlLHrsOPuOBNQonRFQ1qjIg6Mk27 X-Proofpoint-ORIG-GUID: HzQyKlLHrsOPuOBNQonRFQ1qjIg6Mk27 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.858,Hydra:6.0.486,FMLib:17.11.64.514 definitions=2022-05-12_10,2022-05-12_01,2022-02-23_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 adultscore=0 suspectscore=0 bulkscore=0 mlxscore=0 impostorscore=0 spamscore=0 clxscore=1015 malwarescore=0 lowpriorityscore=0 mlxlogscore=927 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2202240000 definitions=main-2205120067 X-Stat-Signature: key1w3rkipcfwx68tksr1e5izjbzxnju Authentication-Results: imf11.hostedemail.com; dkim=pass header.d=ibm.com header.s=pp1 header.b=BXRgERzM; spf=pass (imf11.hostedemail.com: domain of eajames@linux.ibm.com designates 148.163.156.1 as permitted sender) smtp.mailfrom=eajames@linux.ibm.com; dmarc=pass (policy=none) header.from=ibm.com X-Rspam-User: X-Rspamd-Server: rspam01 X-Rspamd-Queue-Id: D8609400AE X-HE-Tag: 1652368003-915349 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: On 5/11/22 17:36, Andrew Morton wrote: > On Wed, 11 May 2022 17:06:35 -0500 Eddie James wrote: > >> On 5/11/22 16:56, Andrew Morton wrote: >>> On Wed, 11 May 2022 13:34:00 -0500 Eddie James wrote: >>> >>>> Add the option to kconfig and set the default panic_on_value. >>> Why? What are the use-cases and how does this benefit our users? >> If a distribution (for example some embedded system distribution) wants >> the system to always panic when OOM, they may as well configure their >> kernel to do it by default, rather than writing to >> /proc/sys/vm/panic_on_oom every boot. Maybe I'm missing another way to >> do what I want here? > Presumably such a distribution would do this in initramfs initscripts > and forget about it. Yes, my thinking was that it was either a line in an init script or a system service. It seems more efficient to configure it in the kernel instead. > > What inspired the patch? Have you seen a situation which was best > solved with this change? Yes, our distro, OpenBMC, uses systemd, so I thought we'd need a new service. However after a little more research, I see now that that the existing systemd-sysctl can do what you suggest and set it during early boot. So that is probably the right way to go, and this change can be dropped. Thanks for your feedback! Eddie >