Re: [PATCH v4 bpf-next 1/6] bpf: enable task local storage for tracing programs

2021-02-23 Thread Song Liu
> On Feb 23, 2021, at 11:23 AM, Martin Lau wrote: > > On Mon, Feb 22, 2021 at 05:20:09PM -0800, Song Liu wrote: > [ ... ] > >> diff --git a/kernel/bpf/bpf_task_storage.c b/kernel/bpf/bpf_task_storage.c >> index e0da0258b732d..2034019966d44 100644 >> --- a/kernel/bpf/bpf_task_storage.c >> +++

Re: [PATCH v4 bpf-next 1/6] bpf: enable task local storage for tracing programs

2021-02-23 Thread Martin KaFai Lau
On Mon, Feb 22, 2021 at 05:20:09PM -0800, Song Liu wrote: [ ... ] > diff --git a/kernel/bpf/bpf_task_storage.c b/kernel/bpf/bpf_task_storage.c > index e0da0258b732d..2034019966d44 100644 > --- a/kernel/bpf/bpf_task_storage.c > +++ b/kernel/bpf/bpf_task_storage.c > @@ -15,7 +15,6 @@ > #include >

Re: [PATCH v4 bpf-next 1/6] bpf: enable task local storage for tracing programs

2021-02-22 Thread kernel test robot
Hi Song, I love your patch! Yet something to improve: [auto build test ERROR on bpf-next/master] url: https://github.com/0day-ci/linux/commits/Song-Liu/bpf-enable-task-local-storage-for-tracing-programs/20210223-092439 base: https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git

Re: [PATCH v4 bpf-next 1/6] bpf: enable task local storage for tracing programs

2021-02-22 Thread kernel test robot
Hi Song, I love your patch! Yet something to improve: [auto build test ERROR on bpf-next/master] url: https://github.com/0day-ci/linux/commits/Song-Liu/bpf-enable-task-local-storage-for-tracing-programs/20210223-092439 base: https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git

[PATCH v4 bpf-next 1/6] bpf: enable task local storage for tracing programs

2021-02-22 Thread Song Liu
To access per-task data, BPF programs usually creates a hash table with pid as the key. This is not ideal because: 1. The user need to estimate the proper size of the hash table, which may be inaccurate; 2. Big hash tables are slow; 3. To clean up the data properly during task terminations,