Re: lockdep: how to tell it multiple pte locks is OK?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, 7 Oct 2007 10:17:47 -0700
Jeremy Fitzhardinge <[email protected]> wrote:

> 
> On Oct 7, 2007, at 9:58 AM, Arjan van de Ven wrote:
> 
> > On Sat, 06 Oct 2007 23:31:33 -0700
> >
> >> I'm presume I'm the first person to try holding multiple pte locks
> >> at once, so there's no existing locking order for these locks.  I'm
> >> always traversing and locking the pagetable in virtual address
> >> order (and this seems like a sane-enough rule for anyone else who
> >> wants to hold multiple pte locks).
> >
> > I'm not sure that's a valid assumption in light of things like
> > sharing pagetables between processes etc etc..
> > (granted, that one is out of tree right now but I still hope it'll
> > go in some day:)
> 
> Well, yes, but that will take some thought about how split pte locks  
> will work anyway (or more specifically, fork will probably just end  
> up reusing the pte pages and avoid the need to do any
> cross-pagetable pte locking anyway, though I guess that will be
> deferred to COW handling).
> 
> So are you saying I should pass up the opportunity to optimise a  
> relatively hot path (fork/exec/exit) because it will need some  
> further thought if/when shared ptes get implemented? 

s/implemented/merged/ :)

IN fact shared pagetables are already there for hugepages.
For small pages it's a patch at this point.

> Doesn't seem  
> like a good tradeoff...

no I'm not saying that. I'm just saying that I'm worried about the
locking robustness of your trick in general.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux