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

Keith Packard keithp at keithp.com
Thu May 12 17:47:48 UTC 2016


Emil Velikov <emil.l.velikov at gmail.com> writes:

> This will enable it on more platforms than just Linux.

Right, the goal is to use it where available.

> You can use AX_PTHREAD here, instead of open-coding it.

Thanks. I've updated the series to do this; it's on my input-thread
branch in git://people.freedesktop.org/~keithp/xserver

> 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.

-- 
-keith
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 810 bytes
Desc: not available
URL: <https://lists.x.org/archives/xorg-devel/attachments/20160512/18e2d303/attachment.sig>


More information about the xorg-devel mailing list