diff options
author | 2022-08-26 11:09:11 +0200 | |
---|---|---|
committer | 2022-10-24 16:49:55 +0200 | |
commit | bc29d5bd2ba977716e57572030290d6547ff3f6d (patch) | |
tree | 45ddfd8c7def630b94a8c880c1970babe657395d /tools/perf/scripts/python/exported-sql-viewer.py | |
parent | Linux 6.1-rc2 (diff) | |
download | wireguard-linux-bc29d5bd2ba977716e57572030290d6547ff3f6d.tar.xz wireguard-linux-bc29d5bd2ba977716e57572030290d6547ff3f6d.zip |
mm/slub: perform free consistency checks before call_rcu
For SLAB_TYPESAFE_BY_RCU caches we use call_rcu to perform empty slab
freeing. The rcu callback rcu_free_slab() calls __free_slab() that
currently includes checking the slab consistency for caches with
SLAB_CONSISTENCY_CHECKS flags. This check needs the slab->objects field
to be intact.
Because in the next patch we want to allow rcu_head in struct slab to
become larger in debug configurations and thus potentially overwrite
more fields through a union than slab_list, we want to limit the fields
used in rcu_free_slab(). Thus move the consistency checks to
free_slab() before call_rcu(). This can be done safely even for
SLAB_TYPESAFE_BY_RCU caches where accesses to the objects can still
occur after freeing them.
As a result, only the slab->slab_cache field has to be physically
separate from rcu_head for the freeing callback to work. We also save
some cycles in the rcu callback for caches with consistency checks
enabled.
Signed-off-by: Vlastimil Babka <vbabka@suse.cz>
Reviewed-by: Hyeonggon Yoo <42.hyeyoo@gmail.com>
Diffstat (limited to 'tools/perf/scripts/python/exported-sql-viewer.py')
0 files changed, 0 insertions, 0 deletions