Linux 4.16 Picking Up Another SMP Optimization
Written by Michael Larabel in Linux Kernel on 6 February 2018 at 04:56 PM EST. Add A Comment
Last week Ingo Molnar sent in the main batch of scheduler updates for the Linux 4.16 kernel merge window, which included smarter task migration to try to yield better scalability, while today a second set of updates were sent in with an additional SMP optimization.

The optimization work last week and the new set of tweaks sent in today come courtesy of Linux developer Mel Gorman. The SMP balancing optimizations sent in via this pull request should provide some benefits in some situations, particularly if using the XFS file-system.

Two of the patches worth noting are sched/fair: Do not migrate if the prev_cpu is idle:
This patch uses the previous CPU for the task if it's idle and cache-affine with the current CPU even if the current CPU is idle due to the wakup being related to the interrupt. This reduces migrations at the cost of the interrupt data not being cache hot when the task wakes. A variety of workloads were tested on various machines and no adverse impact was noticed that was outside noise. dbench on ext4 on UMA showed roughly 10% reduction in the number of CPU migrations and it is a case where interrupts are frequent for IO competions. In most cases, the difference in performance is quite small but variability is often reduced... Note that the different in performance is marginal but for low utilisation, there is less variability.

And sched/fair: Use a recently used CPU as an idle candidate and the basis for SIS:
The most dramatic speedup was noticed on dbench using the XFS filesystem on UMA as clients interact heavily with workqueues in that configuration... The results can be less dramatic on NUMA where automatic balancing interferes with the test. It's also known that network benchmarks running on localhost also benefit quite a bit from this patch (roughly 10% on netperf RR for UDP and TCP depending on the machine). Hackbench also seens small improvements (6-11% depending on machine and thread count).

About The Author
Author picture

Michael Larabel is the principal author of and founded the site in 2004 with a focus on enriching the Linux hardware experience. Michael has written more than 10,000 articles covering the state of Linux hardware support, Linux performance, graphics drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and automated benchmarking software. He can be followed via Twitter or contacted via

Related Linux Kernel News
Popular News This Week