[PATCH xserver 5/9] Create a threaded mechanism for input [v5]

Alan Coopersmith alan.coopersmith at oracle.com
Thu May 12 18:01:38 UTC 2016

On 05/12/16 10:47 AM, Keith Packard wrote:
> Emil Velikov <emil.l.velikov at gmail.com> writes:
>> Then again I'm wondering if linking with pthread, won't lead to some
>> noticeable perf degradation, as a fair few POSIX functions will now
>> pthread_mutex_lock/unlock as opposed using the Glibc stub.
> The big concern I had years ago when we looked at this was malloc, but
> glibc uses arenas to avoid contention, and uncontended mutexes are
> pretty cheap these days.
> stdio is a disaster, but we don't use that in any critical paths.
> I haven't been able to measure any performance impact from this series,
> but I've only tested on Linux.

Solaris 10 and later have the real pthread & mutex functions in libc
and dropped the stubs that were in libc in older releases, so we
already use the thread safe versions and I wouldn't expect any
performance problems on Solaris from that change.

	-Alan Coopersmith-              alan.coopersmith at oracle.com
	 Oracle Solaris Engineering - http://blogs.oracle.com/alanc

More information about the xorg-devel mailing list