context_tracking: Split user tracking Kconfig
Context tracking is going to be used not only to track user transitions but also idle/IRQs/NMIs. The user tracking part will then become a separate feature. Prepare Kconfig for that. [ frederic: Apply Max Filippov feedback. ] Signed-off-by: Frederic Weisbecker <frederic@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Neeraj Upadhyay <quic_neeraju@quicinc.com> Cc: Uladzislau Rezki <uladzislau.rezki@sony.com> Cc: Joel Fernandes <joel@joelfernandes.org> Cc: Boqun Feng <boqun.feng@gmail.com> Cc: Nicolas Saenz Julienne <nsaenz@kernel.org> Cc: Marcelo Tosatti <mtosatti@redhat.com> Cc: Xiongfeng Wang <wangxiongfeng2@huawei.com> Cc: Yu Liao <liaoyu15@huawei.com> Cc: Phil Auld <pauld@redhat.com> Cc: Paul Gortmaker<paul.gortmaker@windriver.com> Cc: Alex Belits <abelits@marvell.com> Signed-off-by: Paul E. McKenney <paulmck@kernel.org> Reviewed-by: Nicolas Saenz Julienne <nsaenzju@redhat.com> Tested-by: Nicolas Saenz Julienne <nsaenzju@redhat.com>
This commit is contained in:
parent
2a0aafce96
commit
24a9c54182
25 changed files with 65 additions and 52 deletions
|
|
@ -22,6 +22,8 @@
|
|||
#include <linux/export.h>
|
||||
#include <linux/kprobes.h>
|
||||
|
||||
#ifdef CONFIG_CONTEXT_TRACKING_USER
|
||||
|
||||
#define CREATE_TRACE_POINTS
|
||||
#include <trace/events/context_tracking.h>
|
||||
|
||||
|
|
@ -252,7 +254,7 @@ void __init ct_cpu_track_user(int cpu)
|
|||
initialized = true;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_CONTEXT_TRACKING_FORCE
|
||||
#ifdef CONFIG_CONTEXT_TRACKING_USER_FORCE
|
||||
void __init context_tracking_init(void)
|
||||
{
|
||||
int cpu;
|
||||
|
|
@ -261,3 +263,5 @@ void __init context_tracking_init(void)
|
|||
ct_cpu_track_user(cpu);
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* #ifdef CONFIG_CONTEXT_TRACKING_USER */
|
||||
|
|
|
|||
|
|
@ -6559,7 +6559,7 @@ void __sched schedule_idle(void)
|
|||
} while (need_resched());
|
||||
}
|
||||
|
||||
#if defined(CONFIG_CONTEXT_TRACKING) && !defined(CONFIG_HAVE_CONTEXT_TRACKING_OFFSTACK)
|
||||
#if defined(CONFIG_CONTEXT_TRACKING_USER) && !defined(CONFIG_HAVE_CONTEXT_TRACKING_USER_OFFSTACK)
|
||||
asmlinkage __visible void __sched schedule_user(void)
|
||||
{
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -73,6 +73,9 @@ config TIME_KUNIT_TEST
|
|||
|
||||
If unsure, say N.
|
||||
|
||||
config CONTEXT_TRACKING
|
||||
bool
|
||||
|
||||
if GENERIC_CLOCKEVENTS
|
||||
menu "Timers subsystem"
|
||||
|
||||
|
|
@ -111,7 +114,7 @@ config NO_HZ_FULL
|
|||
# NO_HZ_COMMON dependency
|
||||
# We need at least one periodic CPU for timekeeping
|
||||
depends on SMP
|
||||
depends on HAVE_CONTEXT_TRACKING
|
||||
depends on HAVE_CONTEXT_TRACKING_USER
|
||||
# VIRT_CPU_ACCOUNTING_GEN dependency
|
||||
depends on HAVE_VIRT_CPU_ACCOUNTING_GEN
|
||||
select NO_HZ_COMMON
|
||||
|
|
@ -137,31 +140,37 @@ config NO_HZ_FULL
|
|||
|
||||
endchoice
|
||||
|
||||
config CONTEXT_TRACKING
|
||||
bool
|
||||
config CONTEXT_TRACKING_USER
|
||||
bool
|
||||
depends on HAVE_CONTEXT_TRACKING_USER
|
||||
select CONTEXT_TRACKING
|
||||
help
|
||||
Track transitions between kernel and user on behalf of RCU and
|
||||
tickless cputime accounting. The former case relies on context
|
||||
tracking to enter/exit RCU extended quiescent states.
|
||||
|
||||
config CONTEXT_TRACKING_FORCE
|
||||
bool "Force context tracking"
|
||||
depends on CONTEXT_TRACKING
|
||||
config CONTEXT_TRACKING_USER_FORCE
|
||||
bool "Force user context tracking"
|
||||
depends on CONTEXT_TRACKING_USER
|
||||
default y if !NO_HZ_FULL
|
||||
help
|
||||
The major pre-requirement for full dynticks to work is to
|
||||
support the context tracking subsystem. But there are also
|
||||
support the user context tracking subsystem. But there are also
|
||||
other dependencies to provide in order to make the full
|
||||
dynticks working.
|
||||
|
||||
This option stands for testing when an arch implements the
|
||||
context tracking backend but doesn't yet fulfill all the
|
||||
user context tracking backend but doesn't yet fulfill all the
|
||||
requirements to make the full dynticks feature working.
|
||||
Without the full dynticks, there is no way to test the support
|
||||
for context tracking and the subsystems that rely on it: RCU
|
||||
for user context tracking and the subsystems that rely on it: RCU
|
||||
userspace extended quiescent state and tickless cputime
|
||||
accounting. This option copes with the absence of the full
|
||||
dynticks subsystem by forcing the context tracking on all
|
||||
dynticks subsystem by forcing the user context tracking on all
|
||||
CPUs in the system.
|
||||
|
||||
Say Y only if you're working on the development of an
|
||||
architecture backend for the context tracking.
|
||||
architecture backend for the user context tracking.
|
||||
|
||||
Say N otherwise, this option brings an overhead that you
|
||||
don't want in production.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue