From: Chuyi Zhou <zhouchuyi@bytedance.com>
To: Bixuan Cui <cuibixuan@vivo.com>,
hannes@cmpxchg.org, mhocko@kernel.org, roman.gushchin@linux.dev,
ast@kernel.org, daniel@iogearbox.net, andrii@kernel.org,
muchun.song@linux.dev
Cc: bpf@vger.kernel.org, linux-kernel@vger.kernel.org,
wuyun.abel@bytedance.com, robin.lu@bytedance.com,
Michal Hocko <mhocko@suse.com>
Subject: Re: [RFC PATCH v2 1/5] mm, oom: Introduce bpf_oom_evaluate_task
Date: Wed, 13 Sep 2023 16:00:18 +0800 [thread overview]
Message-ID: <89afc718-b5e5-38e4-6698-bb28b80e2c83@bytedance.com> (raw)
In-Reply-To: <e88fe274-cd53-40d4-9a8e-7c6a4e1d8c44@vivo.com>
Hello, Bixuan.
在 2023/9/13 09:18, Bixuan Cui 写道:
>
>
> 在 2023/8/10 16:13, Chuyi Zhou 写道:
>> +#include <linux/bpf.h> #include <linux/oom.h> #include <linux/mm.h>
>> #include <linux/err.h> @@ -305,6 +306,27 @@ static enum oom_constraint
>> constrained_alloc(struct oom_control *oc) return CONSTRAINT_NONE; }
>> +enum { + NO_BPF_POLICY, + BPF_EVAL_ABORT, + BPF_EVAL_NEXT, +
>> BPF_EVAL_SELECT, +}; +
>
> I saw that tools/testing/selftests/bpf/progs/oom_policy.c is also using
> NO_BPF_POLICY etc. I think
> +enum {
> + NO_BPF_POLICY,
> + BPF_EVAL_ABORT,
> + BPF_EVAL_NEXT,
> + BPF_EVAL_SELECT,
> +};
> +
> definitions can be placed in include/linux/oom.h
>
Thanks for your feedback!
Yes, Maybe we should move these enums to a more proper place so that
they can be generated by BTF and we can take them from vmlinux.h.
> Thanks
> Bixuan Cui
next prev parent reply other threads:[~2023-09-13 8:00 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 [this message]
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 ` [PATCH RFC v2 0/5] mm: Select victim using bpf_oom_evaluate_task Yosry Ahmed
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=89afc718-b5e5-38e4-6698-bb28b80e2c83@bytedance.com \
--to=zhouchuyi@bytedance.com \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=cuibixuan@vivo.com \
--cc=daniel@iogearbox.net \
--cc=hannes@cmpxchg.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mhocko@kernel.org \
--cc=mhocko@suse.com \
--cc=muchun.song@linux.dev \
--cc=robin.lu@bytedance.com \
--cc=roman.gushchin@linux.dev \
--cc=wuyun.abel@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
all inboxes | Powered by JetHome®