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

2021-01-15 Thread Yonghong Song
On 1/15/21 5:12 PM, Song Liu wrote: On Jan 15, 2021, at 4:55 PM, Yonghong Song wrote: On 1/15/21 3:34 PM, Song Liu wrote: On Jan 12, 2021, at 8:53 AM, KP Singh wrote: On Tue, Jan 12, 2021 at 5:32 PM Yonghong Song wrote: On 1/11/21 3:45 PM, Song Liu wrote: On Jan 11, 2021,

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

2021-01-15 Thread Song Liu
> On Jan 15, 2021, at 4:55 PM, Yonghong Song wrote: > > > > On 1/15/21 3:34 PM, Song Liu wrote: >>> On Jan 12, 2021, at 8:53 AM, KP Singh wrote: >>> >>> On Tue, Jan 12, 2021 at 5:32 PM Yonghong Song wrote: On 1/11/21 3:45 PM, Song Liu wrote: > > >> On

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

2021-01-15 Thread Yonghong Song
On 1/15/21 3:34 PM, Song Liu wrote: On Jan 12, 2021, at 8:53 AM, KP Singh wrote: On Tue, Jan 12, 2021 at 5:32 PM Yonghong Song wrote: On 1/11/21 3:45 PM, Song Liu wrote: On Jan 11, 2021, at 1:58 PM, Martin Lau wrote: On Mon, Jan 11, 2021 at 10:35:43PM +0100, KP Singh wrote:

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

2021-01-15 Thread Song Liu
> On Jan 12, 2021, at 8:53 AM, KP Singh wrote: > > On Tue, Jan 12, 2021 at 5:32 PM Yonghong Song wrote: >> >> >> >> On 1/11/21 3:45 PM, Song Liu wrote: >>> >>> On Jan 11, 2021, at 1:58 PM, Martin Lau wrote: On Mon, Jan 11, 2021 at 10:35:43PM +0100, KP Singh wrote: >

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

2021-01-12 Thread Martin KaFai Lau
On Mon, Jan 11, 2021 at 03:41:26PM -0800, Song Liu wrote: > > > > On Jan 11, 2021, at 10:56 AM, Martin Lau wrote: > > > > On Fri, Jan 08, 2021 at 03:19:47PM -0800, Song Liu wrote: > > > > [ ... ] > > > >> diff --git a/kernel/bpf/bpf_local_storage.c > >> b/kernel/bpf/bpf_local_storage.c > >>

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

2021-01-12 Thread KP Singh
On Tue, Jan 12, 2021 at 5:32 PM Yonghong Song wrote: > > > > On 1/11/21 3:45 PM, Song Liu wrote: > > > > > >> On Jan 11, 2021, at 1:58 PM, Martin Lau wrote: > >> > >> On Mon, Jan 11, 2021 at 10:35:43PM +0100, KP Singh wrote: > >>> On Mon, Jan 11, 2021 at 7:57 PM Martin KaFai Lau wrote: > >

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

2021-01-12 Thread Yonghong Song
On 1/11/21 3:45 PM, Song Liu wrote: On Jan 11, 2021, at 1:58 PM, Martin Lau wrote: On Mon, Jan 11, 2021 at 10:35:43PM +0100, KP Singh wrote: On Mon, Jan 11, 2021 at 7:57 PM Martin KaFai Lau wrote: On Fri, Jan 08, 2021 at 03:19:47PM -0800, Song Liu wrote: [ ... ] diff --git

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

2021-01-11 Thread Song Liu
> On Jan 11, 2021, at 2:14 AM, KP Singh wrote: > > On Sat, Jan 9, 2021 at 12:35 AM Song Liu wrote: >> >> To access per-task data, BPF program typically creates a hash table with >> pid as the key. This is not ideal because: >> 1. The use need to estimate requires size of the hash table,

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

