From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751530AbdBXBQZ (ORCPT ); Thu, 23 Feb 2017 20:16:25 -0500 Received: from mx1.redhat.com ([209.132.183.28]:39688 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751246AbdBXBQX (ORCPT ); Thu, 23 Feb 2017 20:16:23 -0500 Date: Thu, 23 Feb 2017 20:19:26 -0300 From: Marcelo Tosatti To: Paolo Bonzini Cc: Radim Krcmar , kvm@vger.kernel.org, linux-kernel@vger.kernel.org, "Rafael J. Wysocki" , Viresh Kumar Subject: Re: [patch 0/3] KVM CPU frequency change hypercalls Message-ID: <20170223231923.GB23631@amt.cnet> References: <20170202174755.946578704@redhat.com> <20170203164349.GA5582@potion> <20170203181405.GA1869@amt.cnet> <20170203190930.GD15128@potion> <5db0e1a1-2eaf-fe77-3e15-7b2ef842d255@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5db0e1a1-2eaf-fe77-3e15-7b2ef842d255@redhat.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Fri, 24 Feb 2017 01:15:30 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Feb 23, 2017 at 06:35:24PM +0100, Paolo Bonzini wrote: > > > On 03/02/2017 20:09, Radim Krcmar wrote: > > One reason why we have a kernel/userspace split is to allow sharing of > > CPU time. Each application then its state that the kernel keeps track > > of and saves/restores while time-multiplexing. > > > > Our frequency scaling interface goes against the idea -- guest kernel > > cannot schedule multiple userspaces on the same vCPU, because they could > > conflict by overriding frequency. > > > > i.e. our feature implies userspace tasks pinned to isolated vCPUs. This is how cpufreq-userspace works: 2.2 Governor ------------ 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. > 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). > You don't need a hypercall. Add a cpufreq driver in DPDK that doesn't > use sysfs, and connect it to a daemon in the host through virtio-serial > or vsock. > > Paolo Hypercalls overcome the problems mentioned in the first email of the thread, i think you missed them: "[patch 0/3] KVM CPU frequency change hypercalls"