lkml.org 
[lkml]   [2009]   [May]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: Q: semaphore and kmalloc(GFP_KERNEL)?
From
Date
KOSAKI Motohiro wrote:
> > Can the kernel detect that we need to let kmalloc() fail and
> > wake up the writer process so that the writer process releases
> > the rw_semaphore and reader processes can continue?
>
> it can't. Plus it shouldn't.
> some caller don't want kmalloc() failure.

Thanks.
Then, should I move kmalloc(GFP_KERNEL) to outside the lock whenever possible?
(I worry some lock held by the caller interferes kmalloc(GFP_KERNEL).)


\
 
 \ /
  Last update: 2009-05-11 05:21    [W:0.048 / U:0.372 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site