diff options
| author | Frederic Weisbecker <[email protected]> | 2021-07-26 14:55:10 +0200 |
|---|---|---|
| committer | Thomas Gleixner <[email protected]> | 2021-08-10 17:09:59 +0200 |
| commit | 406dd42bd1ba0c01babf9cde169bb319e52f6147 (patch) | |
| tree | 44d288849968f2fa60e43487f3e5618bce3707bc /tools/lib/api/fs/tracing_path.c | |
| parent | 175cc3ab28e3509ddee8de4f164b563d99daa570 (diff) | |
posix-cpu-timers: Force next expiration recalc after itimer reset
When an itimer deactivates a previously armed expiration, it simply doesn't
do anything. As a result the process wide cputime counter keeps running and
the tick dependency stays set until it reaches the old ghost expiration
value.
This can be reproduced with the following snippet:
void trigger_process_counter(void)
{
struct itimerval n = {};
n.it_value.tv_sec = 100;
setitimer(ITIMER_VIRTUAL, &n, NULL);
n.it_value.tv_sec = 0;
setitimer(ITIMER_VIRTUAL, &n, NULL);
}
Fix this with resetting the relevant base expiration. This is similar to
disarming a timer.
Signed-off-by: Frederic Weisbecker <[email protected]>
Signed-off-by: Thomas Gleixner <[email protected]>
Acked-by: Peter Zijlstra (Intel) <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Diffstat (limited to 'tools/lib/api/fs/tracing_path.c')
0 files changed, 0 insertions, 0 deletions