BPF List
 help / color / mirror / Atom feed
From: Yosry Ahmed <yosryahmed@google.com>
To: zhouchuyi@bytedance.com
Cc: andrii@kernel.org, ast@kernel.org, bpf@vger.kernel.org,
	 daniel@iogearbox.net, hannes@cmpxchg.org,
	linux-kernel@vger.kernel.org,  mhocko@kernel.org,
	muchun.song@linux.dev, robin.lu@bytedance.com,
	 roman.gushchin@linux.dev, wuyun.abel@bytedance.com,
	 Yosry Ahmed <yosryahmed@google.com>
Subject: Re: [PATCH RFC v2 0/5] mm: Select victim using bpf_oom_evaluate_task
Date: Wed, 16 Aug 2023 15:49:07 +0000	[thread overview]
Message-ID: <20230816154907.2724856-1-yosryahmed@google.com> (raw)
In-Reply-To: <20230810081319.65668-1-zhouchuyi@bytedance.com>

> Changes
> -------
>
> This is v2 of the BPF OOM policy patchset.
> v1 : https://lore.kernel.org/lkml/20230804093804.47039-1-zhouchuyi@bytedance.com/
> v1 -> v2 changes:
>
> - rename bpf_select_task to bpf_oom_evaluate_task and bypass the
> tsk_is_oom_victim (and MMF_OOM_SKIP) logic. (Michal)
>
> - add a new hook to set policy's name, so dump_header() can know
> what has been the selection policy when reporting messages. (Michal)
>
> - add a tracepoint when select_bad_process() find nothing. (Alan)
>
> - add a doc to to describe how it is all supposed to work. (Alan)
>
> ================
>
> This patchset adds a new interface and use it to select victim when OOM
> is invoked. The mainly motivation is the need to customizable OOM victim
> selection functionality.
>
> The new interface is a bpf hook plugged in oom_evaluate_task. It takes oc
> and current task as parameters and return a result indicating which one is
> selected by the attached bpf program.
>
> There are several conserns when designing this interface suggested by
> Michal:
>
> 1. Hooking into oom_evaluate_task can keep the consistency of global and
> memcg OOM interface. Besides, it seems the least disruptive to the existing
> oom killer implementation.
>
> 2. Userspace can handle a lot on its own and provide the input to the BPF
> program to make a decision. Since the oom scope iteration will be
> implemented already in the kernel so all the BPF program has to do is to
> rank processes or memcgs.
>
> 3. The new interface should better bypass the current heuristic rules
> (e.g., tsk_is_oom_victim, and MMF_OOM_SKIP) to meet an arbitrary oom
> policy's need.

Can we linux-mm on such changes? I almost missed this series :)

      parent reply	other threads:[~2023-08-16 15:49 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-10  8:13 [RFC PATCH v2 0/5] mm: Select victim using bpf_oom_evaluate_task Chuyi Zhou
2023-08-10  8:13 ` [RFC PATCH v2 1/5] mm, oom: Introduce bpf_oom_evaluate_task Chuyi Zhou
2023-08-17  2:07   ` Alexei Starovoitov
2023-08-17  2:51     ` Chuyi Zhou
2023-08-17  3:22       ` Alexei Starovoitov
2023-08-18  3:30         ` Chuyi Zhou
2023-08-18  4:34           ` Alexei Starovoitov
2023-08-22 10:39     ` Michal Hocko
2023-09-13  1:18   ` Bixuan Cui
2023-09-13  8:00     ` Chuyi Zhou
2023-09-13 11:24   ` Bixuan Cui
2023-08-10  8:13 ` [RFC PATCH v2 2/5] mm: Add policy_name to identify OOM policies Chuyi Zhou
2023-08-14 20:51   ` Jonathan Corbet
2023-08-15  2:28     ` Chuyi Zhou
2023-09-14 12:02     ` Bixuan Cui
2023-09-14 12:50       ` [External] " Chuyi Zhou
2023-09-15  2:28         ` Bixuan Cui
2023-09-15  3:31           ` Chuyi Zhou
2023-09-14 12:04     ` Bixuan Cui
2023-08-10  8:13 ` [RFC PATCH v2 3/5] mm: Add a tracepoint when OOM victim selection is failed Chuyi Zhou
2023-08-16 11:54   ` Alan Maguire
2023-08-10  8:13 ` [RFC PATCH v2 4/5] bpf: Add a OOM policy test Chuyi Zhou
2023-08-16 11:53   ` Alan Maguire
2023-08-16 12:31     ` Chuyi Zhou
2023-08-16 13:49       ` Alan Maguire
2023-08-16 14:34         ` Chuyi Zhou
2023-09-28 11:35           ` Charlley Green
2023-09-13  7:55   ` Bixuan Cui
2023-08-10  8:13 ` [RFC PATCH v2 5/5] bpf: Add a BPF OOM policy Doc Chuyi Zhou
2023-08-16 15:49 ` Yosry Ahmed [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230816154907.2724856-1-yosryahmed@google.com \
    --to=yosryahmed@google.com \
    --cc=andrii@kernel.org \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=hannes@cmpxchg.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mhocko@kernel.org \
    --cc=muchun.song@linux.dev \
    --cc=robin.lu@bytedance.com \
    --cc=roman.gushchin@linux.dev \
    --cc=wuyun.abel@bytedance.com \
    --cc=zhouchuyi@bytedance.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox