[lkml]   [2001]   [Jan]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH] 2.4.0-prerelease: preemptive kernel.
On Thu, Jan 04, 2001 at 11:32:11PM +1100, Anton Blanchard wrote:
> > I think a better way to proceed would be to make semaphores a bit more
> > intelligent and turn them into something like adaptive spinlocks and use
> > them more where appropiate (currently using semaphores usually causes
> > lots of context switches where some could probably be avoided). Problem
> > is that for some cases like your producer-consumer pattern (which has been
> > used previously in unreleased kernel code BTW) it would be a pessimization
> > to spin, so such adaptive locks would probably need a different name.
> Like solaris adaptive mutexes? It would be interesting to test,
> however considering read/write semaphores are hardly ever used these
> days we want to be sure they are worth it before adding yet another
> synchronisation primitive.

A bit similar, yes, but much simpler @-)

The problem is that current Linux semaphores are very costly locks -- they
always cause a context switch.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
Please read the FAQ at

 \ /
  Last update: 2005-03-22 12:52    [W:2.043 / U:0.012 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site