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

2021-02-25 Thread Martin KaFai Lau
On Tue, Feb 23, 2021 at 02:28:40PM -0800, Song Liu wrote: > 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 ar

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

2021-02-23 Thread Yonghong Song
On 2/23/21 2:28 PM, Song Liu wrote: 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

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

2021-02-23 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,