linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v10 00/12] support "task_isolation" mode
@ 2016-03-02 20:09 Chris Metcalf
  2016-03-02 20:09 ` [PATCH v10 01/12] vmstat: add quiet_vmstat_sync function Chris Metcalf
                   ` (11 more replies)
  0 siblings, 12 replies; 36+ messages in thread
From: Chris Metcalf @ 2016-03-02 20:09 UTC (permalink / raw)
  To: Gilad Ben Yossef, Steven Rostedt, Ingo Molnar, Peter Zijlstra,
	Andrew Morton, Rik van Riel, Tejun Heo, Frederic Weisbecker,
	Thomas Gleixner, Paul E. McKenney, Christoph Lameter,
	Viresh Kumar, Catalin Marinas, Will Deacon, Andy Lutomirski,
	Daniel Lezcano, linux-doc, linux-api, linux-kernel
  Cc: Chris Metcalf

Here is the latest version of the task-isolation patch set, adopting
various suggestions made about the v9 patch series, including some
feedback from testing on the new EZchip NPS ARC platform (although the
new arch/arc support is not included in this patch series).  All of the
suggestions were relatively non-controversial.

Perhaps we are getting close to being able to merge this. :-)

Changes since v9:

- task_isolation is now set up by adding its required cpus to both the
  nohz_full and isolcpus cpumasks.  This allows users to separately
  specify all three flags, if so desired, and still get reasonably
  sane semantics.  This is done with a new tick_nohz_full_add_cpus()
  method for nohz, and just directly updating the isolcpus cpumask.

- We add a /sys/devices/system/cpu/task_isolation file to parallel
  the equivalent nohz_full file.  (This should have been in v8 since
  once task_isolation isn't equivalent to nohz_full, it needs its
  own way to let userspace know where to run.)

- We add a new Kconfig option, TASK_ISOLATION_ALL, which sets all but
  the boot processor to run in task isolation mode.  This parallels
  the existing NO_HZ_FULL_ALL and works around the fact that you can't
  easily specify a boot argument with the desired semantics.

- For task_isolation_debug, we add a check of the context_tracking
  state of the remote cpu before issuing a warning; if the remote cpu
  is actually in the kernel, we don't need to warn.

- A cloned child of a task_isolation task is not enabled for
  task_isolation, since otherwise they would both fight over who could
  safely return to userspace without requiring scheduling interrupts.

- The quiet_vmstat() function's semantics was changed since the v9
  patch series, so I introduce a quiet_vmstat_sync() for isolation.

- The lru_add_drain_needed() function is updated to know about the new
  lru_deactivate_pvecs variable.

- The arm64 patch factoring assembly into C has been modified based
  on an earlier patch by Mark Rutland.

- I simplified the enabling patch for arm64 by realizing we could just
  test TIF_NOHZ as the only bit for TIF_WORK_MASK for task isolation,
  so I didn't have to renumber all the TIF_xxx bits.

- Small fixes to avoid preemption warnings.

- Rebased on v4.5-rc5

For changes in earlier versions of the patch series, please see:

http://lkml.kernel.org/r/1451936091-29247-1-git-send-email-cmetcalf@ezchip.com

A couple of the tile patches that refactored the context tracking
code were taken into 4.5 so are no longer present in this series.

This version of the patch series has been tested on arm64 and tile,
and build-tested on x86.

It remains true that the 1 Hz tick needs to be disabled for this
patch series to be able to achieve its primary goal of enabling
truly tick-free operation, but that is ongoing orthogonal work.

The series is available at:

  git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile.git dataplane

