tickless kernel , isolcpus,nohz_full,and rcu_nocbs
In the second case, Kernel needs to schedule 2 cpu bound tasks on core 3 and the dynamic ticks configuration is applicable only when there is exactly one runnable task.
I thought SCHED_FIFO would stop these interrupts (and so I started answering), but that isn't yet implemented as per https://www.kernel.org/doc/Documentation/timers/NO_HZ.txt
There is no way to change this behaviour except scheduling threads on different CPUs. You can always hack the kernel to achieve what you need.
How do I get tickless kernel to work? nohz_full, rcu_nocbs, isolcpus what else?
Ok, I found I need to build my own kernel to turn on the config.
Linux Kernel Multicore Issue
The scheduler is just a piece of code (in particular, the schedule()
function).
Like most other parts of the kernel, it runs on whatever CPU it is called.
The scheduler gets called when some thread wants to sleep or after an interrupt has been handled; this can happen on all CPUs.
why disable one local interrupt or preemption can cause the whole system with 4 cpus unresponsive
It's possible that the kernel wants to execute an operation on all CPU's, such as an RCU synchronize, or cache-related synchronization or whatever. Then you're hosed.
SMP is not a license to carelessly hog a processor to yourself.
That kind of thing can be arranged. I mean you could have a CPU that is not online as far as the kernel is concerned, and which you use to run whatever you want.
Why TSC needed when there is PIT available
- The RTC is not used often because its registers are very slow to access.
- The RTC is always running (that's why it has its own battery). However, nowadays its only purpose is to keep the time while the system is not running.
- The TSC can be accessed much faster than the PIT.
- The kernel always tries to use the timer that can be programmed in the most efficient way, so it switches from the PIT to the CPU-local TSC-based timer (local APIC timer) as soon as it detects the latter.
In/proc/interrupts
, the LAPIC interrupt does not have a number but is namedLOC
.
Related Topics
How to Use Ptrace(2) to Change Behaviour of Syscalls
Openldap + Dynlist + Posixgroup
Using Flycheck/Flymake on Kernel Source Tree
How to Start a Nodejs Process on a Remote Server
When Does a Process Handle a Signal
Cron Expression to Run on Different Days for Different Months
How to Properly Debug a Bash Script
Create/Delete Users from Text File Using Bash Script
How Does The 64 Bit Linux Kernel Kick Off a 32 Bit Process from an Elf
Cargo Plugin Throws Cargoexception When Deploying on Glassfish - Deployment Has Failed: Null
Take The Last Part of The Folder Path in Shell
Unix Cut Except Last Two Tokens
Getting The Canonical Time Zone Name in Shell Script