Received: by 2002:a05:6602:18e:0:0:0:0 with SMTP id m14csp5542036ioo; Wed, 1 Jun 2022 07:37:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw6gxlG8GwVWVDvv/7zSG9NN7o5SxvR67J1dz94E/bRZHJMWBm9iBf+pEzAVC3xxtUVZn7Y X-Received: by 2002:a63:ff54:0:b0:3fa:9ae1:db7d with SMTP id s20-20020a63ff54000000b003fa9ae1db7dmr212589pgk.355.1654094266056; Wed, 01 Jun 2022 07:37:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654094266; cv=none; d=google.com; s=arc-20160816; b=O6a5EwMpT0NiFark8GhsZv6ntF7jNksnVusQpPA2Z8MZFAe5N1iMaqyzh3GTxQneER +YtfhgtC5z4khE+iT/o8AxkLCrrthF6PQAipJ0sFTh22/lJUeSCyrWkaLgIhbdxz1Zz9 FXjnwfcZh+Zm+23X+E+cTCalbpEGYeVHODzwKYl7N7N2VQkVOttBJiT38njt60TZbD4/ YDEzifIeIG4HsH1wBfaJxRAEH81nDA/MpiE25DqRygehKUOGh/GufZAabZu2I4ZJN9+i vBxjo5isBUE2YmMCUGuLZsbtG5B4FKExg7wRcS8457UGTmskiGLnZZ0SfR5WsR3v/qOr pdQw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=uzxCOihBBp2MvYCnWOOgAbyz9Dw1/OZ2iZqah66p3+o=; b=v/10fe9j5s+AQAE2rjpUdIWIe1U/U2uiBrVUUerIV0VWluMPZlTmDL5bJb6k/Cj8T7 Br1/BPISgXrKhfoOX+0aCjObszorTd1q2O4ZoEV5HaB4slNyjBEf11WiHjl9PlWWOGBU nWHsQscUY8TeoZahejOPwXz/nkorqugoCAWMqUnyppIEwpL9mY/p0LakSYmZH9SJhRNz kp9eqbJr3KASJvW5WK69E2rECYJRbU25UfmKI+D3ct7VxhN9KttqO9PD+/7YXysj2OIn M8gw559A6sF0M26TGJ3urdpf2fZRJ6XK1itsPTcc3iztIwdLQUYFe6Wf8TyHClWXrJT+ atrw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=EXOjlnKQ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id o185-20020a6341c2000000b003f60c9617f9si2705791pga.268.2022.06.01.07.37.33; Wed, 01 Jun 2022 07:37:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=EXOjlnKQ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1349838AbiFAI73 (ORCPT + 99 others); Wed, 1 Jun 2022 04:59:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46298 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1347947AbiFAI71 (ORCPT ); Wed, 1 Jun 2022 04:59:27 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 71BA26BFE7 for ; Wed, 1 Jun 2022 01:59:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1654073965; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=uzxCOihBBp2MvYCnWOOgAbyz9Dw1/OZ2iZqah66p3+o=; b=EXOjlnKQirydQ4DGET0xbN2cNa7Z4L70epX6LmNKhu9loYdD15pyTETP25xHGuxCuJVG7A 4XIiqBTwMdBcx6IAxe/0BSkmgiMyA/pS5eAPF2CpRmbuhi14SWtJYPqCZ4ZByJjpE7lVF2 nQE8rwCdnsiYKtQWG2S6MN5nYYfmGvw= Received: from mail-ed1-f71.google.com (mail-ed1-f71.google.com [209.85.208.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-131-CLrASgcsNEyjDov6QsFk5Q-1; Wed, 01 Jun 2022 04:59:24 -0400 X-MC-Unique: CLrASgcsNEyjDov6QsFk5Q-1 Received: by mail-ed1-f71.google.com with SMTP id g7-20020a056402424700b0042dee9d11d0so812658edb.3 for ; Wed, 01 Jun 2022 01:59:24 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=uzxCOihBBp2MvYCnWOOgAbyz9Dw1/OZ2iZqah66p3+o=; b=WpqtDLPDNZjrOX03/ygc8KxZQa1TnKDlqG++0Ko9AzAweHhdcnFI5YkAAdoIt7Q1Mf Oy24OOSfBKYmfXoO0S20WqfOQv+H3ZJ0v6MkAYyj6woB9E7cjPPlGA/n6kQeDwvsXRFh WYDHapcDWQWFrDoz9OvWTFwOQ41XgWJGeK+3td2luG7SwNCrTNi0354Ch5ZeeubdSMdA PhqqlrtkxLIF5EKgrBSDSl+/z414ZASiZQqR42ODsOItBY4CS2S5cIp2M1uRmuMllqw1 vMQoMhTpAU8gA3/TaXFBcA3qwW97mHNcaojm5ZqBr+qhJ7kDIw0SaxvJ4b8GOYztVc3g 51nQ== X-Gm-Message-State: AOAM531U6LfvQAC+iXVTT17BLufWdDrJQ2s/8PNrVXpsF6ze6w4TPa04 EPeWLuCwFOE5dQuHADKiE0pGu1m6zQXM22AdveMrNviNjoRL5UUkt+N5Hf1CPs0SrhtqxJKa7OU R1oU5ZQtDAwP6I7q5o9EdzPud X-Received: by 2002:a50:ea8b:0:b0:428:7d05:eb7e with SMTP id d11-20020a50ea8b000000b004287d05eb7emr66994806edo.185.1654073963162; Wed, 01 Jun 2022 01:59:23 -0700 (PDT) X-Received: by 2002:a50:ea8b:0:b0:428:7d05:eb7e with SMTP id d11-20020a50ea8b000000b004287d05eb7emr66994790edo.185.1654073962970; Wed, 01 Jun 2022 01:59:22 -0700 (PDT) Received: from ?IPV6:2001:b07:6468:f312:9af8:e5f5:7516:fa89? ([2001:b07:6468:f312:9af8:e5f5:7516:fa89]) by smtp.googlemail.com with ESMTPSA id cx12-20020a05640222ac00b0042bd6630a14sm644395edb.87.2022.06.01.01.59.18 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 01 Jun 2022 01:59:22 -0700 (PDT) Message-ID: Date: Wed, 1 Jun 2022 10:59:17 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.8.0 Subject: Re: ...\n Content-Language: en-US To: Vitaly Kuznetsov , "Durrant, Paul" , Peter Zijlstra , "Allister, Jack" Cc: "bp@alien8.de" , "diapop@amazon.co.uk" , "hpa@zytor.com" , "jmattson@google.com" , "joro@8bytes.org" , "kvm@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "metikaya@amazon.co.uk" , "mingo@redhat.com" , "rkrcmar@redhat.com" , "sean.j.christopherson@intel.com" , "tglx@linutronix.de" , "wanpengli@tencent.com" , "x86@kernel.org" References: <20220531140236.1435-1-jalliste@amazon.com> <059ab3327ac440479ecfdf49fa054347@EX13D32EUC003.ant.amazon.com> <307f19cc-322e-c900-2894-22bdee1e248a@redhat.com> <87tu94olyd.fsf@redhat.com> From: Paolo Bonzini In-Reply-To: <87tu94olyd.fsf@redhat.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-3.9 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 6/1/22 09:57, Vitaly Kuznetsov wrote: >>> I'll bite... What's ludicrous about wanting to run a guest at a lower CPU freq to minimize observable change in whatever workload it is running? >> Well, the right API is cpufreq, there's no need to make it a KVM >> functionality. > KVM may probably use the cpufreq API to run each vCPU at the desired > frequency: I don't quite see how this can be done with a VMM today when > it's not a 1-vCPU-per-1-pCPU setup. True, but then there's also a policy issue, in that KVM shouldn't be allowed to *bump* the frequency if userspace would ordinarily not have access to the cpufreq files in sysfs. All in all, I think it's simpler to let privileged userspace (which knows when it has a 1:1 mapping of vCPU to pCPU) handle it with cpufreq. Paolo