Strawman proposal: making libthr default thread implementation?
Daniel Eischen
deischen at freebsd.org
Thu Jul 6 12:10:22 UTC 2006
On Mon, 3 Jul 2006, David Xu wrote:
> but reality is, mysql is using system scope in libpthread to get better
> performance but not process scope thread. in the real world, these
> nominal features are also not used widely, using it can only cause
> serious performance problem in most applications, until you need hard
> realtime, but why do you use FreeBSD if you need hard realtime ?
> there are dedicated systems which are designed for this requirement.
> I still does not find an application really need this feature. Also
> I don't think one can easily implement a modern CPU friendly scheduler
> in userland, HTT, shared L2 dual-core, NUMA scheduling, doing it in kernel is
> already extreme diffcult, putting lots of effort in single library but other
> single threaded application still gain nothing is also not worthy to work
> on M:N thread library.
I don't need hard real-time, but would like to be able to use
FreeBSD for soft real-time. And note that if an application
specifies SCHED_RR, SCHED_FIFO, or SCHED_SPORADIC, it doesn't
matter if you have HTT, L2 dual-core, NUMA, whatever. Optimizing
for those is just fine (for SCHED_OTHER), but in the presence of
one of the above scheduling attributes it means _nothing_.
libpthread uses SCHED_RR by default (SCHED_OTHER = SCHED_RR),
but there is no reason that it couldn't just let the kernel
schedule threads any way it wants (even without upcalls)
by default (for SCHED_OTHER).
-- DE
More information about the freebsd-threads
mailing list