Received: by 10.192.165.148 with SMTP id m20csp3730861imm; Mon, 30 Apr 2018 05:33:47 -0700 (PDT) X-Google-Smtp-Source: AB8JxZrcEGaowrR3UjDRP4cL91Cuh3OafK5zBG6YW40jqOEVhcfmGSBJ7rKZCqcuybswhXyGnPtM X-Received: by 2002:a17:902:bf41:: with SMTP id u1-v6mr12436520pls.257.1525091627065; Mon, 30 Apr 2018 05:33:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525091627; cv=none; d=google.com; s=arc-20160816; b=ekVizmFX+xW2e/jWssFRvNZHDhjvx1Tr+UXA3AcWt8kdTF8ap24W2ZtL6xisxWs0qr EV4KxxiE8l2KHV1XdIRDITRfty5J528XjsxFn3BaVTJQ5GAe3hy2vCL45bkH/gVm+0an ju2q3ZfN20zxL2w9n0ENq/sWy8RDyQDxaoilP8AtHAi64XfllW2oYyBT/FB6WoHwtzJC VcAJtMDN19K+AEWFyzNDENQ2HvVkld10rkdXmUmgTa/Hz8Oai3J6VUaPOqeTT4GTwxqK KLoG6hkChgGRJos1doGZN1zf/LxjSNCiUQS42C35YdfXTRiwVWfdhkE6YEapNWqeoiC5 Yu1w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:mail-followup-to:message-id:subject:cc:to:from:date :dkim-signature:arc-authentication-results; bh=om/lHEHJVMTrOleWVYyd9vI4l3jYeUWGEBYWh9b2pX8=; b=S5EbVRYVF85KSCCyWd20SUxV427WG1h7mq1fKq/fNNHTbhKRP/z32KnG9nJt/qrGU+ aLEBy5a9qMkInv1Z0kuRTNmiUSJmYHsVn6VnnV5YPHIixhKr1Ux8f7K/lQyMxeCEPVQD oqrqvNSuirdYh9X3ZuR1cgTw6H+BZp+L2+N9Gbp1lliAdkAjuv9TLZZpV8Rf4Ad0L2jN MXh+ulVXarkCCtgfDUi6+5Nj0YvBOC1iH+ln4ggKmhKQ/bQbFl15aeUPHMPYb4opHJ6Y 63hNmSySXt0iYlH2BbYDQY2rOz7l3z8QkGpfgNfjCwPxiNOc+OugZmWhkrOmp97rmnCT JuNA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2017-10-26 header.b=nyY1GAFf; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a15-v6si3149009pll.412.2018.04.30.05.33.32; Mon, 30 Apr 2018 05:33:47 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2017-10-26 header.b=nyY1GAFf; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753410AbeD3McN (ORCPT + 99 others); Mon, 30 Apr 2018 08:32:13 -0400 Received: from aserp2120.oracle.com ([141.146.126.78]:35720 "EHLO aserp2120.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752532AbeD3McL (ORCPT ); Mon, 30 Apr 2018 08:32:11 -0400 Received: from pps.filterd (aserp2120.oracle.com [127.0.0.1]) by aserp2120.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w3UCVlb9040093; Mon, 30 Apr 2018 12:31:47 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=date : from : to : cc : subject : message-id : references : mime-version : content-type : content-transfer-encoding : in-reply-to; s=corp-2017-10-26; bh=om/lHEHJVMTrOleWVYyd9vI4l3jYeUWGEBYWh9b2pX8=; b=nyY1GAFfhsN18OVxxZQh/hQO2djKI8ZZPa/L6qh8X/QQloo3ROlHc9+59sWux6oSBsD3 pGxO5qDtJh91Lb7OwcAfYKVbDdpyA83WHg3ANsVGL3nAiNVUkw2pMhKJ7r0jb1s3tGe8 9J7XFY4t0NPGG3vIrhz+hq41xsG7q0Lq0iIelWJB3d8RWUh8RNIqY/1286zQH/xYYBjD fNFdEAph897sVX6ZM/Pi8yD/x2TS+Mhd1gLLCl/jq8QNkRvcZNTNKBIwzdrGb1QRUU+5 JWOrSfpO6iZ0lqEoDKWezu2i38JJcS5nkAqVDjfnWXGss1k2anlTPXcNjjWKS1RKxCVG 2A== Received: from aserv0022.oracle.com (aserv0022.oracle.com [141.146.126.234]) by aserp2120.oracle.com with ESMTP id 2hmgxfkubb-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 30 Apr 2018 12:31:47 +0000 Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by aserv0022.oracle.com (8.14.4/8.14.4) with ESMTP id w3UCVkFd021974 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 30 Apr 2018 12:31:46 GMT Received: from abhmp0012.oracle.com (abhmp0012.oracle.com [141.146.116.18]) by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id w3UCVjjl015795; Mon, 30 Apr 2018 12:31:45 GMT Received: from starbug-mbp.local (/10.175.168.11) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Mon, 30 Apr 2018 05:31:44 -0700 Date: Mon, 30 Apr 2018 13:31:49 +0100 From: Darren Kenny To: Wanpeng Li Cc: linux-kernel@vger.kernel.org, kvm@vger.kernel.org, Paolo Bonzini , Radim =?utf-8?B?S3LEjW3DocWZ?= , Anthoine Bourgeois Subject: Re: [PATCH] KVM: X86: Limit timer frequency with more smaller interval Message-ID: <20180430123149.mroow2pdhglqesrn@starbug-mbp.local> Mail-Followup-To: Wanpeng Li , linux-kernel@vger.kernel.org, kvm@vger.kernel.org, Paolo Bonzini , Radim =?utf-8?B?S3LEjW3DocWZ?= , Anthoine Bourgeois References: <1525055900-20729-1-git-send-email-wanpengli@tencent.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1525055900-20729-1-git-send-email-wanpengli@tencent.com> User-Agent: NeoMutt/20180323 X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=8878 signatures=668698 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1711220000 definitions=main-1804300121 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Wanpeng Li, On Sun, Apr 29, 2018 at 07:38:20PM -0700, Wanpeng Li wrote: >From: Wanpeng Li > >Anthoine reported: > The period used by Windows change over time but it can be 1 milliseconds > or less. I saw the limit_periodic_timer_frequency print so 500 > microseconds is sometimes reached. > >This patchs limits timer frequency with more smaller interval 200ms(5000Hz) >to leave some headroom as Paolo suggested since Windows 10 changed the >scheduler tick limit from 1024 Hz to 2048 Hz. I would suggest re-writing this slightly, removing the 'this patch' as some people suggested in other threads, and maybe some other small re-wording, e.g.: As suggested by Paolo, lower the timer frequency limit to a smaller interval of 200 ms (5000 Hz) to leave some headroom. This is required due to Windows 10 changing the scheduler tick limit from 1024 Hz to 2048 Hz. Also, in the subject line, maybe write it as 'Lower timer frequency limit to 200ms'? > >Reported-by: Anthoine Bourgeois >Suggested-by: Paolo Bonzini >Cc: Paolo Bonzini >Cc: Radim Krčmář >Cc: Anthoine Bourgeois >Signed-off-by: Wanpeng Li With those changes (or similar): Reviewed-by: Darren Kenny >--- > arch/x86/kvm/x86.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c >index 51ecd38..dc47073 100644 >--- a/arch/x86/kvm/x86.c >+++ b/arch/x86/kvm/x86.c >@@ -114,7 +114,7 @@ module_param(ignore_msrs, bool, S_IRUGO | S_IWUSR); > static bool __read_mostly report_ignored_msrs = true; > module_param(report_ignored_msrs, bool, S_IRUGO | S_IWUSR); > >-unsigned int min_timer_period_us = 500; >+unsigned int min_timer_period_us = 200; > module_param(min_timer_period_us, uint, S_IRUGO | S_IWUSR); > > static bool __read_mostly kvmclock_periodic_sync = true; >-- >2.7.4 >