diff options
author | 2016-11-02 01:20:50 +0000 | |
---|---|---|
committer | 2016-11-02 01:20:50 +0000 | |
commit | 1f212a5e0c92d19620420d1709668a8ef497a4db (patch) | |
tree | a493d4a4d0c3c2b5c83481f7c532cc12c5ad1e1d /lib/libssl/ssl_lib.c | |
parent | Simplify. (diff) | |
download | wireguard-openbsd-1f212a5e0c92d19620420d1709668a8ef497a4db.tar.xz wireguard-openbsd-1f212a5e0c92d19620420d1709668a8ef497a4db.zip |
add per cpu caches for free pool items.
this is modelled on whats described in the "Magazines and Vmem:
Extending the Slab Allocator to Many CPUs and Arbitrary Resources"
paper by Jeff Bonwick and Jonathan Adams.
the main semantic borrowed from the paper is the use of two lists
of free pool items on each cpu, and only moving one of the lists
in and out of a global depot of free lists to mitigate against a
cpu thrashing against that global depot.
unlike slabs, pools do not maintain or cache constructed items,
which allows us to use the items themselves to build the free list
rather than having to allocate arrays to point at constructed pool
items.
the per cpu caches are build on top of the cpumem api.
this has been kicked a bit by hrvoje popovski and simon mages (thank you).
im putting it in now so it is easier to work on and test.
ok jmatthew@
Diffstat (limited to 'lib/libssl/ssl_lib.c')
0 files changed, 0 insertions, 0 deletions