[PATCH v3 2/2] nohz: set isolcpus when nohz_full is set

2015-04-08 Thread cmetcalf
From: Chris Metcalf nohz_full is only useful with isolcpus also set, since otherwise the scheduler has to run periodically to try to determine whether to steal work from other cores. Accordingly, when booting with nohz_full=xxx on the command line, we should act as if isolcpus=xxx was also set,

[PATCH v3 1/2] nohz: add tick_nohz_full_clear_cpus() and _set_cpus() APIs

2015-04-08 Thread cmetcalf
From: Chris Metcalf The "clear" API is useful, for example, to modify a cpumask to avoid the nohz cores so that interrupts aren't sent to them. Likewise the "set" API is useful to modify a cpumask indicating some special nohz-type functionality so that the nohz cores are automatically added to t

[PATCH v6 2/2] watchdog: add watchdog_cpumask sysctl to assist nohz

2015-04-08 Thread cmetcalf
From: Chris Metcalf Change the default behavior of watchdog so it only runs on the housekeeping cores when nohz_full is enabled at build and boot time. Allow modifying the set of cores the watchdog is currently running on with a new kernel.watchdog_cpumask sysctl. Acked-by: Don Zickus Signed-o

[PATCH v6 1/2] smpboot: allow excluding cpus from the smpboot threads

2015-04-08 Thread cmetcalf
From: Chris Metcalf This change allows some cores to be excluded from running the smp_hotplug_thread tasks. The motivating example for this is the watchdog threads, which by default we don't want to run on any enabled nohz_full cores. Signed-off-by: Chris Metcalf --- v6: change from an "exclud

[PATCH v5 1/2] smpboot: allow excluding cpus from the smpboot threads

2015-04-06 Thread cmetcalf
From: Chris Metcalf This change allows some cores to be excluded from running the smp_hotplug_thread tasks. The motivating example for this is the watchdog threads, which by default we don't want to run on any enabled nohz_full cores. Signed-off-by: Chris Metcalf --- include/linux/smpboot.h |

[PATCH v5 2/2] watchdog: add watchdog_exclude sysctl to assist nohz

2015-04-06 Thread cmetcalf
From: Chris Metcalf Change the default behavior of watchdog so it only runs on the housekeeping cores when nohz_full is enabled at build and boot time. Allow modifying the set of cores the watchdog is currently running on with a new kernel.watchdog_exclude sysctl. Signed-off-by: Chris Metcalf

[PATCH v5 0/2] nohz/watchdog/smp_hotplug_thread changes

2015-04-06 Thread cmetcalf
From: Chris Metcalf These changes allow the watchdog to work cleanly with nohz_full by default, and to be configurable if desired to enable the watchdog on cores that would normally disable it due to being nohz_full. Thomas, does the addition of an exclude_mask to smp_hotplug_thread meet with yo

[PATCH v2 1/2] nohz: add tick_nohz_full_clear_cpus() and _set_cpus() APIs

2015-04-06 Thread cmetcalf
From: Chris Metcalf The "clear" API is useful, for example, to modify a cpumask to avoid the nohz cores so that interrupts aren't sent to them. Likewise the "set" API is useful to modify a cpumask indicating some special nohz-type functionality so that the nohz cores are automatically added to t

[PATCH v2 2/2] nohz: make nohz_full imply isolcpus

2015-04-06 Thread cmetcalf
From: Chris Metcalf It's not clear that nohz_full is useful without isolcpus also set, since otherwise the scheduler has to run periodically to try to determine whether to steal work from other cores. Signed-off-by: Chris Metcalf Acked-by: Mike Galbraith ["thumbs up!"] Acked-by: Rik van Riel

[PATCH 1/2] nohz: add tick_nohz_full_set_cpus() API

2015-04-03 Thread cmetcalf
From: Chris Metcalf This is useful, for example, to modify a cpumask indicating some special nohz-type functionality so that the nohz cores are automatically added to that set. Signed-off-by: Chris Metcalf --- include/linux/tick.h | 7 +++ 1 file changed, 7 insertions(+) diff --git a/incl

[PATCH 2/2] nohz: make nohz_full imply isolcpus

2015-04-03 Thread cmetcalf
From: Chris Metcalf It's not clear that nohz_full is useful without isolcpus also set, since otherwise the scheduler has to run periodically to try to determine whether to steal work from other cores. Signed-off-by: Chris Metcalf --- I am puzzled why this has not been done before, so I suspect

