From: Costa Shulyupin <costa.shul@redhat.com>
To: longman@redhat.com, ming.lei@redhat.com, pauld@redhat.com,
juri.lelli@redhat.com, vschneid@redhat.com,
"Jens Axboe" <axboe@kernel.dk>,
"Thomas Gleixner" <tglx@linutronix.de>,
"Peter Zijlstra" <peterz@infradead.org>,
"Zefan Li" <lizefan.x@bytedance.com>, "Tejun Heo" <tj@kernel.org>,
"Johannes Weiner" <hannes@cmpxchg.org>,
"Michal Koutný" <mkoutny@suse.com>,
"Ingo Molnar" <mingo@redhat.com>,
"Vincent Guittot" <vincent.guittot@linaro.org>,
"Dietmar Eggemann" <dietmar.eggemann@arm.com>,
"Steven Rostedt" <rostedt@goodmis.org>,
"Ben Segall" <bsegall@google.com>, "Mel Gorman" <mgorman@suse.de>,
"Costa Shulyupin" <costa.shul@redhat.com>,
linux-block@vger.kernel.org, linux-kernel@vger.kernel.org,
cgroups@vger.kernel.org
Subject: [RFC PATCH v3 0/3] genirq/cpuhotplug: Adjust managed interrupts according to change of housekeeping cpumask
Date: Tue, 29 Oct 2024 14:05:31 +0200 [thread overview]
Message-ID: <20241029120534.3983734-1-costa.shul@redhat.com> (raw)
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.
Signed-off-by: Costa Shulyupin <costa.shul@redhat.com>
---
Changes in v3:
- Address the comments by Thomas Gleixner.
Changes in v2:
- Focus in this patch series on managed interrupts only.
- https://lore.kernel.org/lkml/20240916122044.3056787-1-costa.shul@redhat.com/
Changes in 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
DO NOT MERGE: test for managed irqs adjustment
genirq/cpuhotplug: Adjust managed irqs according to change of
housekeeping CPU
block/blk-mq.c | 19 +++++++
include/linux/blk-mq.h | 2 +
include/linux/cpu.h | 4 ++
include/linux/irq.h | 2 +
kernel/cgroup/cpuset.c | 1 +
kernel/cpu.c | 2 +-
kernel/irq/cpuhotplug.c | 99 +++++++++++++++++++++++++++++++++
kernel/sched/isolation.c | 51 +++++++++++++++--
tests/managed_irq.sh | 116 +++++++++++++++++++++++++++++++++++++++
9 files changed, 291 insertions(+), 5 deletions(-)
create mode 100755 tests/managed_irq.sh
--
2.47.0
next reply other threads:[~2024-10-29 12:07 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-29 12:05 Costa Shulyupin [this message]
2024-10-29 12:05 ` [RFC PATCH v3 1/3] sched/isolation: Add infrastructure for dynamic CPU isolation Costa Shulyupin
2024-10-29 12:05 ` [RFC PATCH v3 2/3] DO NOT MERGE: test for managed irqs adjustment Costa Shulyupin
2024-10-29 12:05 ` [RFC PATCH v3 3/3] genirq/cpuhotplug: Adjust managed irqs according to change of housekeeping CPU Costa Shulyupin
2024-10-29 18:54 ` Thomas Gleixner
2025-01-06 14:39 ` Costa Shulyupin
-- strict thread matches above, loose matches on Subject: below --
2024-09-16 12:20 [RFC PATCH v3 0/3] genirq/cpuhotplug: Adjust managed interrupts according to change of housekeeping cpumask Costa Shulyupin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20241029120534.3983734-1-costa.shul@redhat.com \
--to=costa.shul@redhat.com \
--cc=axboe@kernel.dk \
--cc=bsegall@google.com \
--cc=cgroups@vger.kernel.org \
--cc=dietmar.eggemann@arm.com \
--cc=hannes@cmpxchg.org \
--cc=juri.lelli@redhat.com \
--cc=linux-block@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lizefan.x@bytedance.com \
--cc=longman@redhat.com \
--cc=mgorman@suse.de \
--cc=ming.lei@redhat.com \
--cc=mingo@redhat.com \
--cc=mkoutny@suse.com \
--cc=pauld@redhat.com \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.org \
--cc=tglx@linutronix.de \
--cc=tj@kernel.org \
--cc=vincent.guittot@linaro.org \
--cc=vschneid@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®