Skip to content

Instantly share code, notes, and snippets.

@ilian
Last active January 23, 2022 08:48
Show Gist options
  • Save ilian/439be7f83db31d58ce448eeb9ed34323 to your computer and use it in GitHub Desktop.
Save ilian/439be7f83db31d58ce448eeb9ed34323 to your computer and use it in GitHub Desktop.
Issues when running low-latency applications on X1C9

How to reproduce consistently

  1. Run watch -d -n 0.1 cat /proc/interrupts and find on what core periodic acpi interrupts happen
  2. Pin a latency-sensitive application on that CPU core using taskset -c $CORE $APP where $CORE is the cpu number found in step 1. Observe that there are periodic interruptions in the real-time app (every ~0.5 seconds).

How to reproduce (seems random)

  1. Run watch -d -n 0.1 cat /proc/interrupts and find on what core a lot of interrupts happen when holding your finger on the touchpad
  2. Pin a latency-sensitive application on that CPU core using taskset -c $CORE $APP where $CORE is the cpu number found in step 1

Options to mitigate

  • Pin the application on a different core
  • Mask acpi interrupts
    • For acpi interrupts, identify which acpi interrupt is causing a lot of interrupts: grep . /sys/firmware/acpi/interrupts/*
    • Temporarily mask the interrupt: echo mask > /sys/firmware/acpi/interrupts/gpe6E, replacing gpe6E with the offending GPE
    • Permanently mask the interrupt: Add acpi_mask_gpe=0x6e to your kernel boot arguments
    • The offending GPE on my machine corresponds to the GPE number of the embedded controler, as seen with dmesg: [ 0.567725] ACPI: EC: GPE=0x6e
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment