lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 24 Feb 2017 10:04:59 -0300
From:   Marcelo Tosatti <mtosatti@...hat.com>
To:     Paolo Bonzini <pbonzini@...hat.com>
Cc:     Radim Krcmar <rkrcmar@...hat.com>, kvm@...r.kernel.org,
        linux-kernel@...r.kernel.org,
        "Rafael J. Wysocki" <rjw@...ysocki.net>,
        Viresh Kumar <viresh.kumar@...aro.org>
Subject: Re: [patch 0/3] KVM CPU frequency change hypercalls

On Fri, Feb 24, 2017 at 01:17:07PM +0100, Paolo Bonzini wrote:
> 
> 
> On 24/02/2017 12:50, Marcelo Tosatti wrote:
> >>>
> >>> On all other cpufreq implementations, these boundaries still need to
> >>> be set. Then, a "governor" must be selected. Such a "governor" decides
> >>> what speed the processor shall run within the boundaries. One such
> >>> "governor" is the "userspace" governor. This one allows the user - or
> >>> a yet-to-implement userspace program - to decide what specific speed
> >>> the processor shall run at.
> >> The userspace program sets a policy for the whole system.
> > No, its per cpu.
> 
> Yeah, what I mean is that userspace program can be per-CPU, but it looks
> at all the processes running on that CPU ("the whole system").  This is
> very different from a guest, which is isolated.
> 
> >>>> That's bad.  This feature is broken by design unless it does proper
> >>>> save/restore across preemption.
> >>> Whats the current usecase, or forseeable future usecase, for save/restore
> >>> across preemption again? (which would validate the broken by design
> >>> claim).
> >> Stop a guest that is using cpufreq, start a guest that is not using it.
> >> The second guest's performance now depends on the state that the first
> >> guest left in cpufreq.
> >
> > Nothing forbids the host to implement switching with the
> > current hypercall interface: all you need is a scheduler
> > hook.
> 
> Can it be done in vcpu_load/vcpu_put?  But you still would have two
> components (KVM and sysfs) potentially fighting over the frequency, and
> that's still a bit ugly.
> 
> Paolo

Change the frequency at vcpu_load/vcpu_put? Yes: call into
cpufreq-userspace. But there is no notion of "per-task frequency" on the
Linux kernel (which was the starting point of this subthread).
 
But if you configure all CPUs in the system as cpufreq-userspace,
then some other (userspace program) has to decide the frequency
for the other CPUs.

Which agent would do that and why? Thats why i initially said "whats the
usecase".



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