uclibc and smp

Paul Mundt lethal at linux-sh.org
Wed Sep 24 10:32:33 UTC 2008


On Mon, Sep 22, 2008 at 12:34:53PM -0500, Rob Landley wrote:
> On Friday 05 September 2008 16:45:55 Joe Taylor wrote:
> > I'm trying to obtain a rough measure of uclibc's maturity on SMP systems. 
> > I see some SMP hooks in the source code, but I cannot seem to find much
> > information on uclibc-based projects running on SMP systems.
> 
> SMP is really a kernel thing, not a userspace thing.  (Userspace sees 
> threading, but doesn't care if it's smp, UP scheduling, hyper-threading...)
> 
That's not entirely true, there are places in the libc where userspace
cares, especially in terms of locking and mutex operations, and figuring
out precisely how strong these need to be. NPTL does a number of
optimizations in this case, for example.

Beyond that, things like page placement, avoiding cacheline bouncing, CPU
affinity, IRQ balancing, etc. are all very much userspace problems that
the kernel can't do much about on its own, although these are not purely
libc related issues.

Regarding Joe's question, there are places where we can do some more
optimizations on SMP, but there should be nothing today causing any
instability with uClibc on SMP systems. If this is an area you are
interested in, it would be nice to see some numbers comparing against
glibc (although obviously this is going to be completely different for
each platform, especially in relation to atomic ops), and any reports on
whether you hit problems or not.

I've not encountered any problems with uClibc on SH SMP, although we do
need some atomic op changes based on auxvt hinting.



More information about the uClibc mailing list