[PATCH v4 2/2] watchdog: add watchdog_exclude sysctl to assist nohz

2015-04-03 Thread cmetcalf
From: Chris Metcalf Change the default behavior of watchdog so it only runs on the housekeeping cores when nohz_full is enabled at build and boot time. Allow modifying the set of cores the watchdog is currently running on with a new kernel.watchdog_exclude sysctl. Signed-off-by: Chris Metcalf

[PATCH v4 1/2] smpboot: allow excluding cpus from the smpboot threads

2015-04-03 Thread cmetcalf
From: Chris Metcalf This change allows some cores to be excluded from running the smp_hotplug_thread tasks. The motivating example for this is the watchdog threads, which by default we don't want to run on any enabled nohz_full cores. Signed-off-by: Chris Metcalf --- Relative to the quick diff

[PATCH v3] watchdog: add watchdog_cpumask sysctl to assist nohz

2015-04-02 Thread cmetcalf
From: Chris Metcalf Change the default behavior of watchdog so it only runs on the housekeeping cores when nohz_full is enabled at build and boot time. Allow modifying the set of cores the watchdog is currently running on with a new kernel.watchdog_cpumask sysctl. Signed-off-by: Chris Metcalf

[PATCH] workqueue: avoid nohz_full cores

2015-03-31 Thread cmetcalf
From: Chris Metcalf When queuing work, we should avoid queuing it on the local cpu if we are using WORK_CPU_UNBOUND and the local cpu is nohz_full, since the workqueue will mean a later interrupt of the nohz_full process that presumably would prefer continuing to have 100% of the core without int

[PATCH] tile: nohz: warn if nohz_full uses hypervisor shared cores

2015-03-30 Thread cmetcalf
From: Chris Metcalf The "hypervisor shared" cores are ones that the Tilera hypervisor uses to receive interrupts to manage hypervisor-owned devices. It's a bad idea to try to use those cores with nohz_full, since they will get interrupted unpredictably -- and invisibly to Linux tracing tools, sin

[PATCH] watchdog: nohz: don't run watchdog on nohz_full cores

2015-03-30 Thread cmetcalf
From: Chris Metcalf Running watchdog can be a helpful debugging feature on regular cores, but it's incompatible with nohz_full, since it forces regular scheduling events. Accordingly, just exit out immediately from any nohz_full core. An alternate approach would be to add a flags field or funct

[PATCH 2/4] tile: support CONTEXT_TRACKING and thus NOHZ_FULL

2015-03-24 Thread cmetcalf
From: Chris Metcalf Add the TIF_NOHZ flag appropriately. Add call to user_exit() on entry to do_work_pending() and on entry to syscalls via do_syscall_trace_enter(), and also the top of do_syscall_trace_exit() just because it's done in x86. Add call to user_enter() at the bottom of do_work_pend

[PATCH 3/4] nohz: add tick_nohz_full_clear_cpus() API

2015-03-24 Thread cmetcalf
From: Chris Metcalf This is useful, for example, to modify a cpumask to avoid the nohz cores so that interrupts aren't sent to them. Signed-off-by: Chris Metcalf --- Motivated by patch 4/4 in this series. include/linux/tick.h | 7 +++ 1 file changed, 7 insertions(+) diff --git a/include/

[PATCH 4/4] net: tile: don't send interrupts to nohz cores by default

2015-03-24 Thread cmetcalf
From: Chris Metcalf Signed-off-by: Chris Metcalf --- drivers/net/ethernet/tile/tilegx.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/tile/tilegx.c b/drivers/net/ethernet/tile/tilegx.c index bea8cd2bb56c..cf9850c6a809 100644 --- a/drivers/net/ethe

[PATCH 0/4] initial NOHZ_FULL support for tile

2015-03-24 Thread cmetcalf
From: Chris Metcalf These changes are the necessary minimum to make the tile architecture work relatively well with NOHZ_FULL. The tile architecture has had out-of-tree support since 2008 for a DATAPLANE mode that provided similar functionality (called Zero-Overhead Linux in our marketing materi

[PATCH 1/4] tile: support arch_irq_work_raise

2015-03-24 Thread cmetcalf
From: Chris Metcalf Tile includes a hypervisor hook to deliver messages to arbitrary tiles, so we can use that to raise an interrupt as soon as possible on our own core. Unfortunately the Tilera hypervisor disabled that support on principle in previous releases, but it will be available in MDE 4