All of lore.kernel.org
 help / color / mirror / Atom feed
From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
To: Jan Beulich <JBeulich@suse.com>
Cc: xen-devel <xen-devel@lists.xenproject.org>
Subject: Re: [PATCH] x86/cpuidle: don't count C1 multiple times
Date: Mon, 24 Nov 2014 11:36:22 -0500	[thread overview]
Message-ID: <20141124163622.GA7449@laptop.dumpdata.com> (raw)
In-Reply-To: <547328E0020000780004A4A1@mail.emea.novell.com>

On Mon, Nov 24, 2014 at 11:47:28AM +0000, Jan Beulich wrote:
> Commit 4ca6f9f0 ("x86/cpuidle: publish new states only after fully
> initializing them") resulted in the state counter to be incremented
> for C1 despite that using a fixed table entry (and the statically
> initialized counter value already accounting for it and C0).
> 

Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Reported-by: Steve Freitas <sflist@ihonk.com>
Release-Acked-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
(thought it would be good to get from Steve an confirmation that this
fixes it - which I believe is 99% the case).

> Signed-off-by: Jan Beulich <jbeulich@suse.com>
> 
> --- a/xen/arch/x86/acpi/cpu_idle.c
> +++ b/xen/arch/x86/acpi/cpu_idle.c
> @@ -1015,7 +1015,7 @@ static void set_cx(
>      cx->target_residency = cx->latency * latency_factor;
>  
>      smp_wmb();
> -    acpi_power->count++;
> +    acpi_power->count += (cx->type != ACPI_STATE_C1);
>      if ( cx->type == ACPI_STATE_C1 || cx->type == ACPI_STATE_C2 )
>          acpi_power->safe_state = cx;
>  }
> 
> 
> 

> x86/cpuidle: don't count C1 multiple times
> 
> Commit 4ca6f9f0 ("x86/cpuidle: publish new states only after fully
> initializing them") resulted in the state counter to be incremented
> for C1 despite that using a fixed table entry (and the statically
> initialized counter value already accounting for it and C0).
> 
> Signed-off-by: Jan Beulich <jbeulich@suse.com>
> 
> --- a/xen/arch/x86/acpi/cpu_idle.c
> +++ b/xen/arch/x86/acpi/cpu_idle.c
> @@ -1015,7 +1015,7 @@ static void set_cx(
>      cx->target_residency = cx->latency * latency_factor;
>  
>      smp_wmb();
> -    acpi_power->count++;
> +    acpi_power->count += (cx->type != ACPI_STATE_C1);
>      if ( cx->type == ACPI_STATE_C1 || cx->type == ACPI_STATE_C2 )
>          acpi_power->safe_state = cx;
>  }

      reply	other threads:[~2014-11-24 16:36 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-24 11:47 [PATCH] x86/cpuidle: don't count C1 multiple times Jan Beulich
2014-11-24 16:36 ` Konrad Rzeszutek Wilk [this message]

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=20141124163622.GA7449@laptop.dumpdata.com \
    --to=konrad.wilk@oracle.com \
    --cc=JBeulich@suse.com \
    --cc=xen-devel@lists.xenproject.org \
    /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.