Messages in this thread | | | Date | Fri, 8 Feb 2002 00:20:37 -0800 (PST) | From | Nigel Gamble <> | Subject | Re: [RFC] New locking primitive for 2.5 |
| |
On Thu, 7 Feb 2002, Andrew Morton wrote: > I dunno. The spin-a-bit-then-sleep lock has always struck me as > i_dont_know_what_the_fuck_im_doing_lock(). Martin's approach puts > the decision in the hands of the programmer, rather than saying > "Oh gee I goofed" at runtime.
I completely agree, and I couldn't have put it better! Kernel programmers really should know exactly why, what, where and for how long they are holding a lock.
This is why, incidently, I don't like any of the so-called lockless schemes, including the original unix kernel monitor lock (i.e. only one kernel thread active at a time), because they encourage unmaintainable code where the critical sections are invisible to everyone and are easily broken when someone accidently inserts a blocking function into one of the invisible critical sections.
Nigel Gamble nigel@nrg.org Mountain View, CA, USA. http://www.nrg.org/
- 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/
| |