handle_fpu_swa() doesn't scale well if multiple CPUs need concurrent
fp assist. The problem lies with concurrent, potentially frequent updates of fpu_swa_count, which serves as the throttle for doing the printk(). A frenzy of concurrent updates will produce a frenzy of cacheline ping-ponging. The fix is simple: Only increment fpu_swa_count when the printk() is about to happen, which limits the increment to no more than four times every five seconds.
Showing
Please register or sign in to comment