linux/kernel/bpf
Alexei Starovoitov e19494edab bpf: introduce percpu_freelist
Introduce simple percpu_freelist to keep single list of elements
spread across per-cpu singly linked lists.

/* push element into the list */
void pcpu_freelist_push(struct pcpu_freelist *, struct pcpu_freelist_node *);

/* pop element from the list */
struct pcpu_freelist_node *pcpu_freelist_pop(struct pcpu_freelist *);

The object is pushed to the current cpu list.
Pop first trying to get the object from the current cpu list,
if it's empty goes to the neigbour cpu list.

For bpf program usage pattern the collision rate is very low,
since programs push and pop the objects typically on the same cpu.

Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2016-03-08 15:28:31 -05:00
..
arraymap.c bpf: add lookup/update support for per-cpu hash and array maps 2016-02-06 03:34:36 -05:00
core.c bpf: move clearing of A/X into classic to eBPF migration prologue 2015-12-18 16:04:51 -05:00
hashtab.c bpf: grab rcu read lock for bpf_percpu_hash_update 2016-02-19 14:37:43 -05:00
helpers.c bpf: split state from prandom_u32() and consolidate {c, e}BPF prngs 2015-10-08 05:26:39 -07:00
inode.c bpf, inode: allow for rename and link ops 2015-12-12 18:44:23 -05:00
Makefile bpf: introduce percpu_freelist 2016-03-08 15:28:31 -05:00
percpu_freelist.c bpf: introduce percpu_freelist 2016-03-08 15:28:31 -05:00
percpu_freelist.h bpf: introduce percpu_freelist 2016-03-08 15:28:31 -05:00
stackmap.c bpf: introduce BPF_MAP_TYPE_STACK_TRACE 2016-02-20 00:21:44 -05:00
syscall.c bpf: prevent kprobe+bpf deadlocks 2016-03-08 15:28:30 -05:00
verifier.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2016-02-23 00:09:14 -05:00