All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Rafael J. Wysocki" <rjw@rjwysocki.net>
To: Daniel Lezcano <daniel.lezcano@linaro.org>
Cc: Len Brown <lenb@kernel.org>,
	linux-pm@vger.kernel.org, linux-acpi@vger.kernel.org,
	Len Brown <len.brown@intel.com>
Subject: Re: [PATCH 3/3] cpuidle, ACPI: remove unused CPUIDLE_FLAG_TIME_INVALID
Date: Wed, 17 Dec 2014 01:28:01 +0100	[thread overview]
Message-ID: <1590939.ihOXNTxWbF@vostro.rjw.lan> (raw)
In-Reply-To: <549012A9.6070408@linaro.org>

On Tuesday, December 16, 2014 12:08:25 PM Daniel Lezcano wrote:
> On 12/16/2014 07:52 AM, Len Brown wrote:
> > From: Len Brown <len.brown@intel.com>
> >
> > CPUIDLE_FLAG_TIME_INVALID is no longer checked
> > by menu or ladder cpuidle governors, so don't
> > bother setting or defining it.
> >
> > It was originally invented to account for the fact that
> > acpi_safe_halt() enables interrupts to invoke HLT.
> > That would allow interrupt service routines to be included
> > in the last_idle duration measurements made in cpuidle_enter_state(),
> > potentially returning a duration much larger than reality.
> >
> > But menu and ladder can gracefully handle erroneously large duration
> > intervals without checking for CPUIDLE_FLAG_TIME_INVALID.
> > Further, if they don't check CPUIDLE_FLAG_TIME_INVALID, they
> > can also benefit from the instances when the duration interval
> > is not erroneously large.
> >
> > Signed-off-by: Len Brown <len.brown@intel.com>
> > Cc: Daniel Lezcano <daniel.lezcano@linaro.org>
> 
> Acked-by: Daniel Lezcano <daniel.lezcano@linaro.org>

OK

Since the material for my next pull request is staged already, I'm going to
queue up this series for 3.19-rc, but I'll most likely push it for -rc2.

Thanks!

> > ---
> >   drivers/acpi/processor_idle.c | 2 --
> >   include/linux/cpuidle.h       | 3 ---
> >   2 files changed, 5 deletions(-)
> >
> > diff --git a/drivers/acpi/processor_idle.c b/drivers/acpi/processor_idle.c
> > index 4995365..87b704e 100644
> > --- a/drivers/acpi/processor_idle.c
> > +++ b/drivers/acpi/processor_idle.c
> > @@ -985,8 +985,6 @@ static int acpi_processor_setup_cpuidle_states(struct acpi_processor *pr)
> >   		state->flags = 0;
> >   		switch (cx->type) {
> >   			case ACPI_STATE_C1:
> > -			if (cx->entry_method != ACPI_CSTATE_FFH)
> > -				state->flags |= CPUIDLE_FLAG_TIME_INVALID;
> >
> >   			state->enter = acpi_idle_enter_c1;
> >   			state->enter_dead = acpi_idle_play_dead;
> > diff --git a/include/linux/cpuidle.h b/include/linux/cpuidle.h
> > index a07e087..ab70f3b 100644
> > --- a/include/linux/cpuidle.h
> > +++ b/include/linux/cpuidle.h
> > @@ -53,7 +53,6 @@ struct cpuidle_state {
> >   };
> >
> >   /* Idle State Flags */
> > -#define CPUIDLE_FLAG_TIME_INVALID	(0x01) /* is residency time measurable? */
> >   #define CPUIDLE_FLAG_COUPLED	(0x02) /* state applies to multiple cpus */
> >   #define CPUIDLE_FLAG_TIMER_STOP (0x04)  /* timer is stopped on this state */
> >
> > @@ -89,8 +88,6 @@ DECLARE_PER_CPU(struct cpuidle_device, cpuidle_dev);
> >   /**
> >    * cpuidle_get_last_residency - retrieves the last state's residency time
> >    * @dev: the target CPU
> > - *
> > - * NOTE: this value is invalid if CPUIDLE_FLAG_TIME_INVALID is set
> >    */
> >   static inline int cpuidle_get_last_residency(struct cpuidle_device *dev)
> >   {
> >
> 
> 
> 

-- 
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.

  reply	other threads:[~2014-12-17  0:28 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-16  6:52 cpuidle: remove CPUIDLE_FLAG_TIME_INVALID Len Brown
2014-12-16  6:52 ` [PATCH 1/3] cpuidle menu: Better idle duration measurement without using CPUIDLE_FLAG_TIME_INVALID Len Brown
2014-12-16  6:52   ` [PATCH 2/3] cpuidle ladder: " Len Brown
2014-12-16 11:07     ` Daniel Lezcano
2014-12-16  6:52   ` [PATCH 3/3] cpuidle, ACPI: remove unused CPUIDLE_FLAG_TIME_INVALID Len Brown
2014-12-16 11:08     ` Daniel Lezcano
2014-12-17  0:28       ` Rafael J. Wysocki [this message]
2014-12-16 10:57   ` [PATCH 1/3] cpuidle menu: Better idle duration measurement without using CPUIDLE_FLAG_TIME_INVALID Daniel Lezcano
2014-12-16 21:09   ` Tuukka Tikkanen

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=1590939.ihOXNTxWbF@vostro.rjw.lan \
    --to=rjw@rjwysocki.net \
    --cc=daniel.lezcano@linaro.org \
    --cc=len.brown@intel.com \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-pm@vger.kernel.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.