Skip to contentSkip to conversation

Can kmem_cache_free block?

DISCUSSION Steve French 2 participants 2 messages Mar 28, 2008 – Mar 29, 2008

lore
Share & tools
lore
#0 lore raw

Is kmem_cache_free safe to call while holding a spinlock (can kmem_cache_free ever block or recurse into a file system)?

I see it trying to grab just another spinlock which is probably fine (but was worried whether any of the worker functions called a sem) ... my assumption is that it would be safe, but the man page doesn't mention when it can be used safely.

Signature · 3 lines
Thanks,

Steve
#1 lore raw
Quoted 7 lines · Steve French

Is kmem_cache_free safe to call while holding a spinlock (can kmem_cache_free ever block or recurse into a file system)?

I see it trying to grab just another spinlock which is probably fine (but was worried whether any of the worker functions called a sem) ... my assumption is that it would be safe, but the man page doesn't mention when it can be used safely.

Yes you can call it from any context.