From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751455AbdBXJTJ (ORCPT ); Fri, 24 Feb 2017 04:19:09 -0500 Received: from mail-wm0-f67.google.com ([74.125.82.67]:35467 "EHLO mail-wm0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751151AbdBXJTD (ORCPT ); Fri, 24 Feb 2017 04:19:03 -0500 Subject: Re: [patch 0/3] KVM CPU frequency change hypercalls To: Marcelo Tosatti References: <20170202174755.946578704@redhat.com> <20170203164349.GA5582@potion> <20170203181405.GA1869@amt.cnet> <20170203190930.GD15128@potion> <5db0e1a1-2eaf-fe77-3e15-7b2ef842d255@redhat.com> <20170223231923.GB23631@amt.cnet> Cc: Radim Krcmar , kvm@vger.kernel.org, linux-kernel@vger.kernel.org, "Rafael J. Wysocki" , Viresh Kumar From: Paolo Bonzini Message-ID: <5310a7a1-3c3b-7b19-4f2d-6f7919c7b560@redhat.com> Date: Fri, 24 Feb 2017 10:18:59 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0 MIME-Version: 1.0 In-Reply-To: <20170223231923.GB23631@amt.cnet> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 24/02/2017 00:19, Marcelo Tosatti wrote: >>> 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. The userspace program sets a policy for the whole system. >> 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. I think this is abusing the userspace governor. Unfortunately cpufreq governors cannot be stacked. Paolo