Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp5702451ybp; Tue, 15 Oct 2019 03:51:33 -0700 (PDT) X-Google-Smtp-Source: APXvYqyAHgGyKCtrfrBFH3yrSuxoikd2hQCinyPOU14lIF2metb8fb3EqEbTi5SZQd08WEMC3MUF X-Received: by 2002:a17:906:82cf:: with SMTP id a15mr33665089ejy.279.1571136693429; Tue, 15 Oct 2019 03:51:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571136693; cv=none; d=google.com; s=arc-20160816; b=tCxIZGTHXTuCN0WOcT1GbqE981PPPZgj2E6o5pK6lJcXrfKYdvycxIK3X7+qbAVaTz /RVhLWjA7t71hAFi7HnxcDshesZkM+5OaWs3u/b6L7d+agk+J8sq5WukYeJp9tU1omPu zdt5g+E3ra3MYywI5wdm7tTjaNb98koOi+xIi0UupgsM1sSJjmpPYMVUkF0RQIGlPHF8 5BsxjSDeMoYhTtnzS79VxTvVfd/2UkAtu2t4m4ZEO6wNIP1NSNupY4lHcciydW2SiHI9 mZ0dNb22OI9MuhkcjSwDe9JiKDMFuZODCT63AbO5c87JjAKQLm68jMNyVDRWpodoJYNl CDxQ== 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:from:references:cc:to:subject; bh=kKzSXxgTv46WoNaZkfz5S5XDHZlaC5RU0XmUq+j94uE=; b=WRLd0DHAFic8z/satg2rGLD8Y+bXG6YI0FTRclru2zDdjR8xS/1zaGM9FMnCAyK9xf VYGnEFWveSZcjRMU0gLD4AIELPAslVCWgpkhbgWI6YgdmZMzVXRxRP8zVyTdN/e+HfPT laXztC9SDmS63KPSVQPi8KxcuRW1Q4tur+BCWXjCOfbCeExcCnVx0ewEP47LoedZl6Ev SNbG09D5NHbQ93noMHzGP2IUIl6n+c+jre+KG6szUU7lYpXdzsxQB6QVSOoX1nBZX7CX 4Yt/qHPABCD0LawtIWCTSOy5zS3IC8XDluIOaeBa/XX7FKkg1HcCCrlcziw/DmhBje4U qyZw== 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=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a9si4534912edy.136.2019.10.15.03.51.09; Tue, 15 Oct 2019 03:51:33 -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=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728308AbfJOIDP (ORCPT + 99 others); Tue, 15 Oct 2019 04:03:15 -0400 Received: from mga04.intel.com ([192.55.52.120]:45311 "EHLO mga04.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727295AbfJOIDP (ORCPT ); Tue, 15 Oct 2019 04:03:15 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 15 Oct 2019 01:03:14 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.67,298,1566889200"; d="scan'208";a="395453395" Received: from fyin-mobl.ccr.corp.intel.com (HELO [10.239.205.86]) ([10.239.205.86]) by fmsmga005.fm.intel.com with ESMTP; 15 Oct 2019 01:03:13 -0700 Subject: Re: [RESEND] ACPI / processor_idle: use dead loop instead of io port access for wait To: "Rafael J. Wysocki" Cc: Len Brown , "open list:ACPI" , open list References: <20190909073937.31554-1-fengwei.yin@intel.com> <12278756.3dKznOqol2@kreacher> <8a65bf97-c066-8e5e-ba82-75e2a6fd5b45@intel.com> <3727681.FYoUZqeJdN@kreacher> From: "Yin, Fengwei" Message-ID: <187d70f6-3c41-a42f-26f1-9f3317ccb7da@intel.com> Date: Tue, 15 Oct 2019 16:03:13 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 MIME-Version: 1.0 In-Reply-To: <3727681.FYoUZqeJdN@kreacher> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 10/14/2019 5:38 PM, Rafael J. Wysocki wrote: > On Friday, October 11, 2019 3:30:41 PM CEST Yin, Fengwei wrote: >> >> On 10/11/2019 5:05 PM, Rafael J. Wysocki wrote: >>> Sorry for the delay. >> No problem. >> >>> >>> On Monday, September 9, 2019 9:39:37 AM CEST Yin Fengwei wrote: >>>> In function acpi_idle_do_entry(), we do an io port access to guarantee >>>> hardware behavior. But it could trigger unnecessary vmexit for >>>> virtualization environemnt. >>> >>> Is this a theoretical problem, or do you actually see it? >>> >>> If you see it, I'd like to have a pointer to a bug report regarding it >>> or similar. >> We did see this issue when we run linux as guest with ACRN hypervisor >> instead of kvm or xen. In our case, we export all native C states to >> guest and let guest choose which C state it will enter. >> >> And we observed many pm timer port access when guest tried to enter >> deeper C state (Yes, we emulate pm timer so pm timer access will trigger >> vmexit). > > Can you please put this information into the changelog of your patch? I added this information to the patch commit message and sent out v2. Thanks a lot for reviewing and comments. Regards Yin, Fengwei > > It works very well as a rationale for me. :-) > > >