This is the mail archive of the libc-alpha@sources.redhat.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: malloc() and spinlocks


> > Please do not break the SMP performance of malloc (at least don't break
it
> > more than it is already).

>  I don't want to break anything. I just want something like this - see the
> thread-m.h.patch attachment. I don't know if the code should be duplicated
or
> if the spinlock code is not necessary in the not _LIBC part. The

Generally the spinlock style locks perform better in threaded
applications on SMP hardware anyway. I'm not aware of the
motivations behind choosing the more heavy lock code, but a
change to spinlocks probably won't hurt threaded applications.

However, you worried me a little stating that a threaded application is
rare, and the implication that it is ok to degrade threaded application
performance. I would suggest testing the performance of various
types of application with your change --- it would not be good
to be the guy who broke malloc performance for server applications :)

Given some time, I can test some SMP hardware with server
applications which beat heavily on malloc, but not this week
(Thanksgiving holiday in the US).




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]