lkml.org 
[lkml]   [2022]   [Aug]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH] selftests/bpf: simplify cgroup_hierarchical_stats selftest
On Mon, Aug 29, 2022 at 6:07 PM Yosry Ahmed <yosryahmed@google.com> wrote:
>
> On Mon, Aug 29, 2022 at 3:15 PM Yosry Ahmed <yosryahmed@google.com> wrote:
> >
> > On Mon, Aug 29, 2022 at 1:08 PM Hao Luo <haoluo@google.com> wrote:
> > >
> > > On Fri, Aug 26, 2022 at 4:06 PM Yosry Ahmed <yosryahmed@google.com> wrote:
> > > >
[...]
> > > >
> > > > -SEC("tp_btf/mm_vmscan_memcg_reclaim_begin")
> > > > -int BPF_PROG(vmscan_start, int order, gfp_t gfp_flags)
> > > > +SEC("fentry/cgroup_attach_task")
> > >
> > > Can we select an attachpoint that is more stable? It seems
> > > 'cgroup_attach_task' is an internal helper function in cgroup, and its
> > > signature can change. I'd prefer using those commonly used tracepoints
> > > and EXPORT'ed functions. IMHO their interfaces are more stable.
> > >
> >
> > Will try to find a more stable attach point. Thanks!
>
> Hey Hao,
>
> I couldn't find any suitable stable attach points under kernel/cgroup.
> Most tracepoints are created using TRACE_CGROUP_PATH which only
> invokes the tracepoint if the trace event is enabled, which I assume
> is not something we can rely on. Otherwise, there is only

Can we explicitly enable the cgroup_attach_task event, just for this
test? If it's not easy, I am fine with using fentry.

> trace_cgroup_setup_root() and trace_cgroup_destroy_root() which are
> irrelevant here. A lot of EXPORT'ed functions are not called in the
> kernel, or cannot be invoked from userspace (the test) in a
> straightforward way. Even if they did, future changes to such code
> paths can also change in the future, so I don't think there is really
> a way to guarantee that future changes don't break the test.
>
> Let me know what you think.
>

\
 
 \ /
  Last update: 2022-08-30 03:43    [W:0.074 / U:0.580 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site