Re: [PATCH 3/3] bpf: hash: use per-bucket spinlock

2015-12-28 Thread Ming Lei
On Mon, Dec 28, 2015 at 5:13 PM, Daniel Borkmann wrote: > On 12/26/2015 10:31 AM, Ming Lei wrote: >> >> From: Ming Lei >> >> Both htab_map_update_elem() and htab_map_delete_elem() can be >> called from eBPF program, and they may be in kernel hot

Re: [PATCH 3/3] bpf: hash: use per-bucket spinlock

2015-12-28 Thread Daniel Borkmann
On 12/26/2015 10:31 AM, Ming Lei wrote: From: Ming Lei Both htab_map_update_elem() and htab_map_delete_elem() can be called from eBPF program, and they may be in kernel hot path, so it isn't efficient to use a per-hashtable lock in this two helpers. The per-hashtable

[PATCH 3/3] bpf: hash: use per-bucket spinlock

2015-12-26 Thread Ming Lei
From: Ming Lei Both htab_map_update_elem() and htab_map_delete_elem() can be called from eBPF program, and they may be in kernel hot path, so it isn't efficient to use a per-hashtable lock in this two helpers. The per-hashtable spinlock is used just for protecting