Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S945915AbdDTNcw convert rfc822-to-8bit (ORCPT ); Thu, 20 Apr 2017 09:32:52 -0400 Received: from szxga02-in.huawei.com ([45.249.212.188]:5375 "EHLO dggrg02-dlp.huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S943975AbdDTNcr (ORCPT ); Thu, 20 Apr 2017 09:32:47 -0400 From: "Gonglei (Arei)" To: "kvm@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "cgroups@vger.kernel.org" CC: Jason Wang , Linqiangmin , "Huangweidong (C)" Subject: about CPU QoS in KVM Thread-Topic: about CPU QoS in KVM Thread-Index: AdK52o+aCImCT7fmQHeLQrSO8LwoZA== Date: Thu, 20 Apr 2017 13:32:31 +0000 Message-ID: <33183CC9F5247A488A2544077AF19020DA237684@DGGEMA505-MBS.china.huawei.com> Accept-Language: zh-CN, en-US Content-Language: zh-CN X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.177.18.62] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 X-CFilter-Loop: Reflected X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A090205.58F8B87B.00C4,ss=1,re=0.000,recu=0.000,reip=0.000,cl=1,cld=1,fgs=0, ip=169.254.4.120, so=2014-11-16 11:51:01, dmn=2013-03-21 17:37:32 X-Mirapoint-Loop-Id: 69233f871d1b3642e1ff94881640fe33 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 946 Lines: 21 Hi all, Currently, KVM do the CPU resource reservation by the cgroup mechanism which can't do entire accurate separation because the capacity of the Linux scheduler. Take the public cloud as an example, some customers rent one vm with 8 CPUs paid by enough money, they want to get enough response speed on CPU scheduling. So we (the cloud platform providers ) reserve 1GHz CPU resources by cgroup for those VM's vcpu/pcpu. But the actual effects can't meet those requirements because the cgroup is limiting share usage of other processes in order to attach the reservation proportion, but the scheduler can't assure that. This mechanism is different with Xen, We can directly change the CPU weight on Xen hypervisor so that we can get entire accurate control on CPU resources based on accurate capacity (upper limit), share (weight) and reservation. So my question is do we have a good method to do CPU reservation in KVM? Thanks, -Gonglei