lkml.org 
[lkml]   [2007]   [Mar]   [19]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
DateMon, 19 Mar 2007 16:37:13 +1100
FromNick Piggin <>
SubjectRe: [PATCH 1/3] revoke: misc fixes
Pekka Enberg wrote:
> On 3/16/07, Nick Piggin <nickpiggin@yahoo.com.au> wrote:
> 
>> Also, a down_write_trylock attempt inside i_mmap_lock should be a valid
>> optimisation.
> 
> 
> I am not sure what you're thinking here. down_write_trylock acquires
> ->mmap_sem which can deadlock with ->i_mmap_lock, no?

You need hold and wait for a deadlock. So long as you don't block
(on mmap_sem) while holding i_mmap_lock, then you won't deadlock.

So you could just attempt a trylock, and if it works, then you
could revoke the vma right then and there. OTOH, the patch you
subsequently posted looks fine, so unless this is performance
critical then I wouldn't bother ;)

-- 
SUSE Labs, Novell Inc.
Send instant messages to your online friends http://au.messenger.yahoo.com 

-
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: 2007-03-19 06:39    [from the cache]
©2003-2008