summaryrefslogtreecommitdiff
path: root/rust/alloc/collections/git@git.tavy.me:linux.git
diff options
context:
space:
mode:
authorVlastimil Babka <vbabka@suse.cz>2026-01-23 07:52:46 +0100
committerVlastimil Babka <vbabka@suse.cz>2026-01-29 09:22:00 +0100
commitf1427a1d64156bb88d84f364855c364af6f67a3b (patch)
tree912d318fd1c241d34ce77d5805155d046f29dd75 /rust/alloc/collections/git@git.tavy.me:linux.git
parentf3421f8d154cc0906da145299c72f4a7f046ffde (diff)
slab: make percpu sheaves compatible with kmalloc_nolock()/kfree_nolock()
Before we enable percpu sheaves for kmalloc caches, we need to make sure kmalloc_nolock() and kfree_nolock() will continue working properly and not spin when not allowed to. Percpu sheaves themselves use local_trylock() so they are already compatible. We just need to be careful with the barn->lock spin_lock. Pass a new allow_spin parameter where necessary to use spin_trylock_irqsave(). In kmalloc_nolock_noprof() we can now attempt alloc_from_pcs() safely, for now it will always fail until we enable sheaves for kmalloc caches next. Similarly in kfree_nolock() we can attempt free_to_pcs(). Reviewed-by: Suren Baghdasaryan <surenb@google.com> Reviewed-by: Harry Yoo <harry.yoo@oracle.com> Reviewed-by: Hao Li <hao.li@linux.dev> Reviewed-by: Liam R. Howlett <Liam.Howlett@oracle.com> Signed-off-by: Vlastimil Babka <vbabka@suse.cz>
Diffstat (limited to 'rust/alloc/collections/git@git.tavy.me:linux.git')
0 files changed, 0 insertions, 0 deletions