From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-ej1-f54.google.com (mail-ej1-f54.google.com [209.85.218.54]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 84020239E65 for ; Mon, 2 Feb 2026 03:26:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.54 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770002775; cv=none; b=l2vVW02DXMhhtIO/LtrvTtgg6Y958g0cUHW1EhJLr6ZaAUx6v47roFeVAyVEbBdc5KUKFWPWiiblxvq9SkKbLcYxKjjTAW7lXqzwFDS6HnjceymKaPzxlnPbFVzUQQP2Wsrjguz/wQpRoBBJW0fmOklvACuim3ScU6cnWiq4liM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770002775; c=relaxed/simple; bh=ZJqj9ri7+QRS7FBfUr198f3zndQJRIxPcf6OjR7r2ew=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=a0XxHIlAocQ3Hbtwoi52u2jjE4WlDNv/n7AxZJvJxzbWw9J5amXLk+JYo0a0pnaYIYqCC9Hcs4JHgBoCA+DeZX4o9lpjxobexq67EfVdeDmep+27ral9FcjtRBSXkpMQ2+WsdQOMTsj5kPjuBYKKr313+0T3brC1tX+XQcFY50Y= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=m/J6OKSh; arc=none smtp.client-ip=209.85.218.54 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="m/J6OKSh" Received: by mail-ej1-f54.google.com with SMTP id a640c23a62f3a-b8e526081ceso93780166b.1 for ; Sun, 01 Feb 2026 19:26:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1770002772; x=1770607572; darn=vger.kernel.org; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:from:to :cc:subject:date:message-id:reply-to; bh=8y1tSjszHwNi7K6C6xGA7ozYqT29UdTx9KR8G4VZTuc=; b=m/J6OKShA3QjFN/CjRWFK2+WtOuc4WjnkuZXwFP+pZt/mCT7QiSownfTIZd5cCtj59 Slb6HDIjcOpo6RHuW+5BRpuUUvSOtGVwvQq0qbSXUk5n85IukSxzD94GPDX/Hj88GX3P 5+v7w+z9lpKGSqlKjUuPIxjeSu6UdMRQrcmuALSEsA5gUq+j49dvELzBD7VBh3y951/w 9DA8TlNBwhRDYzfxjSPFeikqY7pFoqnTwIHKuX/HwLt2UEDinqErci35UnzBRUBylUB9 nb46qMxjJfT7rV0rOWapsmnLNX6Sd2rZbALgV9fdveszEtI8ol5k6apib47uSrK/y1XL AOzQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1770002772; x=1770607572; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=8y1tSjszHwNi7K6C6xGA7ozYqT29UdTx9KR8G4VZTuc=; b=ObBOLisNrilAJa9gkSV7wLvCaw5/VmCeWxaF23oK49mRI6TZPlYtNUJTsMmQLsBwya 7+iqCM3PrXUSu5yobj2Vm/DaDihbGU83b53M2NYqbdGqcY6StpmBSmfi+WHLPGhEuykK JJOU6woBZvT80b/eSec3sHzEZXcWcbxSsoj8gdN+5WRedI7M5qc8NxzPdWwSMDD2xwZx ow8xPN5mWQAHRKDY7rJJx5hVhGFfEBkTbx0PDa4epfUmZ1ilGh1JBd4ZP8tgI2TDFkM7 KZqgffsA4DA6rw6hMqEHVWO3P8eB9DTmkkyNC6Z9geDefmamec8Rd3FmqXFycCDO+/Xl KNKA== X-Forwarded-Encrypted: i=1; AJvYcCVoI8eEoyf8CSg3dmQ5+Wnx4L0sOInhKBfIN+vfo4fQAenvKv4FWdp5+dqXO3/Y++luL44KasJ1cTswOIQ=@vger.kernel.org X-Gm-Message-State: AOJu0Yxn1i6CT0D8oVeGhSUDRxngkS3TNF64UaDlrM/5PMmcaPytQrjb 6aoff0jWiF75T3aclPGI3GTPbt8IZ8l4ASZ9U30ozWyaZ6Ge9QyYRtvfZJ4Gwam1Ww== X-Gm-Gg: AZuq6aLt/hRYlitX8GYfUZrblzTrVkkAT7krRLRrGATDlg1Z1zRvjgxsJRIU4FGWWPU G1FKmhtEguBI8JYLRxGJA1g+QDJM2yah9XBMICCowspCa3Ic36cPVWv94txXI64kTEW88DpewwH jhm7Lacd9g47CKWHzRPorxBoRz1613CvSlIEtyDRiyWEjmKPL59XdpuyaS/WtnserzPueLaMBpL RhZa6KJwf2twQ1udu+ctS602bEbyK6tuoGvhTeq9jbpfytxCZ9EwJgCFTf6xfNuNBdfptQk0d3b SHm81boy5Ch63e1kTai58FkYyALQmp9MBP48BD12724BHMcp1C7IDT/YCkXSKRWMZ4TEP0xMiDC hUk2KnG5k6I5CahU2mOm+iSZXm+aQ1tZUu2QXqOJ24sP+qCKDwQH+ufYB90T2trD0m2QDVgXlVY Aj5O+nEgBk0nD+42Ii4dzaJYkTTaZ7pc6xdSS+GWcdB2+JxablIGA= X-Received: by 2002:a17:906:f049:b0:b87:6839:6175 with SMTP id a640c23a62f3a-b8ddf84586fmr869883966b.10.1770002771786; Sun, 01 Feb 2026 19:26:11 -0800 (PST) Received: from google.com (93.50.90.34.bc.googleusercontent.com. [34.90.50.93]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-658b46abb3esm7161539a12.32.2026.02.01.19.26.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 01 Feb 2026 19:26:10 -0800 (PST) Date: Mon, 2 Feb 2026 03:26:07 +0000 From: Matt Bobrowski To: Alexei Starovoitov Cc: Michal Hocko , Roman Gushchin , bpf , Alexei Starovoitov , Shakeel Butt , JP Kobryn , LKML , linux-mm , Suren Baghdasaryan , Johannes Weiner , Andrew Morton , joshdon@google.com Subject: Re: [PATCH bpf-next v3 00/17] mm: BPF OOM Message-ID: References: <20260127024421.494929-1-roman.gushchin@linux.dev> <7ia44io6kbwj.fsf@castle.c.googlers.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: On Wed, Jan 28, 2026 at 08:59:34AM -0800, Alexei Starovoitov wrote: > On Wed, Jan 28, 2026 at 12:06 AM Michal Hocko wrote: > > > > > > > Another viable idea (also suggested by Andrew Morton) is to develop > > > a production ready memcg-aware OOM killer in BPF, put the source code > > > into the kernel tree and make it loadable by default (obviously under a > > > config option). Myself or one of my colleagues will try to explore it a > > > bit later: the tricky part is this by-default loading because there are > > > no existing precedents. > > > > It certainly makes sense to have trusted implementation of a commonly > > requested oom policy that we couldn't implement due to specific nature > > that doesn't really apply to many users. And have that in the tree. I am > > not thrilled about auto-loading because this could be easily done by a > > simple tooling. > > Production ready bpf-oom program(s) must be part of this set. > We've seen enough attempts to add bpf st_ops in various parts of > the kernel without providing realistic bpf progs that will drive > those hooks. It's great to have flexibility and people need > to have a freedom to develop their own bpf-oom policy, but > the author of the patch set who's advocating for the new > bpf hooks must provide their real production progs and > share their real use case with the community. > It's not cool to hide it. > In that sense enabling auto-loading without requiring an end user > to install the toolchain and build bpf programs/rust/whatnot > is necessary too. > bpf-oom can be a self contained part of vmlinux binary. > We already have a mechanism to do that. > This way the end user doesn't need to be a bpf expert, doesn't need > to install clang, build the tools, etc. > They can just enable fancy new bpf-oom policy and see whether > it's helping their apps or not while knowing nothing about bpf. For the auto-loading capability you speak of here, I'm currently interpreting it as being some form of conceptually similar extension to the BPF preload functionality. Have I understood this correctly? If so, I feel as though something like this would be a completely independent stream of work, orthogonal to this BPF OOM feature, right? Or, is that you'd like this new auto-loading capability completed as a hard prerequisite before pulling in the BPF OOM feature?