Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'csd-lock.2024.11.16a' of git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu

Pull CSD-lock update from Paul McKenney:
"This switches from sched_clock() to ktime_get_mono_fast_ns(), which on
x86 switches from the rdtsc instruction to the rdtscp instruction,
thus avoiding instruction reorderings that cause false-positive
reports of CSD-lock stalls of almost 2^46 nanoseconds. These false
positives are rare, but really are seen in the wild"

* tag 'csd-lock.2024.11.16a' of git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu:
locking/csd-lock: Switch from sched_clock() to ktime_get_mono_fast_ns()

+2 -2
+2 -2
kernel/smp.c
··· 246 246 return true; 247 247 } 248 248 249 - ts2 = sched_clock(); 249 + ts2 = ktime_get_mono_fast_ns(); 250 250 /* How long since we last checked for a stuck CSD lock.*/ 251 251 ts_delta = ts2 - *ts1; 252 252 if (likely(ts_delta <= csd_lock_timeout_ns * (*nmessages + 1) * ··· 321 321 int bug_id = 0; 322 322 u64 ts0, ts1; 323 323 324 - ts1 = ts0 = sched_clock(); 324 + ts1 = ts0 = ktime_get_mono_fast_ns(); 325 325 for (;;) { 326 326 if (csd_lock_wait_toolong(csd, ts0, &ts1, &bug_id, &nmessages)) 327 327 break;