Re: [PATCH] lockdep: lock_set_subclass - reset a held lock's subclass

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Jeremy Fitzhardinge
Date: Friday, August 1, 2008 - 12:10 pm

Linus Torvalds wrote:

I have a function traversing a pagetable in vaddr order (low to high), 
taking pte locks as it builds up batches of pte page updates.  When the 
batch is issued, it releases all the locks, and won't end up holding 
more than ~16 at a time.

So, I think this is OK.  There are no internal lock ordering issues, and 
I don't think there'll be any bad interactions from someone trying to 
take pte locks for two separate pagetables.  I don't think there's 
anyone else trying to take more than one pte lock at once, but if there 
were "lock low vaddr then high" seems like a reasonable locking rule (or 
more precisely "lowest" to deal with the case of a pte page being 
aliased at multiple vaddrs).

Lockdep complains because the split pte locks are all in the same lock 
class, so it reports it as taking a spinlock recursively.  I'd reported 
this to PeterZ before, and he responded with "uh, I'll think about 
it...", which I took to mean "...when someone else has a problem".  So 
I'm wondering if this is that time...

(This is all with split pte locks, obviously.)

    J
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[git pull] scheduler fixes, Ingo Molnar, (Thu Jul 31, 2:43 pm)
Re: [git pull] scheduler fixes, David Miller, (Thu Jul 31, 3:04 pm)
Re: [git pull] scheduler fixes, Ingo Molnar, (Thu Jul 31, 3:26 pm)
Re: [git pull] scheduler fixes, David Miller, (Thu Jul 31, 3:55 pm)
Re: [git pull] scheduler fixes, David Miller, (Fri Aug 1, 1:11 am)
Re: [git pull] scheduler fixes, Ingo Molnar, (Fri Aug 1, 2:01 am)
Re: [git pull] scheduler fixes, David Miller, (Fri Aug 1, 2:13 am)
[PATCH] lockdep: re-annotate scheduler runqueues, Peter Zijlstra, (Fri Aug 1, 4:08 am)
Re: [PATCH] lockdep: re-annotate scheduler runqueues, Linus Torvalds, (Fri Aug 1, 10:04 am)
Re: [PATCH] lockdep: lock_set_subclass - reset a held lock ..., Jeremy Fitzhardinge, (Fri Aug 1, 11:06 am)
Re: [PATCH] lockdep: lock_set_subclass - reset a held lock ..., Jeremy Fitzhardinge, (Fri Aug 1, 12:10 pm)
Re: [PATCH] lockdep: lock_set_subclass - reset a held lock ..., Jeremy Fitzhardinge, (Fri Aug 1, 1:08 pm)
Re: [PATCH] lockdep: lock_set_subclass - reset a held lock ..., Jeremy Fitzhardinge, (Fri Aug 1, 1:22 pm)
Re: [PATCH] lockdep: re-annotate scheduler runqueues, David Miller, (Sat Aug 2, 1:34 am)