2021-01-11 Thread Song Liu
> On Jan 11, 2021, at 10:56 AM, Martin Lau wrote: > > On Fri, Jan 08, 2021 at 03:19:47PM -0800, Song Liu wrote: > > [ ... ] > >> diff --git a/kernel/bpf/bpf_local_storage.c b/kernel/bpf/bpf_local_storage.c >> index dd5aedee99e73..9bd47ad2b26f1 100644 >> --- a/kernel/bpf/bpf_local_storage.c

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

2021-01-11 Thread Song Liu
> On Jan 11, 2021, at 1:58 PM, Martin Lau wrote: > > On Mon, Jan 11, 2021 at 10:35:43PM +0100, KP Singh wrote: >> On Mon, Jan 11, 2021 at 7:57 PM Martin KaFai Lau wrote: >>> >>> On Fri, Jan 08, 2021 at 03:19:47PM -0800, Song Liu wrote: >>> >>> [ ... ] >>> diff --git

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

2021-01-11 Thread Martin KaFai Lau
On Mon, Jan 11, 2021 at 10:35:43PM +0100, KP Singh wrote: > On Mon, Jan 11, 2021 at 7:57 PM Martin KaFai Lau wrote: > > > > On Fri, Jan 08, 2021 at 03:19:47PM -0800, Song Liu wrote: > > > > [ ... ] > > > > > diff --git a/kernel/bpf/bpf_local_storage.c > > > b/kernel/bpf/bpf_local_storage.c > > >

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

2021-01-11 Thread KP Singh
On Mon, Jan 11, 2021 at 7:57 PM Martin KaFai Lau wrote: > > On Fri, Jan 08, 2021 at 03:19:47PM -0800, Song Liu wrote: > > [ ... ] > > > diff --git a/kernel/bpf/bpf_local_storage.c b/kernel/bpf/bpf_local_storage.c > > index dd5aedee99e73..9bd47ad2b26f1 100644 > > ---

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

2021-01-11 Thread Martin KaFai Lau
On Fri, Jan 08, 2021 at 03:19:47PM -0800, Song Liu wrote: [ ... ] > diff --git a/kernel/bpf/bpf_local_storage.c b/kernel/bpf/bpf_local_storage.c > index dd5aedee99e73..9bd47ad2b26f1 100644 > --- a/kernel/bpf/bpf_local_storage.c > +++ b/kernel/bpf/bpf_local_storage.c > @@ -140,17 +140,18 @@

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

2021-01-11 Thread Yonghong Song
On 1/8/21 3:19 PM, Song Liu wrote: To access per-task data, BPF program typically creates a hash table with pid as the key. This is not ideal because: 1. The use need to estimate requires size of the hash table, with may be inaccurate; 2. Big hash tables are slow; 3. To clean up

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

2021-01-11 Thread Yonghong Song
On 1/11/21 2:17 AM, KP Singh wrote: On Mon, Jan 11, 2021 at 7:27 AM Yonghong Song wrote: On 1/8/21 3:19 PM, Song Liu wrote: To access per-task data, BPF program typically creates a hash table with pid as the key. This is not ideal because: 1. The use need to estimate requires size of

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

2021-01-11 Thread KP Singh
On Mon, Jan 11, 2021 at 7:27 AM Yonghong Song wrote: > > > > On 1/8/21 3:19 PM, Song Liu wrote: > > To access per-task data, BPF program typically creates a hash table with > > pid as the key. This is not ideal because: > > 1. The use need to estimate requires size of the hash table, with may

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

2021-01-11 Thread KP Singh
On Sat, Jan 9, 2021 at 12:35 AM Song Liu wrote: > > To access per-task data, BPF program typically creates a hash table with > pid as the key. This is not ideal because: > 1. The use need to estimate requires size of the hash table, with may be > inaccurate; > 2. Big hash tables are slow; >

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

2021-01-10 Thread Yonghong Song
On 1/8/21 3:19 PM, Song Liu wrote: To access per-task data, BPF program typically creates a hash table with pid as the key. This is not ideal because: 1. The use need to estimate requires size of the hash table, with may be inaccurate; 2. Big hash tables are slow; 3. To clean up