On Thu, 8 May 2008, Andrea Arcangeli wrote:If mmy_notifier_register() takes the global lock, it cannot happen here. It will be blocked (by CPU0), so there's no way it can then cause an ABBA deadlock. It will be released when CPU0 has taken *all* the locks it needed to take. NO! You replace mm_lock() with the sequence that Andrew gave you (and I described): spin_lock(&global_lock) .. get all locks UNORDERED .. spin_unlock(&global_lock) and you're now done. You have your "mm_lock()" (which still needs to be renamed - it should be a "mmu_notifier_lock()" or something like that), but you don't need the insane sorting. At most you apparently need a way to recognize duplicates (so that you don't deadlock on yourself), which looks like a simple bit-per-vma. The global lock doesn't protect any data structures itself - it just protects two of these mm_lock() functions from ABBA'ing on each other! Linus --
| Andrea Arcangeli | [PATCH 06 of 11] rwsem contended |
| Mikulas Patocka | LFENCE instruction (was: [rfc][patch 3/3] x86: optimise barriers) |
| Rafael J. Wysocki | Re: [Bug 10030] Suspend doesn't work when SD card is inserted |
| Manu Abraham | PCIE |
git: | |
| Sverre Rabbelier | Git vs Monotone |
| Junio C Hamano | [ANNOUNCE] GIT 1.5.4 |
| Bill Lear | Meaning of "fatal: protocol error: bad line length character"? |
| Junio C Hamano | Re: [PATCH] Teach remote machinery about remotes.default config variable |
| Richard Stallman | Real men don't attack straw men |
| Stefan Beke | mail dovecot: pipe() failed: Too many open files |
| Wijnand Wiersma | Almost success: OpenBSD on Xen |
| Didier Wiroth | how can I "find xyz | xargs tar" ... like gtar |
| Greg A. Woods | Re: Fork bomb protection patch |
| Tyler Retzlaff | Re: more summer of code fun |
| Elad Efrat | Re: sysctl knob to let sugid processes dump core (pr 15994) |
| Thor Lancelot Simon | Re: FFS journal |
