Received: by 10.223.164.202 with SMTP id h10csp66389wrb; Mon, 13 Nov 2017 20:06:19 -0800 (PST) X-Google-Smtp-Source: AGs4zMb0aHkCAXzOGcmPK7GViR1/EqsrgJYQtmSAp/PgLj1Ob31VGtDtmd1oXAjKJ5cQfFz3B+TI X-Received: by 10.101.100.65 with SMTP id s1mr10853004pgv.185.1510632379072; Mon, 13 Nov 2017 20:06:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1510632379; cv=none; d=google.com; s=arc-20160816; b=kdQwQQpnI1LriRzhQNg8FtXB4RxAugqRuU95p2JBfKp28RV5ZxSiulAF0dGSo82BbN W06hRQJzc5Pc53Gwh49vrijNYBoCqqqekXeFtHgiRyzpXIViMwS+2suR76lAvGqzLNqt hyJxAWQiRXlyjBIU44xmu3pJcoU2NjNdHxUIH/NqxsU09F8fjQ74OrGRHSv9B9TNFR1I KtUfj6SxrD314G3NHNdye9JHi5vf4FVYvWfvolmC0d/zmNRk/Qd9+0lSRq70F8GYk8mG rL+QF9jrVO7hfXnr6ddpgCPDmkOW3Un4krKiIj8NsEgM5a/WUCAVVAjzl4TfzIp7IpmJ 7ePQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature :arc-authentication-results; bh=pwhjhf9MSOFWW28SqmEdCyAlzdo9OBZZ2qOqxjrSsi0=; b=lyVDWddngek3DQlXjGCYJFDK/1BPygjKxHdKqrf54yGhiS2IDkHIWuVnip66q4nBKe dSoJCtvkAfU7uRikRZKr93ibwipvLVlJSBU2rokR+d6fnI8P9awih1TS9zSn5aUgbo4A dWCrOTVka0Y/NvwT4DXh+zM+sESxupX7ccO9iCaOUzzARYgQc26jiwCWfhJuWPVQGcyy 46Us4AKFnjlygSi0gKO0rCfFZgWCbcyb5ji5BuDmnz66Jy0Of28DpJWgTYVNZaxeDwi1 FTFJ62cDoCGg2ho0bOjRhPGKt5YlLV1ZqNHSlLokmpC14ZLYWy96MTsAX3Uc7B+PpEyN pEDQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=RH7Xrzg7; 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=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f64si3382742pfk.57.2017.11.13.20.06.06; Mon, 13 Nov 2017 20:06:19 -0800 (PST) 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=@gmail.com header.s=20161025 header.b=RH7Xrzg7; 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=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753160AbdKNEF0 (ORCPT + 89 others); Mon, 13 Nov 2017 23:05:26 -0500 Received: from mail-oi0-f65.google.com ([209.85.218.65]:51892 "EHLO mail-oi0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751171AbdKNEFX (ORCPT ); Mon, 13 Nov 2017 23:05:23 -0500 Received: by mail-oi0-f65.google.com with SMTP id h81so7259965oib.8; Mon, 13 Nov 2017 20:05:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding:content-language; bh=pwhjhf9MSOFWW28SqmEdCyAlzdo9OBZZ2qOqxjrSsi0=; b=RH7Xrzg75OvQpFkhexydQ95bKGbORQVeEI00/+WakxlV1gAr/gWIG/wBCI1+TjV+3R UdbNTRifi5fI1VhrYpbICxPtV3oDK2DjWXqZfXe48YjKSpcql/FcSA4EaK1CsNkb1Ad8 cgzfBzTPyuBKT3+KqZmEuU+N+Wgyl+9uOPwMMFMB4HzgqQKkyfOSa6KdnqwIbn+v8K17 okCAmBoG6Uvqu7zZk1LbjfTPHCXR34HIiuOR4vYIdskKNFOJytZ5dn871u0jAkSZeHtH DC/pCOkjYW3//5FqU8kCcp8UD1G/mJoA9XJSSqK/ZWBx7N/TNJtPbjYVOVCWRtpMSc4J gzHw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=pwhjhf9MSOFWW28SqmEdCyAlzdo9OBZZ2qOqxjrSsi0=; b=SI5SizrC83ze6CnrE03TETpq7k9HA8co7qV026aoxzW41fod0piwpO+euokiLq1KwA EQMiDb8G7Skhwf22Vt28vsedoK9j+IbLa0xkSIoL+Rg8AVozcwM81n0dfwHonwe6RART 0qZ8rbkDa+mypXflYoYTP+qmmA9oEx0GUxIjporqkjkZD5AplyQ01sacenMWZg7HOb2l WyNrk0YJyILfZG6NFhPuWVfPGWt8k+HNq73DLsL9YPWV3iKQNXAw2+Wum1WcokGMlQMR TUVL35a7SZmGiWBaQ716o8YLhtcaLRmS26DgIPKzGLCyl5QeblyAwqlnmPq1yEiW0Sb9 NJLg== X-Gm-Message-State: AJaThX7LyYn9+ecd0bBX/ZobXuQGo/UD4YBZQZv7IHlfxWKLLewf/5ua +NfSxp+qc+tfgjluftWj/Ho/rfcI X-Received: by 10.202.191.196 with SMTP id p187mr5985047oif.162.1510632323195; Mon, 13 Nov 2017 20:05:23 -0800 (PST) Received: from [0.0.0.0] ([47.89.242.186]) by smtp.gmail.com with ESMTPSA id m3sm6576676oik.58.2017.11.13.20.05.19 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 13 Nov 2017 20:05:22 -0800 (PST) Subject: Re: [PATCH RFC v3 4/6] Documentation: Add three sysctls for smart idle poll To: Ingo Molnar , Quan Xu Cc: kvm@vger.kernel.org, linux-doc@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, virtualization@lists.linux-foundation.org, x86@kernel.org, Yang Zhang References: <1510570064-6178-1-git-send-email-quan.xu0@gmail.com> <20171113150842.epdffyxhlu5nq37u@gmail.com> From: Quan Xu Message-ID: <35da8c93-95fb-8bf0-8538-4e1ef5f126f4@gmail.com> Date: Tue, 14 Nov 2017 12:05:16 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: <20171113150842.epdffyxhlu5nq37u@gmail.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2017/11/13 23:08, Ingo Molnar wrote: > * Quan Xu wrote: > >> From: Quan Xu >> >> To reduce the cost of poll, we introduce three sysctl to control the >> poll time when running as a virtual machine with paravirt. >> >> Signed-off-by: Yang Zhang >> Signed-off-by: Quan Xu >> --- >> Documentation/sysctl/kernel.txt | 35 +++++++++++++++++++++++++++++++++++ >> arch/x86/kernel/paravirt.c | 4 ++++ >> include/linux/kernel.h | 6 ++++++ >> kernel/sysctl.c | 34 ++++++++++++++++++++++++++++++++++ >> 4 files changed, 79 insertions(+), 0 deletions(-) >> >> diff --git a/Documentation/sysctl/kernel.txt b/Documentation/sysctl/kernel.txt >> index 694968c..30c25fb 100644 >> --- a/Documentation/sysctl/kernel.txt >> +++ b/Documentation/sysctl/kernel.txt >> @@ -714,6 +714,41 @@ kernel tries to allocate a number starting from this one. >> >> ============================================================== >> >> +paravirt_poll_grow: (X86 only) >> + >> +Multiplied value to increase the poll time. This is expected to take >> +effect only when running as a virtual machine with CONFIG_PARAVIRT >> +enabled. This can't bring any benifit on bare mental even with >> +CONFIG_PARAVIRT enabled. >> + >> +By default this value is 2. Possible values to set are in range {2..16}. >> + >> +============================================================== >> + >> +paravirt_poll_shrink: (X86 only) >> + >> +Divided value to reduce the poll time. This is expected to take effect >> +only when running as a virtual machine with CONFIG_PARAVIRT enabled. >> +This can't bring any benifit on bare mental even with CONFIG_PARAVIRT >> +enabled. >> + >> +By default this value is 2. Possible values to set are in range {2..16}. >> + >> +============================================================== >> + >> +paravirt_poll_threshold_ns: (X86 only) >> + >> +Controls the maximum poll time before entering real idle path. This is >> +expected to take effect only when running as a virtual machine with >> +CONFIG_PARAVIRT enabled. This can't bring any benifit on bare mental >> +even with CONFIG_PARAVIRT enabled. >> + >> +By default, this value is 0 means not to poll. Possible values to set >> +are in range {0..500000}. Change the value to non-zero if running >> +latency-bound workloads in a virtual machine. > I absolutely hate it how this hybrid idle loop polling mechanism is not > self-tuning! Ingo, actually it is self-tuning.. > Please make it all work fine by default, and automatically so, instead of adding > three random parameters... .. I will make it all fine by default. howerver cloud environment is of diversity, could I only leave paravirt_poll_threshold_ns parameter (the maximum poll time), which is as similar as "adaptive halt-polling" Wanpeng mentioned.. then user can turn it off, or find an appropriate threshold for some odd scenario.. thanks for your comments!! Quan Alibaba Cloud > And if it cannot be done automatically then we should rather not do it at all. > Maybe the next submitter of a similar feature can think of a better approach. > > Thanks, > > Ingo > From 1583963998118791930@xxx Mon Nov 13 15:09:43 +0000 2017 X-GM-THRID: 1583963998118791930 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread