lkml.org 
[lkml]   [2001]   [Dec]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: kmem_cache_alloc & kernel_lock

On Sun, 9 Dec 2001, Frank Cornelis wrote:

> Can I use kmem_cache_alloc(mycache_cachep, SLAB_KERNEL) within a
> kernel_lock/kernel_unlock block? Or should it be SLAB_ATOMIC?

kernel_lock/kernel_unlock is not a spinlock in the classic Linux sense.
It's automatically undone on scheduling, so you can hold it while
rescheduling, and it will be automatically re-acquired once the process
gets runnable again.

Ingo

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:18    [W:0.123 / U:3.800 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site