-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'timers-nohz-for-linus' of git://git.kernel.org/pub/scm/…
…linux/kernel/git/tip/tip Pull timers/nohz changes from Ingo Molnar: "It mostly contains fixes and full dynticks off-case optimizations, by Frederic Weisbecker" * 'timers-nohz-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (24 commits) nohz: Include local CPU in full dynticks global kick nohz: Optimize full dynticks's sched hooks with static keys nohz: Optimize full dynticks state checks with static keys nohz: Rename a few state variables vtime: Always debug check snapshot source _before_ updating it vtime: Always scale generic vtime accounting results vtime: Optimize full dynticks accounting off case with static keys vtime: Describe overriden functions in dedicated arch headers m68k: hardirq_count() only need preempt_mask.h hardirq: Split preempt count mask definitions context_tracking: Split low level state headers vtime: Fix racy cputime delta update vtime: Remove a few unneeded generic vtime state checks context_tracking: User/kernel broundary cross trace events context_tracking: Optimize context switch off case with static keys context_tracking: Optimize guest APIs off case with static key context_tracking: Optimize main APIs off case with static key context_tracking: Ground setup for static key use context_tracking: Remove full dynticks' hacky dependency on wide context tracking nohz: Only enable context tracking on full dynticks CPUs ...
- Loading branch information
Showing
21 changed files
with
545 additions
and
327 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,3 +3,4 @@ generic-y += clkdev.h | |
generic-y += exec.h | ||
generic-y += kvm_para.h | ||
generic-y += trace_clock.h | ||
generic-y += vtime.h |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,3 +2,4 @@ | |
generic-y += clkdev.h | ||
generic-y += rwsem.h | ||
generic-y += trace_clock.h | ||
generic-y += vtime.h |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#ifndef _S390_VTIME_H | ||
#define _S390_VTIME_H | ||
|
||
#define __ARCH_HAS_VTIME_ACCOUNT | ||
#define __ARCH_HAS_VTIME_TASK_SWITCH | ||
|
||
#endif /* _S390_VTIME_H */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
#ifndef _LINUX_CONTEXT_TRACKING_STATE_H | ||
#define _LINUX_CONTEXT_TRACKING_STATE_H | ||
|
||
#include <linux/percpu.h> | ||
#include <linux/static_key.h> | ||
|
||
struct context_tracking { | ||
/* | ||
* When active is false, probes are unset in order | ||
* to minimize overhead: TIF flags are cleared | ||
* and calls to user_enter/exit are ignored. This | ||
* may be further optimized using static keys. | ||
*/ | ||
bool active; | ||
enum ctx_state { | ||
IN_KERNEL = 0, | ||
IN_USER, | ||
} state; | ||
}; | ||
|
||
#ifdef CONFIG_CONTEXT_TRACKING | ||
extern struct static_key context_tracking_enabled; | ||
DECLARE_PER_CPU(struct context_tracking, context_tracking); | ||
|
||
static inline bool context_tracking_in_user(void) | ||
{ | ||
return __this_cpu_read(context_tracking.state) == IN_USER; | ||
} | ||
|
||
static inline bool context_tracking_active(void) | ||
{ | ||
return __this_cpu_read(context_tracking.active); | ||
} | ||
#else | ||
static inline bool context_tracking_in_user(void) { return false; } | ||
static inline bool context_tracking_active(void) { return false; } | ||
#endif /* CONFIG_CONTEXT_TRACKING */ | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.