From: Shrikanth Hegde <sshegde@linux.ibm.com>
To: Yury Norov <yury.norov@gmail.com>, Peter Zijlstra <peterz@infradead.org>
Cc: mingo@redhat.com, juri.lelli@redhat.com,
vincent.guittot@linaro.org, tglx@linutronix.de,
maddy@linux.ibm.com, vschneid@redhat.com,
dietmar.eggemann@arm.com, rostedt@goodmis.org,
jstultz@google.com, kprateek.nayak@amd.com,
huschle@linux.ibm.com, srikar@linux.ibm.com,
linux-kernel@vger.kernel.org, linux@rasmusvillemoes.dk
Subject: Re: [RFC PATCH 0/5] sched: cpu parked and push current task mechanism
Date: Mon, 2 Jun 2025 09:55:27 +0530 [thread overview]
Message-ID: <27865aa8-71b9-4ddc-b3be-312e4ac3814a@linux.ibm.com> (raw)
In-Reply-To: <f6f122cf-daf4-4e31-af42-4f12761aa1da@linux.ibm.com>
Hi.
>
> ----------------------------
>
> vCPU - Virtual CPUs - CPU in VM world.
> pCPU - Physical CPUs - CPU in baremetal world.
>
> A hypervisor is managing these vCPUs from different VMs. When a vCPU
> requests for CPU, hypervisor does the job
> of scheduling them on a pCPU.
>
> So this issue occurs when there are more vCPUs(combined across all VMs)
> than the pCPU. So when *all* vCPUs are
> requesting for CPUs, hypervisor can only run a few of them and remaining
> will be preempted(waiting for pCPU).
>
>
> If we take two VM's, When hypervisor preempts vCPU from VM1 to run vCPU
> from VM2, it has to do
> save/restore VM context.Instead if VM's can co-ordinate among each other
> and request for *limited* vCPUs,
> it avoids the above overhead and there is context switching within
> vCPU(less expensive). Even if hypervisor
> is preempting one vCPU to run another withing the same VM, it is still
> more expensive than the task preemption within
> the vCPU. So *basic* aim to avoid vCPU preemption.
>
>
> So to achieve this, use this parking(we need better name for sure)
> concept, where it is better
> if workloads avoid some vCPUs at this moment. (vCPUs stays online, we
> don't want the overhead of sched domain rebuild).
>
>
> contention is dynamic in nature. When there is contention for pCPU is to
> be detected and determined
> by architecture. Archs needs to update the mask regularly.
>
> When there is contention, use limited vCPUs as indicated by arch.
> When there is no contention, use all vCPUs.
>
I hope this helped to set the problem context. I am trying to get feedback if the approach makes sense.
I will go through other push mechanism we have (example in rt/dl).
next prev parent reply other threads:[~2025-06-02 4:25 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-23 18:14 Shrikanth Hegde
2025-05-23 18:14 ` [RFC PATCH 1/5] cpumask: Introduce cpu parked mask Shrikanth Hegde
2025-05-27 15:06 ` Yury Norov
2025-06-23 8:10 ` Shrikanth Hegde
2025-05-23 18:14 ` [RFC PATCH 2/5] sched/core: Don't use parked cpu for selection Shrikanth Hegde
2025-05-27 14:59 ` Yury Norov
2025-05-27 17:35 ` Shrikanth Hegde
2025-05-23 18:14 ` [RFC PATCH 3/5] sched/fair: Don't use parked cpu for load balancing Shrikanth Hegde
2025-05-23 18:14 ` [RFC PATCH 4/5] sched/core: Push current task when cpu is parked Shrikanth Hegde
2025-05-23 18:14 ` [DEBUG PATCH 5/5] powerpc: Use manual hint for cpu parking Shrikanth Hegde
2025-05-27 15:10 ` [RFC PATCH 0/5] sched: cpu parked and push current task mechanism Peter Zijlstra
2025-05-27 15:47 ` Yury Norov
2025-05-27 17:30 ` Shrikanth Hegde
2025-06-02 4:25 ` Shrikanth Hegde [this message]
2025-06-02 14:22 ` Tobias Huschle
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=27865aa8-71b9-4ddc-b3be-312e4ac3814a@linux.ibm.com \
--to=sshegde@linux.ibm.com \
--cc=dietmar.eggemann@arm.com \
--cc=huschle@linux.ibm.com \
--cc=jstultz@google.com \
--cc=juri.lelli@redhat.com \
--cc=kprateek.nayak@amd.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@rasmusvillemoes.dk \
--cc=maddy@linux.ibm.com \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.org \
--cc=srikar@linux.ibm.com \
--cc=tglx@linutronix.de \
--cc=vincent.guittot@linaro.org \
--cc=vschneid@redhat.com \
--cc=yury.norov@gmail.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®