-
Notifications
You must be signed in to change notification settings - Fork 137
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
posix host: the timer create one ephemeral thread per one ticket #330
Comments
it is not easy to observe this behavior, one ephemeral thread per one ticket is too much, we need to change it to use several threads instead. example: only one dedicated timer thread. |
it is unrelated, timer_create() will create pthreads. it is not controlled by lkl-kernel. |
(thanks, I wasn't aware of if I understood correctly, creating/deleting one pthread per one clockevent makes huge overhead of creating pthread, context switches, etc. I thought green threads instead of pthread (including rewriting timer library, #250) helps to address those situations. a thread pool (also replacing timer API) does the same. |
I find this link can be helpful:
http://stackoverflow.com/questions/32283171/signal-handler-in-a-separate-pthread-using-timer-create
The extra cost is parallel with LKL so it may not improve latency &
throughput that much. But it can save overall CPU cost of LKL.
…On Wed, Feb 15, 2017 at 4:30 PM, Hajime Tazaki ***@***.***> wrote:
(thanks, I wasn't aware of make gdb in tools/lkl/Makefile)
if I understood correctly, creating/deleting one pthread per one
clockevent makes huge overhead of creating pthread, context switches, etc.
I thought green threads instead of pthread (including rewriting timer
library, #250 <#250>) helps to address
those situations.
a thread pool (also replacing timer API) does the same.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#330 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AEVfUurv-Au7c1olGjHGdI-D1CD7mDxyks5rc5i-gaJpZM4MBpeN>
.
|
librt uses |
I thought about the dedicated thread approach, but you can only implement it safely (i.e. make sure the signal is coming to the dedicated thread) only in Linux (see SIGEV_THREAD_ID in timer_create) which would make it non-posix. |
it is waste.
you can observe the ephemeral threads created/exited for every ticket by using
make gdb
.linux/tools/lkl/lib/posix-host.c
Line 266 in 311a4ee
The text was updated successfully, but these errors were encountered: