Re: [patch] remove the BKL (Big Kernel Lock), this time for real

From: hui
Date: Thu Sep 16 2004 - 17:55:38 EST


On Thu, Sep 16, 2004 at 03:40:11PM -0700, David S. Miller wrote:
> On Thu, 16 Sep 2004 15:29:03 -0700
> Bill Huey (hui) <bhuey@xxxxxxxx> wrote:
>
> > FreeBSD-current uses adaptive mutexes. However they spin on that mutex
> > only if the thread owning it is running across another CPU at that time,
> > otherwise it sleeps, maybe priority inherited depending on the
> > circumstance.
>
> This is how Solaris MUTEX objects work too.

Yeah, I know from Solaris Internals and FreeBSD can be considered a
Solaris style kernel. In contract, I think the Linux community has a
few things up on FreeBSD/Solaris style SMP. Specifically, the FreeBSD
community has ignored a lot of the really hard work of pushing down
locks in favor of "getting fancier locks", which only abuses thread
priorities and the scheduler. A large part of it is because they have
really create a very complicated SMP infrastructure that less than a
handful of their kernel engineers really know how to use, 2-3, it
seems.

Judging from how the Linux code is done and the numbers I get from
Bill Irwin in casual conversation, the Linux SMP approach is clearly
the right track at this time with it's hand honed per-CPU awareness of
things. The only serious problem that spinlocks have as they aren't
preemptable, which is what Ingo is trying to fix.

bill

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/