Chris Metcalf (12):
  vmstat: add quiet_vmstat_sync function
  vmstat: add vmstat_idle function
  lru_add_drain_all: factor out lru_add_drain_needed
  task_isolation: add initial support
  task_isolation: support CONFIG_TASK_ISOLATION_ALL
  task_isolation: support PR_TASK_ISOLATION_STRICT mode
  task_isolation: add debug boot flag
  arm, tile: turn off timer tick for oneshot_stopped state
  arch/x86: enable task isolation functionality
  arch/tile: enable task isolation functionality
  arm64: factor work_pending state machine to C
  arch/arm64: enable task isolation functionality

 Documentation/kernel-parameters.txt    |  16 ++
 arch/arm64/include/asm/thread_info.h   |   8 +-
 arch/arm64/kernel/entry.S              |  12 +-
 arch/arm64/kernel/ptrace.c             |  12 +-
 arch/arm64/kernel/signal.c             |  34 ++++-
 arch/arm64/kernel/smp.c                |   2 +
 arch/arm64/mm/fault.c                  |   4 +
 arch/tile/kernel/process.c             |   6 +-
 arch/tile/kernel/ptrace.c              |   6 +
 arch/tile/kernel/single_step.c         |   5 +
 arch/tile/kernel/smp.c                 |  28 ++--
 arch/tile/kernel/time.c                |   1 +
 arch/tile/kernel/unaligned.c           |   3 +
 arch/tile/mm/fault.c                   |   3 +
 arch/tile/mm/homecache.c               |   2 +
 arch/x86/entry/common.c                |  18 ++-
 arch/x86/kernel/traps.c                |   2 +
 arch/x86/mm/fault.c                    |   2 +
 drivers/base/cpu.c                     |  18 +++
 drivers/clocksource/arm_arch_timer.c   |   2 +
 include/linux/context_tracking_state.h |   6 +
 include/linux/isolation.h              |  83 +++++++++++
 include/linux/sched.h                  |   3 +
 include/linux/swap.h                   |   1 +
 include/linux/tick.h                   |   1 +
 include/linux/vmstat.h                 |   4 +
 include/uapi/linux/prctl.h             |   8 +
 init/Kconfig                           |  30 ++++
 kernel/Makefile                        |   1 +
 kernel/fork.c                          |   3 +
 kernel/irq_work.c                      |   5 +-
 kernel/isolation.c                     | 261 +++++++++++++++++++++++++++++++++
 kernel/sched/core.c                    |  18 +++
 kernel/signal.c                        |   5 +
 kernel/smp.c                           |   6 +-
 kernel/softirq.c                       |  33 +++++
 kernel/sys.c                           |   9 ++
 kernel/time/tick-sched.c               |  31 ++--
 mm/swap.c                              |  15 +-
 mm/vmstat.c                            |  24 +++
 40 files changed, 676 insertions(+), 55 deletions(-)
 create mode 100644 include/linux/isolation.h
 create mode 100644 kernel/isolation.c

-- 
2.1.2

^ permalink raw reply	[flat|nested] 36+ messages in thread

end of thread, other threads:[~2016-03-14 10:29 UTC | newest]

Thread overview: 36+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-02 20:09 [PATCH v10 00/12] support "task_isolation" mode Chris Metcalf
2016-03-02 20:09 ` [PATCH v10 01/12] vmstat: add quiet_vmstat_sync function Chris Metcalf
2016-03-02 20:09 ` [PATCH v10 02/12] vmstat: add vmstat_idle function Chris Metcalf
2016-03-02 20:09 ` [PATCH v10 03/12] lru_add_drain_all: factor out lru_add_drain_needed Chris Metcalf
2016-03-02 20:09 ` [PATCH v10 04/12] task_isolation: add initial support Chris Metcalf
2016-03-02 20:09 ` [PATCH v10 05/12] task_isolation: support CONFIG_TASK_ISOLATION_ALL Chris Metcalf
2016-03-03 18:34   ` Andi Kleen
2016-03-03 19:40     ` Chris Metcalf
2016-03-03 20:04       ` Andi Kleen
2016-03-05 12:31       ` Ingo Molnar
2016-03-02 20:09 ` [PATCH v10 06/12] task_isolation: support PR_TASK_ISOLATION_STRICT mode Chris Metcalf
2016-03-02 20:09 ` [PATCH v10 07/12] task_isolation: add debug boot flag Chris Metcalf
2016-03-02 20:37   ` Peter Zijlstra
2016-03-02 20:56     ` Chris Metcalf
2016-03-02 20:09 ` [PATCH v10 08/12] arm, tile: turn off timer tick for oneshot_stopped state Chris Metcalf
2016-03-02 20:09 ` [PATCH v10 09/12] arch/x86: enable task isolation functionality Chris Metcalf
2016-03-03  0:36   ` Andy Lutomirski
2016-03-03 19:52     ` Chris Metcalf
2016-03-03 23:46       ` Andy Lutomirski
2016-03-07 20:51         ` Chris Metcalf
2016-03-07 20:55           ` Andy Lutomirski
2016-03-08 20:40             ` Chris Metcalf
2016-03-09 20:58               ` Andy Lutomirski
2016-03-09 21:05                 ` Chris Metcalf
2016-03-09 21:07                   ` Andy Lutomirski
2016-03-09 21:13                     ` Chris Metcalf
2016-03-09 21:10                 ` Kees Cook
2016-03-09 21:18                   ` Andy Lutomirski
2016-03-09 21:25                     ` Kees Cook
2016-03-09 21:57                       ` Andy Lutomirski
2016-03-02 20:09 ` [PATCH v10 10/12] arch/tile: " Chris Metcalf
2016-03-02 20:09 ` [PATCH v10 11/12] arm64: factor work_pending state machine to C Chris Metcalf
2016-03-04 16:38   ` Will Deacon
2016-03-04 20:02     ` Chris Metcalf
2016-03-14 10:29       ` Mark Rutland
2016-03-02 20:09 ` [PATCH v10 12/12] arch/arm64: enable task isolation functionality Chris Metcalf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).