summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorJohn Stultz <jstultz@google.com>2026-04-28 17:39:46 +0000
committerThomas Gleixner <tglx@kernel.org>2026-05-06 08:33:08 +0200
commitb00385b8d081ce74f36ea178e04e1b106505fb36 (patch)
tree0512bf409b75b192f3437daa3d7b244e432303c4 /scripts
parentcab0cd0130eb6c884982ede3f70aca0392a7fc57 (diff)
selftests/posix_timers: Use CLOCK_THREAD_CPUTIME_ID for ITIMER_PROF measurements
It was reported that the posix_timers test was at times seeing failures with ITIMER_PROF timers, specifically in cases where the RCU_SOFTIRQ was taking up significant amounts of time. Analysis showed that as the time in softirq isn't included in the task stime + utime accounting used to trigger the SIGPROF so delays from softirq work could cause it to appear that the signal was incorrectly delayed. Contributing to this is that the test uses gettimeofday() to measure itimers, which also means any scheduling delay can also cause failures (as the task may not be running the entire time). To fix this, convert all the itimer measurements to use clock_gettime(), tweaking the logic to use nsecs instead of usecs. Then for ITIMER_PROF timers, utilize the CLOCK_THREAD_CPUTIME_ID clockid so that it is similarly measuring the time the task was running. Signed-off-by: John Stultz <jstultz@google.com> Signed-off-by: Thomas Gleixner <tglx@kernel.org> Link: https://patch.msgid.link/20260428173957.1394265-1-jstultz@google.com
Diffstat (limited to 'scripts')
0 files changed, 0 insertions, 0 deletions