Commit 41bec7c
committed
mm/slub: remove slab_lock() usage for debug operations
All alloc and free operations on debug caches are now serialized by
n->list_lock, so we can remove slab_lock() usage in validate_slab()
and list_slab_objects() as those also happen under n->list_lock.
Note the usage in list_slab_objects() could happen even on non-debug
caches, but only during cache shutdown time, so there should not be any
parallel freeing activity anymore. Except for buggy slab users, but in
that case the slab_lock() would not help against the common cmpxchg
based fast paths (in non-debug caches) anyway.
Also adjust documentation comments accordingly.
Suggested-by: Hyeonggon Yoo <42.hyeyoo@gmail.com>
Signed-off-by: Vlastimil Babka <vbabka@suse.cz>
Reviewed-by: Hyeonggon Yoo <42.hyeyoo@gmail.com>
Acked-by: David Rientjes <rientjes@google.com>1 parent c7323a5 commit 41bec7c
1 file changed
Lines changed: 8 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
53 | | - | |
| 53 | + | |
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
| |||
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
67 | | - | |
68 | | - | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
69 | 70 | | |
70 | 71 | | |
71 | 72 | | |
| |||
94 | 95 | | |
95 | 96 | | |
96 | 97 | | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
97 | 101 | | |
98 | 102 | | |
99 | 103 | | |
| |||
4369 | 4373 | | |
4370 | 4374 | | |
4371 | 4375 | | |
4372 | | - | |
4373 | 4376 | | |
4374 | 4377 | | |
4375 | 4378 | | |
| |||
4380 | 4383 | | |
4381 | 4384 | | |
4382 | 4385 | | |
4383 | | - | |
4384 | 4386 | | |
4385 | 4387 | | |
4386 | 4388 | | |
| |||
5108 | 5110 | | |
5109 | 5111 | | |
5110 | 5112 | | |
5111 | | - | |
5112 | | - | |
5113 | | - | |
5114 | 5113 | | |
5115 | 5114 | | |
5116 | | - | |
| 5115 | + | |
5117 | 5116 | | |
5118 | 5117 | | |
5119 | 5118 | | |
| |||
5124 | 5123 | | |
5125 | 5124 | | |
5126 | 5125 | | |
5127 | | - | |
5128 | | - | |
5129 | 5126 | | |
5130 | 5127 | | |
5131 | 5128 | | |
| |||
0 commit comments