linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [RFC PATCH v3 0/3] genirq/cpuhotplug: Adjust managed interrupts according to change of housekeeping cpumask
@ 2024-09-16 12:20 Costa Shulyupin
  2024-09-16 12:20 ` [RFC PATCH v3 1/3] sched/isolation: Add infrastructure for dynamic CPU isolation Costa Shulyupin
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Costa Shulyupin @ 2024-09-16 12:20 UTC (permalink / raw)
  To: longman, ming.lei, pauld, juri.lelli, vschneid, Michael Ellerman,
	Nicholas Piggin, Christophe Leroy, Naveen N Rao, Thomas Gleixner,
	Zefan Li, Tejun Heo, Johannes Weiner, Michal Koutný,
	Ingo Molnar, Peter Zijlstra, Vincent Guittot, Dietmar Eggemann,
	Steven Rostedt, Ben Segall, Mel Gorman, Costa Shulyupin,
	Bjorn Helgaas, linuxppc-dev, linux-kernel, cgroups

The housekeeping CPU masks, set up by the "isolcpus" and "nohz_full"
boot command line options, are used at boot time to exclude selected
CPUs from running some kernel housekeeping subsystems to minimize
disturbance to latency sensitive userspace applications such as DPDK.
This options can only be changed with a reboot. This is a problem for
containerized workloads running on OpenShift/Kubernetes where a
mix of low latency and "normal" workloads can be created/destroyed
dynamically and the number of CPUs allocated to each workload is often
not known at boot time.

Theoretically, complete CPU offlining/onlining could be used for
housekeeping adjustments, but this approach is not practical.
Telco companies use Linux to run DPDK in OpenShift/Kubernetes containers.
DPDK requires isolated cpus to run real-time processes.
Kubernetes manages allocation of resources for containers.
Unfortunately Kubernetes doesn't support dynamic CPU offlining/onlining:
https://github.com/kubernetes/kubernetes/issues/67500
and is not planning to support it.
Addressing this issue at the application level appears to be even
less straightforward than addressing it at the kernel level.

This series of patches is based on series
isolation: Exclude dynamically isolated CPUs from housekeeping masks:
https://lore.kernel.org/lkml/20240821142312.236970-1-longman@redhat.com/
Its purpose is to exclude dynamically isolated CPUs from some
housekeeping masks so that subsystems that check the housekeeping masks
at run time will not use those isolated CPUs.

However, some of subsystems can use obsolete housekeeping CPU masks.
Therefore, to prevent the use of these isolated CPUs, it is necessary to
explicitly propagate changes of the housekeeping masks to all subsystems
depending on the mask.

Changes in v2:
- Focusing in this patch series on interrupts only.

v1:
- https://lore.kernel.org/lkml/20240516190437.3545310-1-costa.shul@redhat.com/

References:
- Linux Kernel Dynamic CPU Isolation: https://pretalx.com/devconf-us-2024/talk/AZBQLE/

Costa Shulyupin (3):
  sched/isolation: Add infrastructure for dynamic CPU isolation
  genirq/cpuhotplug: Adjust managed irqs according to change of
    housekeeping CPU
  DO NOT MERGE: test for managed irqs adjustment

 include/linux/irq.h      |   2 +
 kernel/cgroup/cpuset.c   |   1 +
 kernel/irq/cpuhotplug.c  |  95 ++++++++++++++++++++++++++++++++
 kernel/sched/isolation.c |  46 ++++++++++++++--
 tests/managed_irq.sh     | 113 +++++++++++++++++++++++++++++++++++++++
 5 files changed, 254 insertions(+), 3 deletions(-)
 create mode 100755 tests/managed_irq.sh

-- 
2.45.0



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

end of thread, other threads:[~2024-10-02 10:09 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-16 12:20 [RFC PATCH v3 0/3] genirq/cpuhotplug: Adjust managed interrupts according to change of housekeeping cpumask Costa Shulyupin
2024-09-16 12:20 ` [RFC PATCH v3 1/3] sched/isolation: Add infrastructure for dynamic CPU isolation Costa Shulyupin
2024-10-02  9:44   ` Thomas Gleixner
2024-09-16 12:20 ` [RFC PATCH v3 2/3] genirq/cpuhotplug: Adjust managed irqs according to change of housekeeping CPU Costa Shulyupin
2024-10-02 10:09   ` Thomas Gleixner
2024-09-16 12:20 ` [RFC PATCH v3 3/3] DO NOT MERGE: test for managed irqs adjustment Costa Shulyupin

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).