From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wr1-f41.google.com (mail-wr1-f41.google.com [209.85.221.41]) (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 53656331A45 for ; Tue, 27 Jan 2026 09:02:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.41 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769504563; cv=none; b=PGR5lsxDlDe+m83i/zmBFuZtkM9Y2ZZcBSrko7wxDbZQuqegUi/Ng8NLYbouHPUy0r1mu5o+KvERWVo8zFZKwFtR7991kZss1JpSUm9eeF6mXNhAcph7oR5r+GDZjHtweaipZfCxD+EmbUaX9omwRx+0cnMibgUwhU4MGOaW4k0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769504563; c=relaxed/simple; bh=HRc/mHCe+udfa+m6y1EgHh/uUKCWIQftI8ihhgUIrAY=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=LC2pnO+CrQMVjaAZUmViGBPW0bnOab+7e2v5Wcs/+frqFzPDSa6VG6U+QA3krzVxUZNfK3REOaLjGSNkOWktQM2no9ZsMvLfw9qMF4V9F3twZu5aD5GCoGSTL/RGH/UQkwfG8cGeii8J0rh5Stg3gZjNEhImVnvGZt8YSqj7F9o= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com; spf=pass smtp.mailfrom=suse.com; dkim=pass (2048-bit key) header.d=suse.com header.i=@suse.com header.b=E9sF+f//; arc=none smtp.client-ip=209.85.221.41 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=suse.com header.i=@suse.com header.b="E9sF+f//" Received: by mail-wr1-f41.google.com with SMTP id ffacd0b85a97d-4327790c4e9so3469621f8f.2 for ; Tue, 27 Jan 2026 01:02:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1769504560; x=1770109360; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=LKDWo0DZ7WSwFHUHcIcu30uUFge5ch1xyNfI86/sLVY=; b=E9sF+f//7/r/B88TtsBbyVEXeXNOMcUHgxf+EWaRL+NWGlNHktsn0pkJqM6MwM3718 te4JHIdKyz1ezcQq8vadsfI3XEmtrBbwzz80LOFIwCOhKTyvc72u4zIQhY9uN1sArpXb cJS3nMdxujmx3qIFyMDSTbL3tA9wjuy6szqKClargh+jM74Iw9VfOrB6bdyEeX4/hd9p uAzednJN2D2VbnZCQsp8bwIUzuEIoW4A+Sl55+ik0OOIKbmfItrSnMwqbmcbm6mouFD0 OjocGHsfbAczv7bsS4XWhuE+Y76shwP6+4EyDGo7FYGkXWuuPeuL3k39JvnoF7SlejY2 3q0w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1769504560; x=1770109360; h=in-reply-to: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=LKDWo0DZ7WSwFHUHcIcu30uUFge5ch1xyNfI86/sLVY=; b=Bu8AsL/mBU1d27nZCSVyTcqLLcXD1nMCWfXRvgef2AYn7+4iCL0Nr6CjRRQadYcCKw eHw7XpregZEDvU9P6SWFpstL+KqVCgfja2gwX+At4/Imhq8eP5UZDO4n8FuiW1J2T9bS RYC/2KesbDjiwyhPrqCX6g0lVHiRB+8iUcK6xAPIHraH0y3DD4y9kWRtN25bWeb3rMDe ZkeSSF01/Gc/3FFcdrK77dmiX1WOkHB4l8gaQIBimla/51Fvl0euKeh4yx+PhDQBsGCx pJQeQE0HxWx+mmZbyhuW8lsrL0ZeZ15yu+Io6NEk0IPqS4YYSiIlCqPWdMJtUClJmJow FbPg== X-Forwarded-Encrypted: i=1; AJvYcCUZbjHUHSzSZvsHFAaUQcSQvy7C3iunF2L9/Tytd4J7/qxi1mqOIyqvzfndzcPzi9iPA9vCt0iSLTqKWRw=@vger.kernel.org X-Gm-Message-State: AOJu0Yy4CMqmLYO1vC4jyTT6I45Izl2Jgs7+K70HaYmduQ8TjFCWY66Y qBuTgaRtxcCnLs5nI38oQd54k+CBqWnzaNYNqokZpCJCXePh1cxfUo82LMijGu7B7GE= X-Gm-Gg: AZuq6aLmKQyZzdTJxqJ3XOuI+Ws0eOZajH2MNTZvb9HoSYEAqhZ87HcV91xjQgIZDKS G5SBjWiIaj455kjbXiM8ExVqmyCmeSchZJvuCaznCtSOybDVxbw5TgKKGuv5mQwQAf3oa6AmRhi 6AtvVkd6FwqKvhFL1DxyrPcTCHverJiw0jmERlMAFeUHR6R7+8noWG5OT6glEUyZe1q8Tb7TOKB qrv4gB4bKvXefFlQo6xMNiC8mTfiUTYTpgay3V29gij/DKobJYRJwJdZTY5+ljHUnR7qo9tKqFk 32hq16n0s7j+k8b+9Q4R90CrfOYsONUkz5n+pTrA7qAlo1TcRVVmXvLjyx2DcnQQI3GyOMYMw+F NxFkQMRLsRTmeMRGActWIubkUg1/1hqyeG2BgVrvN0hawL+D/cLcB6MfXAVI2nxeyN/ojok66g8 wvjVSf61makGLy+KYDxH22QcKi X-Received: by 2002:a05:6000:4282:b0:431:752:672b with SMTP id ffacd0b85a97d-435dd05a81amr1236447f8f.14.1769504559686; Tue, 27 Jan 2026 01:02:39 -0800 (PST) Received: from localhost (109-81-26-156.rct.o2.cz. [109.81.26.156]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-435b1c24ac1sm36402707f8f.14.2026.01.27.01.02.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Jan 2026 01:02:39 -0800 (PST) Date: Tue, 27 Jan 2026 10:02:38 +0100 From: Michal Hocko To: Roman Gushchin Cc: bpf@vger.kernel.org, Alexei Starovoitov , Matt Bobrowski , Shakeel Butt , JP Kobryn , linux-kernel@vger.kernel.org, linux-mm@kvack.org, Suren Baghdasaryan , Johannes Weiner , Andrew Morton Subject: Re: [PATCH bpf-next v3 00/17] mm: BPF OOM Message-ID: References: <20260127024421.494929-1-roman.gushchin@linux.dev> 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=us-ascii Content-Disposition: inline In-Reply-To: <20260127024421.494929-1-roman.gushchin@linux.dev> On Mon 26-01-26 18:44:03, Roman Gushchin wrote: > This patchset adds an ability to customize the out of memory > handling using bpf. > > It focuses on two parts: > 1) OOM handling policy, > 2) PSI-based OOM invocation. > > The idea to use bpf for customizing the OOM handling is not new, but > unlike the previous proposal [1], which augmented the existing task > ranking policy, this one tries to be as generic as possible and > leverage the full power of the modern bpf. > > It provides a generic interface which is called before the existing OOM > killer code and allows implementing any policy, e.g. picking a victim > task or memory cgroup or potentially even releasing memory in other > ways, e.g. deleting tmpfs files (the last one might require some > additional but relatively simple changes). Are you planning to write any highlevel documentation on how to use the existing infrastructure to implement proper/correct OOM handlers with these generic interfaces? -- Michal Hocko SUSE Labs