On Wed, 7 May 2008, Andrea Arcangeli wrote:I really suspect we don't really have to, and that it would be better to just fix the code that does that. The thing is, I didn't like that one *either*. I thought it was the biggest turd in the series (and by "biggest", I literally mean "most lines of turd-ness" rather than necessarily "ugliest per se"). I literally think that mm_lock() is an unbelievable piece of utter and horrible CRAP. There's simply no excuse for code like that. If you want to avoid the deadlock from taking multiple locks in order, but there is really just a single operation that needs it, there's a really really simple solution. And that solution is *not* to sort the whole damn f*cking list in a vmalloc'ed data structure prior to locking! Damn. No, the simple solution is to just make up a whole new upper-level lock, and get that lock *first*. You can then take all the multiple locks at a lower level in any order you damn well please. And yes, it's one more lock, and yes, it serializes stuff, but: - that code had better not be critical anyway, because if it was, then the whole "vmalloc+sort+lock+vunmap" sh*t was wrong _anyway_ - parallelism is overrated: it doesn't matter one effing _whit_ if something is a hundred times more parallel, if it's also a hundred times *SLOWER*. So dang it, flush the whole damn series down the toilet and either forget the thing entirely, or re-do it sanely. And here's an admission that I lied: it wasn't *all* clearly crap. I did like one part, namely list_del_init_rcu(), but that one should have been in a separate patch. I'll happily apply that one. Linus --
| Klaus S. Madsen | Regression in 2.6.25-rc3: s2ram segfaults before suspending |
| Dan Hecht | Re: + stupid-hack-to-make-mainline-build.patch added to -mm tree |
| Balbir Singh | Re: 2.6.23-rc7-mm1 - 'touch' command causes Oops. |
| Arjan van de Ven | [patch] Add basic sanity checks to the syscall execution patch |
git: | |
| Nicolas Pitre | Re: [PATCH] diff-delta: produce optimal pack data |
| Catalin Marinas | Re: hgmq vs. StGIT |
| Mark Levedahl | [PATCH] git-clone - Set remotes.origin config variable |
| Junio C Hamano | Re: tracking repository |
| Richard Daemon | Re: booting openbsd on eee without cd-rom |
| Matt | Setting up a virtual hosting machine w. SSH/SFTP accounts - pitfalls/experiences? |
| Paul Greidanus | [Fwd: Open-Hardware] |
| GVG GVG | ssh_exchange_identification: Connection closed by remote host |
| Jim Winstead Jr. | Re: Root Disk/Book Disk Compatibility |
| Paul Douglas Page | Where is mkfs? |
| Howard Wei-Hao Pan | [Q] Does Linux work with PCMCIA devices? |
| Timothy L. Kay | Use PERL rather than C for system commands? |
