Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp963546ybh; Wed, 11 Mar 2020 14:31:57 -0700 (PDT) X-Google-Smtp-Source: ADFU+vvCSFf6imyDWBHPS2ibLPFhNYKil9yOt1lNmclJd9X2w3X81N/kmhOsjYCpIBca6N+pD0Y8 X-Received: by 2002:a9d:19c8:: with SMTP id k66mr3676416otk.43.1583962317260; Wed, 11 Mar 2020 14:31:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1583962317; cv=none; d=google.com; s=arc-20160816; b=Z9EKu/RsPGFvOiBjARQttlZRCHjsuVHPTFNAFg7QZES3TqYXNuCfb2BMFZNLBbdw/V GGYV1rbfFoNGTZ3smb0vPxOg02uRy03H+fmXYd+KOqHMR6C4X2uNjpuZDcNyO6e2/FMn vzXxDk/QREtrc+sRq82tsuJ0QpPSWBtaPZq4DM1lyQSyNdgBDr28OgfE/olRs4T7QcUm jbuHFQRPt3xpaS7q9eFLOrvZ8exaLrNrFNVZnfEtswto6VVvuYgXBk/M7IEYslrTd9Vh D1T4T6zKLOyKOGPbtVnreNus5rEzuK7hRNTP9Ql6x+2MzOcHZ/V/9sXV8wQUpSMitEnQ iIUw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:autocrypt:from:references:cc:to:subject; bh=L7qZOm/DtjHnox0g9v7hWA+r/PjVEdNp+rqkXv84Hfg=; b=Baz93tWP1BOtnLxxOJWtnEO0OG4UH8zPLrort7kb/0i2TptOA3WXB/RaQHY/QuORCb ZUCr8r3MmGN5JAPakpslKGzzfTs4H3EQDkflOKXtlnMZbQdlCMGJADU5Qe90AbBib0AL aCCW553PzvYPToi0wa6g0K7sl5ChpOpaj/vgB3EpIyJzo1MiMBFTqd5G3ZlUAcQn5uQz TAZFGnmjGAPslVcWzghHANY5hgbhLfHPaSB8hhKIScJ5dCYG8BF0GNBi435cp3wR3naw 1yC20IEGEL5FM7dRYc+qDLxgfgGDL/JcDbuCl7QU0Q1tEUA4qMX7dWvdiI1lY4eR4iI+ vVbQ== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o1si1656204otk.154.2020.03.11.14.31.44; Wed, 11 Mar 2020 14:31:57 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729462AbgCKVa1 (ORCPT + 99 others); Wed, 11 Mar 2020 17:30:27 -0400 Received: from vps-vb.mhejs.net ([37.28.154.113]:59626 "EHLO vps-vb.mhejs.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726579AbgCKVa0 (ORCPT ); Wed, 11 Mar 2020 17:30:26 -0400 Received: from MUA by vps-vb.mhejs.net with esmtps (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.92.3) (envelope-from ) id 1jC8vm-0006Sy-LA; Wed, 11 Mar 2020 22:30:22 +0100 Subject: Re: [PATCH] cpuidle-haltpoll: allow force loading on hosts without the REALTIME hint To: Marcelo Tosatti Cc: "Rafael J. Wysocki" , Daniel Lezcano , Joao Martins , Boris Ostrovsky , linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, kvm@vger.kernel.org, Konrad Rzeszutek Wilk References: <20200221174331.1480468-1-mail@maciej.szmigiero.name> <75d483b5-8edf-efb1-9642-ca367e2f1423@maciej.szmigiero.name> <2118832.28snYOIflM@kreacher> <20200310135006.GA6397@fuller.cnet> From: "Maciej S. Szmigiero" Autocrypt: addr=mail@maciej.szmigiero.name; prefer-encrypt=mutual; keydata= mQINBFpGusUBEADXUMM2t7y9sHhI79+2QUnDdpauIBjZDukPZArwD+sDlx5P+jxaZ13XjUQc 6oJdk+jpvKiyzlbKqlDtw/Y2Ob24tg1g/zvkHn8AVUwX+ZWWewSZ0vcwp7u/LvA+w2nJbIL1 N0/QUUdmxfkWTHhNqgkNX5hEmYqhwUPozFR0zblfD/6+XFR7VM9yT0fZPLqYLNOmGfqAXlxY m8nWmi+lxkd/PYqQQwOq6GQwxjRFEvSc09m/YPYo9hxh7a6s8hAP88YOf2PD8oBB1r5E7KGb Fv10Qss4CU/3zaiyRTExWwOJnTQdzSbtnM3S8/ZO/sL0FY/b4VLtlZzERAraxHdnPn8GgxYk oPtAqoyf52RkCabL9dsXPWYQjkwG8WEUPScHDy8Uoo6imQujshG23A99iPuXcWc/5ld9mIo/ Ee7kN50MOXwS4vCJSv0cMkVhh77CmGUv5++E/rPcbXPLTPeRVy6SHgdDhIj7elmx2Lgo0cyh uyxyBKSuzPvb61nh5EKAGL7kPqflNw7LJkInzHqKHDNu57rVuCHEx4yxcKNB4pdE2SgyPxs9 9W7Cz0q2Hd7Yu8GOXvMfQfrBiEV4q4PzidUtV6sLqVq0RMK7LEi0RiZpthwxz0IUFwRw2KS/ 9Kgs9LmOXYimodrV0pMxpVqcyTepmDSoWzyXNP2NL1+GuQtaTQARAQABtDBNYWNpZWogUy4g U3ptaWdpZXJvIDxtYWlsQG1hY2llai5zem1pZ2llcm8ubmFtZT6JAlQEEwEIAD4CGwMFCwkI BwIGFQoJCAsCBBYCAwECHgECF4AWIQRyeg1N257Z9gOb7O+Ef143kM4JdwUCXgY+twUJBDYq 8gAKCRCEf143kM4Jd/45D/wJvB7YuXuQvgqB9rG2b6cxMe2hriH9iLnpJlUjgzHwNDWkVF6v ZYJeIhYyUSxHNK/XExDS7Uf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+XxGcqE /7m0j7r4iERxCi3FZTNMLGjxzG2teWesUSbvtlrFMtc3lxwdAiA/kF8FBkesG7acP0saiIJr UcMfU+ZsXGxMSrZ4RRRFESvcgvK95KgnlsyuRouyVFu7tJVbTnW6/65JRFNlEQ6Wsbx/0C90 KWkF9R7DLtcVxno75+pXiXDdy9bq54uQeT+9dr+EdyVL0H3eTzP9js7GrRahuHD6/AxekQwX afDLYnExRXL7acu5a1fUpDKWe/CigtyjJz73Dvs9eV7Wvk69TFV60Ft84UEqNBqSha7s1/m8 tQW4InvfnL9h0LWVvwUZe5HKCPe65amwBOvwkkYd4OfNb0NDVudTMsCYLJ8al57zLelH2hcS wOiVdXBsbePjzLy2exEXUb1bHFjBoHnHX6uszBOzM/Dv1eNWJPZ3r3PRFnQk/D9ohEXVEmUI TLDd7lR06Nr8J4oG1RprRTW1T8xE6lSwbfsp9ApU1QuDZzSI1hdNpDYRVUmQeiXnSjR1YBVb zOyMU+hnnsQZMdTQ2qVFZs4JGCA9/wSOMMsohDbJNX2iGR1S+RFpZY9sipuGBVM7wIVrz4Ac Iw== Message-ID: Date: Wed, 11 Mar 2020 22:30:17 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.5.0 MIME-Version: 1.0 In-Reply-To: <20200310135006.GA6397@fuller.cnet> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Marcelo, On 10.03.2020 14:50, Marcelo Tosatti wrote: > On Wed, Mar 04, 2020 at 11:31:31AM +0100, Rafael J. Wysocki wrote: >> On Friday, February 28, 2020 6:10:18 PM CET Maciej S. Szmigiero wrote: >>> A friendly ping here. >>> >>> Maciej >>> >>> On 21.02.2020 18:43, Maciej S. Szmigiero wrote: >>>> From: "Maciej S. Szmigiero" >>>> >>>> Before commit 1328edca4a14 ("cpuidle-haltpoll: Enable kvm guest polling >>>> when dedicated physical CPUs are available") the cpuidle-haltpoll driver >>>> could also be used in scenarios when the host does not advertise the >>>> KVM_HINTS_REALTIME hint. >>>> >>>> While the behavior introduced by the aforementioned commit makes sense as >>>> the default there are cases where the old behavior is desired, for example, >>>> when other kernel changes triggered by presence by this hint are unwanted, >>>> for some workloads where the latency benefit from polling overweights the >>>> loss from idle CPU capacity that otherwise would be available, or just when >>>> running under older Qemu versions that lack this hint. >>>> >>>> Let's provide a typical "force" module parameter that allows restoring the >>>> old behavior. >>>> >>>> Signed-off-by: Maciej S. Szmigiero >>>> --- >>>> drivers/cpuidle/cpuidle-haltpoll.c | 12 +++++++++++- >>>> 1 file changed, 11 insertions(+), 1 deletion(-) >>>> >>>> diff --git a/drivers/cpuidle/cpuidle-haltpoll.c b/drivers/cpuidle/cpuidle-haltpoll.c >>>> index b0ce9bc78113..07e5b36076bb 100644 >>>> --- a/drivers/cpuidle/cpuidle-haltpoll.c >>>> +++ b/drivers/cpuidle/cpuidle-haltpoll.c >>>> @@ -18,6 +18,11 @@ >>>> #include >>>> #include >>>> >>>> +static bool force __read_mostly; >>>> +module_param(force, bool, 0444); >>>> +MODULE_PARM_DESC(force, >>>> + "Load even if the host does not provide the REALTIME hint"); >> >> Why not to say "Load unconditionally" here? > > Makes sense to me. Can you ack the v2 patch that has all the review comments resolved then? It is available here: https://lore.kernel.org/kvm/20200304113248.1143057-1-mail@maciej.szmigiero.name/ Thanks, Maciej