[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: [dm-devel] kmalloc after down_write?
- From: Kevin Corry <kevcorry us ibm com>
- To: dm-devel redhat com, mingz ele uri edu
- Cc:
- Subject: Re: [dm-devel] kmalloc after down_write?
- Date: Fri, 19 Nov 2004 12:21:15 -0600
On Friday 19 November 2004 12:10 pm, Ming Zhang wrote:
> I am reading dm-snap.c and found that in register_snapshot(),
> http://lxr.linux.no/source/drivers/md/dm-snap.c?v=2.6.8.1#L159,
> the kmalloc is called with rwsem held. I am not sure if this is a good
> one since kmalloc may sleep as well.
It's a semaphore, not a spinlock. Sleeping is allowed while holding a
semaphore, since other threads waiting on the semaphore are also rescheduled
(instead of just spinning).
--
Kevin Corry
kevcorry us ibm com
http://evms.sourceforge.net/
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]