E
E
Eddik2017-01-02 10:09:12
linux
Eddik, 2017-01-02 10:09:12

How to remove system timer IRQ for application thread or CPU core?

Hello. There is a thread that does not voluntarily give up control of the CPU and should not. Here are the statistics for 18 hours of work


voluntary_ctxt_switches: 6
nonvoluntary_ctxt_switches: 68267288

The problem is that the system timer sends LOC interrupts (Local timer interrupts) 1000 times per second, thereby killing the performance of the thread and creating a sickly jitter. I wouldn't want to manipulate the timer at all, or compile the kernel with special options, because I'm not sure it won't affect the application's business logic elsewhere. Is it possible to somehow disable LOC interrupts for a specific thread or for a specific CPU in the system? (the thread is always nailed to the CPU)

Answer the question

In order to leave comments, you need to log in

3 answer(s)
J
jcmvbkbc, 2017-01-03
@Eddik

There is a thread that does not voluntarily give up control of the CPU and should not.
nonvoluntary_ctxt_switches: 68267288

This is not enough. It is necessary that, apart from this thread, there are no others on this CPU. ctxt switch is a switch from one thread to another.
It looks like you have a kernel with regular ticks (not dyntick/tickless). The timer interrupt itself, however, should not noticeably affect performance.
I think that there are no options without building the kernel with the CONFIG_NO_HZ_FULL option. But even in this case, so that there is no nonvoluntary ctxt switch, there must be a single thread on this CPU. See https://www.kernel.org/doc/Documentation/timers/NO...

M
Maxim Moseychuk, 2017-01-02
@fshp

https://sites.google.com/site/wikirolanddelepper/r...

R
Rsa97, 2017-01-02
@Rsa97

https://cs.uwaterloo.ca/~brecht/servers/apic/SMP-a...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question