diff options
author | 2022-03-07 07:40:56 +0000 | |
---|---|---|
committer | 2022-03-09 12:25:29 +0100 | |
commit | 6d3a16d09bfac2883b8ea12a83d4420a4062d8c0 (patch) | |
tree | a81c35118c8dae42e569586884ee6e2ee85bb475 /mm/util.c | |
parent | mm/slub: limit number of node partial slabs only in cache creation (diff) | |
download | wireguard-linux-6d3a16d09bfac2883b8ea12a83d4420a4062d8c0.tar.xz wireguard-linux-6d3a16d09bfac2883b8ea12a83d4420a4062d8c0.zip |
mm/slub: refactor deactivate_slab()
Simplify deactivate_slab() by unlocking n->list_lock and retrying
cmpxchg_double() when cmpxchg_double() fails, and perform
add_{partial,full} only when it succeed.
Releasing and taking n->list_lock again here is not harmful as SLUB
avoids deactivating slabs as much as possible.
[ vbabka@suse.cz: perform add_{partial,full} when cmpxchg_double()
succeed.
count deactivating full slabs even if debugging flag is not set. ]
Signed-off-by: Hyeonggon Yoo <42.hyeyoo@gmail.com>
Reviewed-by: Vlastimil Babka <vbabka@suse.cz>
Reviewed-by: Roman Gushchin <roman.gushchin@linux.dev>
Signed-off-by: Vlastimil Babka <vbabka@suse.cz>
Link: https://lore.kernel.org/r/20220307074057.902222-3-42.hyeyoo@gmail.com
Diffstat (limited to 'mm/util.c')
0 files changed, 0 insertions, 0 deletions