All of lore.kernel.org
 help / color / mirror / Atom feed
From: Wei Wang <wei.wang2@amd.com>
To: Jan Beulich <JBeulich@suse.com>, Keir Fraser <keir@xen.org>
Cc: yang.z.zhang@intel.com, Andre Przywara <andre.przywara@amd.com>,
	"xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>,
	Wei Huang <wei.huang2@amd.com>,
	"Ostrovsky, Boris" <Boris.Ostrovsky@amd.com>
Subject: [PATCH] acpi: do not flush cache if cx->type != ACPI_STATE_C3
Date: Thu, 12 Apr 2012 15:11:00 +0200	[thread overview]
Message-ID: <4F86D464.4080601@amd.com> (raw)

Hi Jan,
This is a revised fix from my last post[1]. We found that the 
performance issue[2] is actually caused by an unnecessary cache flush 
when fall-through happens. According to acpi spec, c2 has cache 
consistency, we don't need cache flush if cx->type != ACPI_STATE_C3.
This fix improves performance of some OEM systems significantly. I would 
suggest to back port it to 4.1, 4.0 and even 3.4.

Thanks,
We

[1]
http://lists.xen.org/archives/html/xen-devel/2012-04/msg00395.html
[2]
http://forums.citrix.com/thread.jspa?threadID=297461&tstart=0&start=0

# HG changeset patch
# Parent 6efb9f934bfb4c46af375612fb01e65d15518380
# User Wei Wang <wei.wang2@amd.com>
acpi: do not flush cache if cx->type != ACPI_STATE_C3

Signed-off-by: Wei Wang <wei.wang2@amd.com>

diff -r 6efb9f934bfb -r 85775fd04cf4 xen/arch/x86/acpi/cpu_idle.c
--- a/xen/arch/x86/acpi/cpu_idle.c      Thu Apr 05 11:24:26 2012 +0100
+++ b/xen/arch/x86/acpi/cpu_idle.c      Thu Apr 12 14:15:09 2012 +0200
@@ -509,7 +509,8 @@ static void acpi_processor_idle(void)
          else if ( !power->flags.bm_check )
          {
              /* SMP with no shared cache... Invalidate cache  */
-            ACPI_FLUSH_CPU_CACHE();
+            if ( cx->type == ACPI_STATE_C3 )
+                ACPI_FLUSH_CPU_CACHE();
          }

          /* Invoke C3 */

             reply	other threads:[~2012-04-12 13:11 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-12 13:11 Wei Wang [this message]
2012-04-12 17:05 ` [PATCH] acpi: do not flush cache if cx->type != ACPI_STATE_C3 Steven
2012-04-13  7:23   ` Jan Beulich
2012-04-13  2:14 ` Zhang, Yang Z
2012-04-13  8:30   ` Jan Beulich
2012-04-13  9:06     ` Wei Wang
2012-04-13 13:20       ` Zhang, Yang Z

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4F86D464.4080601@amd.com \
    --to=wei.wang2@amd.com \
    --cc=Boris.Ostrovsky@amd.com \
    --cc=JBeulich@suse.com \
    --cc=andre.przywara@amd.com \
    --cc=keir@xen.org \
    --cc=wei.huang2@amd.com \
    --cc=xen-devel@lists.xensource.com \
    --cc=yang.z.zhang@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.