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=-2.5 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_MUTT autolearn=ham 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 C9F87C2BCA1 for ; Fri, 7 Jun 2019 21:39:07 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id A52152083D for ; Fri, 7 Jun 2019 21:39:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731338AbfFGVjG (ORCPT ); Fri, 7 Jun 2019 17:39:06 -0400 Received: from mx1.redhat.com ([209.132.183.28]:53496 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729731AbfFGVjG (ORCPT ); Fri, 7 Jun 2019 17:39:06 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 2ECAD30872DC; Fri, 7 Jun 2019 21:39:06 +0000 (UTC) Received: from amt.cnet (ovpn-112-16.gru2.redhat.com [10.97.112.16]) by smtp.corp.redhat.com (Postfix) with ESMTP id C52CD60D61; Fri, 7 Jun 2019 21:39:05 +0000 (UTC) Received: from amt.cnet (localhost [127.0.0.1]) by amt.cnet (Postfix) with ESMTP id 6A30A105165; Fri, 7 Jun 2019 17:38:35 -0300 (BRT) Received: (from marcelo@localhost) by amt.cnet (8.14.7/8.14.7/Submit) id x57KcVo0023604; Fri, 7 Jun 2019 17:38:31 -0300 Date: Fri, 7 Jun 2019 17:38:31 -0300 From: Marcelo Tosatti To: Andrea Arcangeli Cc: Joao Martins , kvm-devel , Paolo Bonzini , Radim Krcmar , "Rafael J. Wysocki" , Peter Zijlstra , Wanpeng Li , Konrad Rzeszutek Wilk , Raslan KarimAllah , Boris Ostrovsky , Ankur Arora , Christian Borntraeger Subject: Re: [patch v2 3/3] cpuidle-haltpoll: disable host side polling when kvm virtualized Message-ID: <20190607203828.GC5542@amt.cnet> References: <20190603225242.289109849@amt.cnet> <20190603225254.360289262@amt.cnet> <20190604122404.GA18979@amt.cnet> <20190606183632.GA20928@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190606183632.GA20928@redhat.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.47]); Fri, 07 Jun 2019 21:39:06 +0000 (UTC) Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org On Thu, Jun 06, 2019 at 02:36:32PM -0400, Andrea Arcangeli wrote: > Hello, > > On Thu, Jun 06, 2019 at 07:25:28PM +0100, Joao Martins wrote: > > But I wonder whether we should fail to load cpuidle-haltpoll when host halt > > polling can't be disabled[*]? That is to avoid polling in both host and guest > > and *possibly* avoid chances for performance regressions when running on older > > hypervisors? > > I don't think it's necessary: that would force an upgrade of the host > KVM version in order to use the guest haltpoll feature with an > upgraded guest kernel that can use the guest haltpoll. > > The guest haltpoll is self contained in the guest, so there's no > reason to prevent that by design or to force upgrade of the KVM host > version. It'd be more than enough to reload kvm.ko in the host with > the host haltpoll set to zero with the module parameter already > available, to achieve the same runtime without requiring a forced host > upgrade. > > The warning however sounds sensible. Alright, added a warning: void arch_haltpoll_enable(void) { if (!kvm_para_has_feature(KVM_FEATURE_POLL_CONTROL)) { WARN_ONCE(1, "kvm: host does not support poll control, can't " "disable host polling (host upgrade " " recommended).\n" return; } Thanks