Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp919656rwd; Tue, 13 Jun 2023 02:07:00 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7JDwsT/iTRwvMWYmtQIUk3ROI8VT1BQs7io6gksmHu4PjFsrr4y7yOg5IQ9MBy2AZy3viM X-Received: by 2002:a17:907:a05:b0:96a:928c:d391 with SMTP id bb5-20020a1709070a0500b0096a928cd391mr11162738ejc.4.1686647220515; Tue, 13 Jun 2023 02:07:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686647220; cv=none; d=google.com; s=arc-20160816; b=0C/5AX8VL14nv3vRIgjCRs9E7Yv27FE3m8IYaFPsv2z3m9IbFPcEd8M0TvItFC5/AZ dqc6spsb+8eaCPxD7ZYhNnJ8okjouRM9f2x090nzpJBhf1L0/eaifkQs0RzlD11E2IzM 6g+LDU8rb4cL2qblGv9GyUHQmHnHnoILH3E9RYXNGSUs9+QT37Kfn10XI1FupVa1Ywkr tPANbpArZ8LXXftM/qpUvSFGJyBUqM5KPqvvWl3wclNGWKOOnHOJvGh1dSMaRprBRCSh 80SAtyaIipmkyahRz4+iRDG39sej6LltSNaTwGnW2OL97dyldNgqteTCDtLExRID3h9a U0EQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:sender:dkim-signature; bh=Uuddb9c9VUE9xG/wODQy6qGOGm/KkteE8GYq9MCwRAo=; b=mzuHGs8cUj79UmubS8ZMbpLSq7aMF74hbjgUYGS3dzCx5Ekj1O3sgst7jr20h1d6FM f9KdS4e/mtaNpnuAmV4RqhqTt3QCQC6+bKSdiJcsVaUiePat8WfJBnbnKcY/FqsczPNY vSElVpY3nuqoZKCu/ItJxQP7d8SDHt1O3roje1quVIScfN63yrNGFIxxQ+Eid01dxwoy B4t2CT/rcncmAtt11jhXGifaoposfqKOkPe7ONLpLGxudW8mBTUvALTm78TKERHVsznv GrdlTByxn8eetVNBkyuQvuMfvfL1VePutSZWF+lHFjg0EN12+TtHg1v+8BB5ntJmDnyt DVMg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=hHVs3qPi; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id jw23-20020a17090776b700b00977bb63d372si6414207ejc.855.2023.06.13.02.06.36; Tue, 13 Jun 2023 02:07:00 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=hHVs3qPi; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241604AbjFMIl2 (ORCPT + 99 others); Tue, 13 Jun 2023 04:41:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49638 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241672AbjFMIkn (ORCPT ); Tue, 13 Jun 2023 04:40:43 -0400 Received: from mail-pl1-x630.google.com (mail-pl1-x630.google.com [IPv6:2607:f8b0:4864:20::630]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 17BF119AE; Tue, 13 Jun 2023 01:40:30 -0700 (PDT) Received: by mail-pl1-x630.google.com with SMTP id d9443c01a7336-1b3d29cfb17so15852625ad.3; Tue, 13 Jun 2023 01:40:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1686645629; x=1689237629; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:sender:from:to:cc:subject:date:message-id :reply-to; bh=Uuddb9c9VUE9xG/wODQy6qGOGm/KkteE8GYq9MCwRAo=; b=hHVs3qPi0Aq8cI3ZELcon2W8/5mlGpERDvjit7DNkZJGLihmbAwJbkACfzIIgkxIpc j4vFdsP/WWW0wIJd/+64pTHuEO5ZVFDRuI3Ji6gM8fK45NJlH0e7e/arPF6r2r2akpsM +P2AQH9buFVjbPQZ+tH8SrQvxbwlEmqMjiKsi3b2c61QcoDyZqrxyk3f27/fjkKTuQeH oJykroMIDIs7GXAhup68spefTPKSnD3abb/0MnqQMjKiiJpTM6AyYrvCdFBlKCBeyInX hAmGy+znv8erLXrRjh7AGDf7f3c0YH8bWp8o24v/AElZnau34Ib2Vq14+f23at78jucW sshQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686645629; x=1689237629; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:sender:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Uuddb9c9VUE9xG/wODQy6qGOGm/KkteE8GYq9MCwRAo=; b=hNvSXvSjcfvqFGfnv+69AdyuoUzw1pouOFvZQmVYptdk6b2x4mAz3cu9nMuD73+xv3 E1E/TgCLK6/yasmvb7RrkzHLpiKbFJZObj+ceVp7b9M87UC+t36g/Ln1EFxxI8HSY9Sr xmqosnV4w+DGNdu8JScWVMxXCZ53S+IRb02f8G10fUK17Nh2YMtHWGMI+OfIoA1A9rMf trdOitz0FSyRngdP1aljTkSIfyPw6dRyWaeMPoGBeSLfpFF4jITiEABtr1cXy/gBB8F4 4fn39BJ4k1YWlp2Ht5LLB5HbH4zlCw3OF7Wt6xnEptR6oewhcxDziioLIb5zDZ8LVmmo BbAw== X-Gm-Message-State: AC+VfDxby6lBz5hEV/PMz2eva4L60hiX4eiUwCZa4Xt24J2cLC1uMKNY fh56xOz2qgcvaHmKkmba8hA= X-Received: by 2002:a17:903:1105:b0:1b3:f572:397f with SMTP id n5-20020a170903110500b001b3f572397fmr389922plh.34.1686645629045; Tue, 13 Jun 2023 01:40:29 -0700 (PDT) Received: from localhost (dhcp-72-235-13-41.hawaiiantel.net. [72.235.13.41]) by smtp.gmail.com with ESMTPSA id n10-20020a170902e54a00b001b01448ba72sm9528439plf.215.2023.06.13.01.40.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Jun 2023 01:40:28 -0700 (PDT) Sender: Tejun Heo Date: Mon, 12 Jun 2023 22:40:32 -1000 From: "tj@kernel.org" To: Michal Hocko Cc: Yosry Ahmed , =?utf-8?B?56iL5Z6y5rab?= Chengkaitao Cheng , "lizefan.x@bytedance.com" , "hannes@cmpxchg.org" , "corbet@lwn.net" , "roman.gushchin@linux.dev" , "shakeelb@google.com" , "akpm@linux-foundation.org" , "brauner@kernel.org" , "muchun.song@linux.dev" , "viro@zeniv.linux.org.uk" , "zhengqi.arch@bytedance.com" , "ebiederm@xmission.com" , "Liam.Howlett@oracle.com" , "chengzhihao1@huawei.com" , "pilgrimtao@gmail.com" , "haolee.swjtu@gmail.com" , "yuzhao@google.com" , "willy@infradead.org" , "vasily.averin@linux.dev" , "vbabka@suse.cz" , "surenb@google.com" , "sfr@canb.auug.org.au" , "mcgrof@kernel.org" , "sujiaxun@uniontech.com" , "feng.tang@intel.com" , "cgroups@vger.kernel.org" , "linux-doc@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linux-fsdevel@vger.kernel.org" , "linux-mm@kvack.org" Subject: Re: [PATCH v3 0/2] memcontrol: support cgroup level OOM protection Message-ID: References: <66F9BB37-3BE1-4B0F-8DE1-97085AF4BED2@didiglobal.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-1.5 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello, On Tue, Jun 13, 2023 at 10:27:32AM +0200, Michal Hocko wrote: > On the other hand I can see a need to customizable OOM victim selection > functionality. We've been through that discussion on several other > occasions and the best thing we could come up with was to allow to plug > BPF into the victim selection process and allow to bypass the system > default method. No code has ever materialized from those discussions > though. Maybe this is the time to revive that idea again? Yeah, my 5 cent - trying to define a rigid interface for something complex and flexible is a fool's errand. Johannes knows a lot better than me but we (meta) are handling most OOMs with oomd which gives more than sufficient policy flexibility. That said, handling OOMs in userspace requires wholesale configuration changes (e.g. working IO isolation) and being able to steer kernel OOM kills can be useful for many folks. I haven't thought too much about it but the problem seems pretty well fit for offloading policy decisions to a BPF program. Thanks. -- tejun