aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/sched.h
diff options
context:
space:
mode:
authorFrederic Weisbecker <fweisbec@gmail.com>2016-03-24 10:38:00 -0400
committerIngo Molnar <mingo@kernel.org>2016-03-29 05:52:11 -0400
commitf009a7a767e792d5ab0b46c08d46236ea5271dd9 (patch)
tree68a22ef0eee00723de6f05e9f8b0d68eeacd195f /include/linux/sched.h
parent5acba71e18833b9d06686b3751598bfa263a3ac3 (diff)
timers/nohz: Convert tick dependency mask to atomic_t
The tick dependency mask was intially unsigned long because this is the type on which clear_bit() operates on and fetch_or() accepts it. But now that we have atomic_fetch_or(), we can instead use atomic_andnot() to clear the bit. This consolidates the type of our tick dependency mask, reduce its size on structures and benefit from possible architecture optimizations on atomic_t operations. Suggested-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de> Link: http://lkml.kernel.org/r/1458830281-4255-3-git-send-email-fweisbec@gmail.com Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'include/linux/sched.h')
-rw-r--r--include/linux/sched.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/linux/sched.h b/include/linux/sched.h
index 60bba7e032dc..52c4847b05e2 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -720,7 +720,7 @@ struct signal_struct {
720 struct task_cputime cputime_expires; 720 struct task_cputime cputime_expires;
721 721
722#ifdef CONFIG_NO_HZ_FULL 722#ifdef CONFIG_NO_HZ_FULL
723 unsigned long tick_dep_mask; 723 atomic_t tick_dep_mask;
724#endif 724#endif
725 725
726 struct list_head cpu_timers[3]; 726 struct list_head cpu_timers[3];
@@ -1549,7 +1549,7 @@ struct task_struct {
1549#endif 1549#endif
1550 1550
1551#ifdef CONFIG_NO_HZ_FULL 1551#ifdef CONFIG_NO_HZ_FULL
1552 unsigned long tick_dep_mask; 1552 atomic_t tick_dep_mask;
1553#endif 1553#endif
1554 unsigned long nvcsw, nivcsw; /* context switch counts */ 1554 unsigned long nvcsw, nivcsw; /* context switch counts */
1555 u64 start_time; /* monotonic time in nsec */ 1555 u64 start_time; /* monotonic time in nsec */