lkml.org 
[lkml]   [2023]   [Sep]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [RFC PATCH v2 1/5] mm, oom: Introduce bpf_oom_evaluate_task
From
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

\
 
 \ /
  Last update: 2023-09-13 10:01    [W:6.426 / U:0.044 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site