diff options
| author | Mathias Krause <minipli@googlemail.com> | 2018-05-03 11:55:07 +0300 |
|---|---|---|
| committer | Steffen Klassert <steffen.klassert@secunet.com> | 2018-05-04 11:14:00 +0300 |
| commit | 565f0fa902b64020d5d147ff1708567e9e0b6e49 (patch) | |
| tree | d9b201aa8f3eec09b02e5ff476f30ae658b661bd /tools/perf/scripts/python/call-graph-from-sql.py | |
| parent | 154a8c46bad2aae171fa25d5fa1d04165ef69650 (diff) | |
| download | linux-565f0fa902b64020d5d147ff1708567e9e0b6e49.tar.xz | |
xfrm: use a dedicated slab cache for struct xfrm_state
struct xfrm_state is rather large (768 bytes here) and therefore wastes
quite a lot of memory as it falls into the kmalloc-1024 slab cache,
leaving 256 bytes of unused memory per XFRM state object -- a net waste
of 25%.
Using a dedicated slab cache for struct xfrm_state reduces the level of
internal fragmentation to a minimum.
On my configuration SLUB chooses to create a slab cache covering 4
pages holding 21 objects, resulting in an average memory waste of ~13
bytes per object -- a net waste of only 1.6%.
In my tests this led to memory savings of roughly 2.3MB for 10k XFRM
states.
Signed-off-by: Mathias Krause <minipli@googlemail.com>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Diffstat (limited to 'tools/perf/scripts/python/call-graph-from-sql.py')
0 files changed, 0 insertions, 0 deletions
