Commit 336622e9 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge tag 'timers-nohz-2020-03-30' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull NOHZ update from Thomas Gleixner:
 "Remove TIF_NOHZ from three architectures

  These architectures use a static key to decide whether context
  tracking needs to be invoked and the TIF_NOHZ flag just causes a
  pointless slowpath execution for nothing"

* tag 'timers-nohz-2020-03-30' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  arm64: Remove TIF_NOHZ
  arm: Remove TIF_NOHZ
  x86: Remove TIF_NOHZ
  context-tracking: Introduce CONFIG_HAVE_TIF_NOHZ
  x86/entry: Remove _TIF_NOHZ from _TIF_WORK_SYSCALL_ENTRY
parents 992a1a3b e4970c9c
Loading
Loading
Loading
Loading
+11 −5
Original line number Diff line number Diff line
@@ -540,11 +540,17 @@ config HAVE_CONTEXT_TRACKING
	help
	  Provide kernel/user boundaries probes necessary for subsystems
	  that need it, such as userspace RCU extended quiescent state.
	  Syscalls need to be wrapped inside user_exit()-user_enter() through
	  the slow path using TIF_NOHZ flag. Exceptions handlers must be
	  wrapped as well. Irqs are already protected inside
	  rcu_irq_enter/rcu_irq_exit() but preemption or signal handling on
	  irq exit still need to be protected.
	  Syscalls need to be wrapped inside user_exit()-user_enter(), either
	  optimized behind static key or through the slow path using TIF_NOHZ
	  flag. Exceptions handlers must be wrapped as well. Irqs are already
	  protected inside rcu_irq_enter/rcu_irq_exit() but preemption or signal
	  handling on irq exit still need to be protected.

config HAVE_TIF_NOHZ
	bool
	help
	  Arch relies on TIF_NOHZ and syscall slow path to implement context
	  tracking calls to user_enter()/user_exit().

config HAVE_VIRT_CPU_ACCOUNTING
	bool
+0 −1
Original line number Diff line number Diff line
@@ -141,7 +141,6 @@ extern int vfp_restore_user_hwstate(struct user_vfp *,
#define TIF_SYSCALL_TRACEPOINT	6	/* syscall tracepoint instrumentation */
#define TIF_SECCOMP		7	/* seccomp syscall filtering active */

#define TIF_NOHZ		12	/* in adaptive nohz mode */
#define TIF_USING_IWMMXT	17
#define TIF_MEMDIE		18	/* is terminating due to OOM killer */
#define TIF_RESTORE_SIGMASK	20
+1 −3
Original line number Diff line number Diff line
@@ -63,7 +63,6 @@ void arch_release_task_struct(struct task_struct *tsk);
#define TIF_FOREIGN_FPSTATE	3	/* CPU's FP state is not current's */
#define TIF_UPROBE		4	/* uprobe breakpoint or singlestep */
#define TIF_FSCHECK		5	/* Check FS is USER_DS on return */
#define TIF_NOHZ		7
#define TIF_SYSCALL_TRACE	8	/* syscall trace active */
#define TIF_SYSCALL_AUDIT	9	/* syscall auditing */
#define TIF_SYSCALL_TRACEPOINT	10	/* syscall tracepoint for ftrace */
@@ -83,7 +82,6 @@ void arch_release_task_struct(struct task_struct *tsk);
#define _TIF_NEED_RESCHED	(1 << TIF_NEED_RESCHED)
#define _TIF_NOTIFY_RESUME	(1 << TIF_NOTIFY_RESUME)
#define _TIF_FOREIGN_FPSTATE	(1 << TIF_FOREIGN_FPSTATE)
#define _TIF_NOHZ		(1 << TIF_NOHZ)
#define _TIF_SYSCALL_TRACE	(1 << TIF_SYSCALL_TRACE)
#define _TIF_SYSCALL_AUDIT	(1 << TIF_SYSCALL_AUDIT)
#define _TIF_SYSCALL_TRACEPOINT	(1 << TIF_SYSCALL_TRACEPOINT)
@@ -100,7 +98,7 @@ void arch_release_task_struct(struct task_struct *tsk);

#define _TIF_SYSCALL_WORK	(_TIF_SYSCALL_TRACE | _TIF_SYSCALL_AUDIT | \
				 _TIF_SYSCALL_TRACEPOINT | _TIF_SECCOMP | \
				 _TIF_NOHZ | _TIF_SYSCALL_EMU)
				 _TIF_SYSCALL_EMU)

#define INIT_THREAD_INFO(tsk)						\
{									\
+1 −0
Original line number Diff line number Diff line
@@ -51,6 +51,7 @@ config MIPS
	select HAVE_ASM_MODVERSIONS
	select HAVE_CBPF_JIT if !64BIT && !CPU_MICROMIPS
	select HAVE_CONTEXT_TRACKING
	select HAVE_TIF_NOHZ
	select HAVE_COPY_THREAD_TLS
	select HAVE_C_RECORDMCOUNT
	select HAVE_DEBUG_KMEMLEAK
+1 −0
Original line number Diff line number Diff line
@@ -182,6 +182,7 @@ config PPC
	select HAVE_STACKPROTECTOR		if PPC64 && $(cc-option,-mstack-protector-guard=tls -mstack-protector-guard-reg=r13)
	select HAVE_STACKPROTECTOR		if PPC32 && $(cc-option,-mstack-protector-guard=tls -mstack-protector-guard-reg=r2)
	select HAVE_CONTEXT_TRACKING		if PPC64
	select HAVE_TIF_NOHZ			if PPC64
	select HAVE_COPY_THREAD_TLS
	select HAVE_DEBUG_KMEMLEAK
	select HAVE_DEBUG_STACKOVERFLOW
Loading