Commit 7e23073
mm/slub: introduce helpers for node partial slab state
Wrap partial slab count inc/dec and flag set/clear into
helper functions to reduce code duplication.
Note that __add_partial() is called locklessly in
early_kmem_cache_node_alloc(), but since there is no such use case for
removal, __remove_partial() does not exist.
Suggested-by: Harry Yoo <harry@kernel.org>
Signed-off-by: Hao Li <hao.li@linux.dev>
Link: https://patch.msgid.link/20260529035120.81304-2-hao.li@linux.dev
Reviewed-by: Harry Yoo (Oracle) <harry@kernel.org>
Signed-off-by: Vlastimil Babka (SUSE) <vbabka@kernel.org>1 parent e562904 commit 7e23073
1 file changed
Lines changed: 17 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3521 | 3521 | | |
3522 | 3522 | | |
3523 | 3523 | | |
| 3524 | + | |
| 3525 | + | |
| 3526 | + | |
| 3527 | + | |
| 3528 | + | |
| 3529 | + | |
| 3530 | + | |
3524 | 3531 | | |
3525 | 3532 | | |
3526 | 3533 | | |
3527 | | - | |
3528 | 3534 | | |
3529 | 3535 | | |
3530 | 3536 | | |
3531 | 3537 | | |
3532 | | - | |
| 3538 | + | |
3533 | 3539 | | |
3534 | 3540 | | |
3535 | 3541 | | |
| |||
3539 | 3545 | | |
3540 | 3546 | | |
3541 | 3547 | | |
| 3548 | + | |
| 3549 | + | |
| 3550 | + | |
| 3551 | + | |
| 3552 | + | |
| 3553 | + | |
| 3554 | + | |
3542 | 3555 | | |
3543 | 3556 | | |
3544 | 3557 | | |
3545 | 3558 | | |
3546 | 3559 | | |
3547 | | - | |
3548 | | - | |
| 3560 | + | |
3549 | 3561 | | |
3550 | 3562 | | |
3551 | 3563 | | |
| |||
8266 | 8278 | | |
8267 | 8279 | | |
8268 | 8280 | | |
8269 | | - | |
8270 | | - | |
| 8281 | + | |
8271 | 8282 | | |
8272 | 8283 | | |
8273 | 8284 | | |
| |||
0 commit comments