Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp2398764ybl; Thu, 29 Aug 2019 07:41:20 -0700 (PDT) X-Google-Smtp-Source: APXvYqxfRAj+iOFkH3/Cpf8q7hJmK56f+VIiGAMOAOM6GvI2jeo30xbEJrNlfnUw15xDaDCxKd8G X-Received: by 2002:aa7:94a8:: with SMTP id a8mr11805950pfl.75.1567089680629; Thu, 29 Aug 2019 07:41:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567089680; cv=none; d=google.com; s=arc-20160816; b=Eig5hBo0LhuK+9bjTrNfoIv2SGGovDxVgONWBclhFTddu+ZVmhKZzcA/sJGmGtf9UY XpoPHUbKWqrQB2Yxw+A077C0zF17dTG2dX+Lzq8YkYKBHwYEva5b0uPGWdNDnOhPMBP5 m0lmw7fTysPSrjq14h6/MYcrPzWzIiQ0ExUiiWYIOd220AmwE6pBNVNcjljxQt9d1NlY sigMhVO1NAziOMWZp38quBbqqaSxoQc85h7rFUXzSWkiVx4sFhHQzVo4G9VSX25iOvog pjob9EW1hlNE2ihmtDrFwVI7GWKETUoRcQo4t9jFFjbQ6GuSupDaTDdR/ceeU+/0YZ6U N7YA== 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-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=VqCR7KuP9QenedlWZEeTZ+Yr6ahs+6Yc/KgggAsQXAE=; b=PZR7u1rT6Uzeo+g1DD3GGInlEBh+w7ydBtNOyBh4WPKm9gkqyG+Q7uJvq/aE2fB5ed eQlpzqyl1R8t99E91CMoluGP2soU2eczLg1SQj8vjQYNPznYQCoowv/8oqJpjrQpuiJC dKb+ynzi6nbh0cNs5XgdpsmCzxH9k01UzIi9ENn7Fob22dyWM0+H0JYUTmIImjwccjvF I+Ywa0ofbju1IyFEqzvBA9jauN2LTRCUy7Dk3YtfVbzQLtGTh52lGbbZLuHODjAiCUnC A/GVkcDwGoj8UhR87bHaUK3cmczpA67xPBhZ8AC/61ryuXh6gvE0iEEEC4Ps+JMJl+hR VDbg== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x2si2195436pgp.475.2019.08.29.07.41.03; Thu, 29 Aug 2019 07:41:20 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728241AbfH2Ojl (ORCPT + 99 others); Thu, 29 Aug 2019 10:39:41 -0400 Received: from mx1.redhat.com ([209.132.183.28]:52689 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727899AbfH2Ojl (ORCPT ); Thu, 29 Aug 2019 10:39:41 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id B31A820ABB; Thu, 29 Aug 2019 14:39:40 +0000 (UTC) Received: from amt.cnet (ovpn-112-4.gru2.redhat.com [10.97.112.4]) by smtp.corp.redhat.com (Postfix) with ESMTP id 724BB196B2; Thu, 29 Aug 2019 14:39:38 +0000 (UTC) Received: from amt.cnet (localhost [127.0.0.1]) by amt.cnet (Postfix) with ESMTP id 6614A105140; Thu, 29 Aug 2019 11:39:11 -0300 (BRT) Received: (from marcelo@localhost) by amt.cnet (8.14.7/8.14.7/Submit) id x7TEd7P8014097; Thu, 29 Aug 2019 11:39:07 -0300 Date: Thu, 29 Aug 2019 11:39:06 -0300 From: Marcelo Tosatti To: Wanpeng Li Cc: "Rafael J. Wysocki" , Paolo Bonzini , "Rafael J. Wysocki" , LKML , kvm , Radim =?utf-8?B?S3LEjW3DocWZ?= , Linux PM , "Michael S. Tsirkin" Subject: Re: [PATCH] cpuidle-haltpoll: Enable kvm guest polling when dedicated physical CPUs are available Message-ID: <20190829143904.GA13983@amt.cnet> References: <20190826204045.GA24697@amt.cnet> <20190828143916.GA13725@amt.cnet> <20190829120422.GC4949@amt.cnet> <20190829125304.GA12214@amt.cnet> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190829125304.GA12214@amt.cnet> User-Agent: Mutt/1.5.21 (2010-09-15) X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Thu, 29 Aug 2019 14:39:40 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Aug 29, 2019 at 09:53:04AM -0300, Marcelo Tosatti wrote: > On Thu, Aug 29, 2019 at 08:16:41PM +0800, Wanpeng Li wrote: > > > Current situation regarding haltpoll driver is: > > > > > > overcommit group: haltpoll driver is not loaded by default, they are > > > happy. > > > > > > non overcommit group: boots without "realtime hints" flag, loads haltpoll driver, > > > happy. > > > > > > Situation with patch above: > > > > > > overcommit group: haltpoll driver is not loaded by default, they are > > > happy. > > > > > > non overcommit group: boots without "realtime hints" flag, haltpoll driver > > > cannot be loaded. > > > > non overcommit group, if they don't care latency/performance, they > > don't need to enable haltpoll, "realtime hints" etc. Otherwise, they > > should better tune. > > As mentioned before, "being overcommitted" is a property which is transitional. > > A static true/false scheme reflects this poorly. > > Therefore the OS should detect it and act accordingly. Hi Wanpeng Li, One suggestion for a dynamic "is overcommited" scheme: If the amount of stolen time, in the past record_steal_time window, is more than 20% of the time in that window, then mark system as overcommitted. Otherwise, clear it. Make that 20% configurable by as kvm module parameter. Use that info to enable/disable overcommit features. That should work, right?