aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/sched-migration.py
diff options
context:
space:
mode:
authorPatrick Bellasi <patrick.bellasi@arm.com>2018-11-05 14:54:00 +0000
committerIngo Molnar <mingo@kernel.org>2018-11-12 06:17:52 +0100
commitb5c0ce7bd1848892e2930f481828b6d7750231ed (patch)
tree19c9aec4cf416ac76d31c9451df3c34195986ecc /tools/perf/scripts/python/sched-migration.py
parent92a801e5d5b7a893881c1676b15dd246727ccd16 (diff)
sched/fair: Add lsub_positive() and use it consistently
The following pattern: var -= min_t(typeof(var), var, val); is used multiple times in fair.c. The existing sub_positive() already captures that pattern, but it also adds an explicit load-store to properly support lockless observations. In other cases the pattern above is used to update local, and/or not concurrently accessed, variables. Let's add a simpler version of sub_positive(), targeted at local variables updates, which gives the same readability benefits at calling sites, without enforcing {READ,WRITE}_ONCE() barriers. Signed-off-by: Patrick Bellasi <patrick.bellasi@arm.com> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Cc: Dietmar Eggemann <dietmar.eggemann@arm.com> Cc: Juri Lelli <juri.lelli@redhat.com> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Morten Rasmussen <morten.rasmussen@arm.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Quentin Perret <quentin.perret@arm.com> Cc: Steve Muckle <smuckle@google.com> Cc: Suren Baghdasaryan <surenb@google.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Todd Kjos <tkjos@google.com> Cc: Vincent Guittot <vincent.guittot@linaro.org> Link: https://lore.kernel.org/lkml/20181031184527.GA3178@hirez.programming.kicks-ass.net Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/sched-migration.py')
0 files changed, 0 insertions, 0 deletions