[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240717105233.07b4ec00@rorschach.local.home>
Date: Wed, 17 Jul 2024 10:52:33 -0400
From: Steven Rostedt <rostedt@...dmis.org>
To: Sean Christopherson <seanjc@...gle.com>
Cc: Joel Fernandes <joel@...lfernandes.org>, Mathieu Desnoyers
<mathieu.desnoyers@...icios.com>, Vineeth Remanan Pillai
<vineeth@...byteword.org>, Ben Segall <bsegall@...gle.com>, Borislav Petkov
<bp@...en8.de>, Daniel Bristot de Oliveira <bristot@...hat.com>, Dave
Hansen <dave.hansen@...ux.intel.com>, Dietmar Eggemann
<dietmar.eggemann@....com>, "H . Peter Anvin" <hpa@...or.com>, Ingo Molnar
<mingo@...hat.com>, Juri Lelli <juri.lelli@...hat.com>, Mel Gorman
<mgorman@...e.de>, Paolo Bonzini <pbonzini@...hat.com>, Andy Lutomirski
<luto@...nel.org>, Peter Zijlstra <peterz@...radead.org>, Thomas Gleixner
<tglx@...utronix.de>, Valentin Schneider <vschneid@...hat.com>, Vincent
Guittot <vincent.guittot@...aro.org>, Vitaly Kuznetsov
<vkuznets@...hat.com>, Wanpeng Li <wanpengli@...cent.com>, Suleiman Souhlal
<suleiman@...gle.com>, Masami Hiramatsu <mhiramat@...nel.org>,
himadrics@...ia.fr, kvm@...r.kernel.org, linux-kernel@...r.kernel.org,
x86@...nel.org, graf@...zon.com, drjunior.org@...il.com
Subject: Re: [RFC PATCH v2 0/5] Paravirt Scheduling (Dynamic vcpu priority
management)
On Wed, 17 Jul 2024 10:36:47 -0400
Steven Rostedt <rostedt@...dmis.org> wrote:
> The problem with that is the only use case for such a feature is for
> vCPUS. There's no use case for a single thread to up and down its
> priority. I work a lot in RT applications (well, not as much anymore,
> but my career was heavy into it). And I can't see any use case where a
> single thread would bounce its priority around. In fact, if I did see
> that, I would complain that it was a poorly designed system.
>
> Now for a guest kernel, that's very different. It has to handle things
> like priority inheritance and such, where bouncing a threads (or its
> own vCPU thread) priority most definitely makes sense.
>
> So you are requesting that we add a bad user space interface to allow
> lazy priority management from a thread so that we can use it in the
> proper use case of a vCPU?
Now I stated the above thinking you wanted to add a generic interface
for all user space. But perhaps there is a way to get this to be done
by the scheduler itself. But its use case is still only for VMs.
We could possibly add a new sched class that has a dynamic priority.
That is, it can switch between other sched classes. A vCPU thread could
be assigned to this class from inside the kernel (via a virtio device)
where this is not exposed to user space at all. Then the virtio device
would control the mapping of a page between the vCPU thread and the
host kernel. When this task gets scheduled, it can call into the code
that handles the dynamic priority. This will require buy-in from the
scheduler folks.
This could also handle the case of a vCPU being woken up by an
interrupt, as the hooks could be there on the wakeup side as well.
Thoughts?
-- Steve
Powered by blists - more mailing lists