diff options
| author | Thomas Gleixner <[email protected]> | 2019-08-21 19:09:19 +0000 |
|---|---|---|
| committer | Thomas Gleixner <[email protected]> | 2019-08-28 09:50:40 +0000 |
| commit | 2bbdbdae05167c688b6d3499a7dab74208b80a22 (patch) | |
| tree | 7731020cb6763b1c4fd314b39acff07855b2a894 /tools/perf/scripts/python/compaction-times.py | |
| parent | rlimit: Rewrite non-sensical RLIMIT_CPU comment (diff) | |
| download | kernel-2bbdbdae05167c688b6d3499a7dab74208b80a22.tar.gz kernel-2bbdbdae05167c688b6d3499a7dab74208b80a22.zip | |
posix-cpu-timers: Get rid of zero checks
Deactivation of the expiry cache is done by setting all clock caches to
0. That requires to have a check for zero in all places which update the
expiry cache:
if (cache == 0 || new < cache)
cache = new;
Use U64_MAX as the deactivated value, which allows to remove the zero
checks when updating the cache and reduces it to the obvious check:
if (new < cache)
cache = new;
This also removes the weird workaround in do_prlimit() which was required
to convert a RLIMIT_CPU value of 0 (immediate expiry) to 1 because handing
in 0 to the posix CPU timer code would have effectively disarmed it.
Signed-off-by: Thomas Gleixner <[email protected]>
Reviewed-by: Frederic Weisbecker <[email protected]>
Link: https://lkml.kernel.org/r/[email protected]
Diffstat (limited to 'tools/perf/scripts/python/compaction-times.py')
0 files changed, 0 insertions, 0 deletions
