All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Lezcano <daniel.lezcano@linaro.org>
To: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Cc: "rjw@rjwysocki.net" <rjw@rjwysocki.net>,
	"preeti@linux.vnet.ibm.com" <preeti@linux.vnet.ibm.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"lenb@kernel.org" <lenb@kernel.org>,
	"nsekhar@ti.com" <nsekhar@ti.com>,
	"khilman@deeprootsystems.com" <khilman@deeprootsystems.com>,
	"shawn.guo@linaro.org" <shawn.guo@linaro.org>,
	"kernel@pengutronix.de" <kernel@pengutronix.de>,
	"tony@atomide.com" <tony@atomide.com>,
	"kgene.kim@samsung.com" <kgene.kim@samsung.com>,
	"horms@verge.net.au" <horms@verge.net.au>,
	"magnus.damm@gmail.com" <magnus.damm@gmail.com>,
	"swarren@wwwdotorg.org" <swarren@wwwdotorg.org>,
	"thierry.reding@gmail.com" <thierry.reding@gmail.com>,
	"ralf@linux-mips.org" <ralf@linux-mips.org>,
	"tglx@linutronix.de" <tglx@linutronix.de>,
	"michal.simek@xilinx.com" <michal.simek@xilinx.com>,
	"linux-pm@vger.kernel.org" <linux-pm@vger.kernel.org>,
	linux-a
Subject: Re: [PATCH] cpuidle: Invert CPUIDLE_FLAG_TIME_VALID logic
Date: Mon, 17 Nov 2014 13:53:15 +0100	[thread overview]
Message-ID: <5469EFBB.6000806@linaro.org> (raw)
In-Reply-To: <20141113145609.GA9726@red-moon>

On 11/13/2014 03:56 PM, Lorenzo Pieralisi wrote:
> On Wed, Nov 12, 2014 at 03:03:50PM +0000, Daniel Lezcano wrote:
>> The only place where the time is invalid is when the ACPI_CSTATE_FFH entry
>> method is not set. Otherwise for all the drivers, the time can be correctly
>> measured.
>>
>> Instead of duplicating the CPUIDLE_FLAG_TIME_VALID flag in all the drivers
>> for all the states, just invert the logic by replacing it by the flag
>> CPUIDLE_FLAG_TIME_INVALID, hence we can set this flag only for the acpi idle
>> driver, remove the former flag from all the drivers and invert the logic with
>> this flag in the different governor.
>>
>> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
>
> Are we sure that ACPI C1 invalid residency time is *still* an issue after
> we moved the residency accounting to the idle core ?

