It changes the configuration so that only one CPU wakes up when processing a touchpad interrupt. I don’t expect any idle power consumption changes but I do anticipate it should help “average” use.
I also don’t expect any negative side effects but I would love to hear any feedback.
I had a go at testing this, but didn’t see any improvement.
I applied the patch via NixOS’ boot.kernelPatches option to 6.9.1, rebooted into GNOME, enabled aeroplane mode, ran powerstat in a shell and compared leaving the system idle vs drawing circles with the touchpad. As you can see in run data, IRQ/s ramped up and consumed ~2W in both baseline and with the patch applied.
Tailing /proc/interrupts, I see activity on AMDI0010:03, pinctrl_amd and PIXA3854:00. grep -E 'PIXA|AMDI0010:03|pinctrl|CPU' /proc/interruptsbefore and after the patch shows activity’s still split over core 3 and 5.
Thanks for the testing! That’s really interesting that you ended up with the interrupt affinity matching the same cores already. I’m not sure why that happened, but they’re definitely nominally different for me. Is this a 13 or 16?
As for the power improvements, I think that the sample rate might be too long when it’s done in the OS. But you can’t really make it shorter because then you compromise the test by waking up to sample. It might be better to use an external dongle/probe and no battery if at all possible.
I’ll let this thread know when I spin a new version.
You know, looking at your logs, I’m wondering if I really made a logic mistake - it should be the AMDI0010:03 should align the affinity as well. Could you manually change the affinity using echo $CPU_NUM > /proc/irq/$INT_NUM/smp_affinity and see if that changes anything?
It still is a challenging move to glue these together in the kernel though.
I ran echo 20 > /proc/irq/6/smp_affinity to co-locate AMDI0010:03 with the others and observed all events correctly handled by CPU5. However, I didn’t see any power improvements (still ramped up to ~2W). I’m testing on a Framework 13 7640U.
Thanks for your continued work improving the platform btw!
Ok. From tomorrow I’ll be running the patched kernel. I don’t know how to have measure power consumption for a reliable A-B test in this case, but I will eventually report on any side effect. For now I don’t see anything noticeable working worse.
One last question: looking at the linked bug there is another patch, should I have applied that one as well?
P.S. This has been my first kernel recompile on my framework, I still have to figure out secure boot signing but testing with SB disabled everything works fine.
No that’s an alternative. Based on the above testing so far by @tlvince I don’t expect any notable differences, but would love to hear if you do find so!