From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E27C7C2D0E4 for ; Fri, 27 Nov 2020 14:35:01 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9EB7820809 for ; Fri, 27 Nov 2020 14:35:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730796AbgK0OfA (ORCPT ); Fri, 27 Nov 2020 09:35:00 -0500 Received: from outbound-smtp24.blacknight.com ([81.17.249.192]:51740 "EHLO outbound-smtp24.blacknight.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729913AbgK0OfA (ORCPT ); Fri, 27 Nov 2020 09:35:00 -0500 Received: from mail.blacknight.com (pemlinmail04.blacknight.ie [81.17.254.17]) by outbound-smtp24.blacknight.com (Postfix) with ESMTPS id DC6EAC0ACC for ; Fri, 27 Nov 2020 14:34:58 +0000 (GMT) Received: (qmail 18228 invoked from network); 27 Nov 2020 14:34:58 -0000 Received: from unknown (HELO techsingularity.net) (mgorman@techsingularity.net@[84.203.22.4]) by 81.17.254.9 with ESMTPSA (AES256-SHA encrypted, authenticated); 27 Nov 2020 14:34:58 -0000 Date: Fri, 27 Nov 2020 14:34:57 +0000 From: Mel Gorman To: Marcelo Tosatti Cc: "Rafael J. Wysocki" , Daniel Lezcano , Linux Kernel Mailing List , Linux PM Subject: Re: [PATCH] cpuidle: Allow configuration of the polling interval before cpuidle enters a c-state Message-ID: <20201127143457.GP3371@techsingularity.net> References: <20201126171824.GK3371@techsingularity.net> <20201127140811.GA39892@fuller.cnet> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline In-Reply-To: <20201127140811.GA39892@fuller.cnet> User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Nov 27, 2020 at 11:08:11AM -0300, Marcelo Tosatti wrote: > > Well, IMV this is not straightforward at all. > > > > It requires the admin to know how cpuidle works and why this > > particular polling limit is likely to be suitable for the given > > workload. And whether or not the default polling limit should be > > changed at all. > > KVM polling (virt/kvm/kvm_main.c grow_halt_poll_ns/shrink_halt_poll_ns) > tries to adjust the polling window based on poll success/failure. > > The cpuidle haltpoll governor (for KVM guests) uses the same adjustment > logic. > > Perhaps a similar (or improved) scheme can be adapted to baremetal. > > https://www.kernel.org/doc/Documentation/virtual/kvm/halt-polling.txt I'm aware of the haltpoll driver and why it's needed there. Given that it adds cost to the refect callback and increases exit latency that it would be unpopular on bare metal. I'm prototyping a v2 that simply picks different balance point to see if that gets a better reception. -- Mel Gorman SUSE Labs