(Cc'ed linux-acpi@)

Hi x86 guys,

any comment on that ?

Thanks in advance

  -- Daniel

> I have a feeling you can remove this flag entirely, but I will let x86
> guys speak for themselves.

[ ... ]

>> diff --git a/drivers/acpi/processor_idle.c b/drivers/acpi/processor_idle.c
>> index 17f9ec5..380b4b4 100644
>> --- a/drivers/acpi/processor_idle.c
>> +++ b/drivers/acpi/processor_idle.c
>> @@ -985,8 +985,8 @@ 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_VALID;
>> +                       if (cx->entry_method != ACPI_CSTATE_FFH)
>> +                               state->flags |= CPUIDLE_FLAG_TIME_INVALID;

[ ... ]


-- 
  <http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog

--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

WARNING: multiple messages have this Message-ID (diff)
From: Daniel Lezcano <daniel.lezcano@linaro.org>
To: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Cc: "rjw@rjwysocki.net" <rjw@rjwysocki.net>,
	"preeti@linux.vnet.ibm.com" <preeti@linux.vnet.ibm.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"lenb@kernel.org" <lenb@kernel.org>,
	"nsekhar@ti.com" <nsekhar@ti.com>,
	"khilman@deeprootsystems.com" <khilman@deeprootsystems.com>,
	"shawn.guo@linaro.org" <shawn.guo@linaro.org>,
	"kernel@pengutronix.de" <kernel@pengutronix.de>,
	"tony@atomide.com" <tony@atomide.com>,
	"kgene.kim@samsung.com" <kgene.kim@samsung.com>,
	"horms@verge.net.au" <horms@verge.net.au>,
	"magnus.damm@gmail.com" <magnus.damm@gmail.com>,
	"swarren@wwwdotorg.org" <swarren@wwwdotorg.org>,
	"thierry.reding@gmail.com" <thierry.reding@gmail.com>,
	"ralf@linux-mips.org" <ralf@linux-mips.org>,
	"tglx@linutronix.de" <tglx@linutronix.de>,
	"michal.simek@xilinx.com" <michal.simek@xilinx.com>,
	"linux-pm@vger.kernel.org" <linux-pm@vger.kernel.org>,
	"linux-acpi@vger.kernel.org" <linux-acpi@vger.kernel.org>
Subject: Re: [PATCH] cpuidle: Invert CPUIDLE_FLAG_TIME_VALID logic
Date: Mon, 17 Nov 2014 13:53:15 +0100	[thread overview]
Message-ID: <5469EFBB.6000806@linaro.org> (raw)
In-Reply-To: <20141113145609.GA9726@red-moon>

On 11/13/2014 03:56 PM, Lorenzo Pieralisi wrote:
> On Wed, Nov 12, 2014 at 03:03:50PM +0000, Daniel Lezcano wrote:
>> The only place where the time is invalid is when the ACPI_CSTATE_FFH entry
>> method is not set. Otherwise for all the drivers, the time can be correctly
>> measured.
>>
>> Instead of duplicating the CPUIDLE_FLAG_TIME_VALID flag in all the drivers
>> for all the states, just invert the logic by replacing it by the flag
>> CPUIDLE_FLAG_TIME_INVALID, hence we can set this flag only for the acpi idle
>> driver, remove the former flag from all the drivers and invert the logic with
>> this flag in the different governor.
>>
>> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
>
> Are we sure that ACPI C1 invalid residency time is *still* an issue after
> we moved the residency accounting to the idle core ?

(Cc'ed linux-acpi@)

Hi x86 guys,

any comment on that ?

Thanks in advance

  -- Daniel

> I have a feeling you can remove this flag entirely, but I will let x86
> guys speak for themselves.

[ ... ]

>> diff --git a/drivers/acpi/processor_idle.c b/drivers/acpi/processor_idle.c
>> index 17f9ec5..380b4b4 100644
>> --- a/drivers/acpi/processor_idle.c
>> +++ b/drivers/acpi/processor_idle.c
>> @@ -985,8 +985,8 @@ 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_VALID;
>> +                       if (cx->entry_method != ACPI_CSTATE_FFH)
>> +                               state->flags |= CPUIDLE_FLAG_TIME_INVALID;

[ ... ]


-- 
  <http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog


  parent reply	other threads:[~2014-11-17 12:53 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-12 15:03 [PATCH] cpuidle: Invert CPUIDLE_FLAG_TIME_VALID logic Daniel Lezcano
2014-11-13 14:56 ` Lorenzo Pieralisi
2014-11-13 15:14   ` Daniel Lezcano
2014-11-17 12:53   ` Daniel Lezcano [this message]
2014-11-17 12:53     ` Daniel Lezcano
2014-11-14 23:57 ` Rafael J. Wysocki

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=5469EFBB.6000806@linaro.org \
    --to=daniel.lezcano@linaro.org \
    --cc=horms@verge.net.au \
    --cc=kernel@pengutronix.de \
    --cc=kgene.kim@samsung.com \
    --cc=khilman@deeprootsystems.com \
    --cc=lenb@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=lorenzo.pieralisi@arm.com \
    --cc=magnus.damm@gmail.com \
    --cc=michal.simek@xilinx.com \
    --cc=nsekhar@ti.com \
    --cc=preeti@linux.vnet.ibm.com \
    --cc=ralf@linux-mips.org \
    --cc=rjw@rjwysocki.net \
    --cc=shawn.guo@linaro.org \
    --cc=swarren@wwwdotorg.org \
    --cc=tglx@linutronix.de \
    --cc=thierry.reding@gmail.com \
    --cc=tony@atomide.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.