Tickless Kernel, Isolcpus,Nohz_Full,And Rcu_Nocbs

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

  1. The RTC is not used often because its registers are very slow to access.
  2. 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.
  3. The TSC can be accessed much faster than the PIT.
  4. 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 named LOC.


Related Topics



Leave a reply



Submit