Re: i2c jitter is worse in PREEMPT_RT kernel than stock Raspberry Pi kernel

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 2023-12-12 at 11:53 +0900, Michael Franklin wrote:
> Hello,

Greetings,


<snip proggy etc>


> Interestingly, in the stock kernel, `htop` shows that most CPU activity
> is concentrated on core 3 (which is what I expected and preferred),
> while in the realtime kernel, the CPU activity is distributed across all
> cores, despite booting with `isolcpus=3` and running the test program
> with `task set -cp 3 $(pidof i2ctest)` in both kernels.
>
> Q1:  Why is i2c communication is more jittery in the realtime kernel
> than the stock kernel?

I'd speculate it's primarily due to threaded IRQ handling being both
more expensive and preemptible.

> Q2:  Why is activity distributed across all cores in the realtime
> kernel, but more concentrated on core 3 in the stock kernel?

I don't see that.  Using isolcpus or not, the test proggy wakes only on
CPU3 (as it had damn well better), and box wide affinity i2c IRQ thread
wakes on CPU0.

Booting the non-rt kernel with 'threadirqs' behaves the same, and I
suspect will jitter about the same should you try it.  You're isolating
the test proggy, but for the rt kernel the IRQ thread is left dangling
in the breeze to be perturbed by other IRQ threads or whatnot.

	-Mike





[Index of Archives]     [RT Stable]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux