linux-acpi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Rafael J. Wysocki" <rjw@sisk.pl>
To: Daniel Lezcano <daniel.lezcano@linaro.org>
Cc: linux-acpi@vger.kernel.org, linux-pm@lists.linux-foundation.org,
	linaro-dev@lists.linaro.org
Subject: Re: [PATCH 3/4] cpuidle: move enter_dead to the driver structure
Date: Fri, 6 Jul 2012 23:27:18 +0200	[thread overview]
Message-ID: <201207062327.18568.rjw@sisk.pl> (raw)
In-Reply-To: <4FF6C673.7000003@linaro.org>

On Friday, July 06, 2012, Daniel Lezcano wrote:
> On 07/05/2012 10:40 PM, Rafael J. Wysocki wrote:
> > On Thursday, July 05, 2012, Daniel Lezcano wrote:
> >> The 'enter_dead' function is only used for processor_idle.c
> >> and the same function is used several times. We fall into the
> >> same abuse with the multiple callbacks for the same function.
> > 
> > This isn't abuse, mind you.  This is a normal practice.
> 
> Well, that depends :)
> 
> I agree adding a callback per state is nice and flexible

Yes, it is.

> but if it is not used, it is a waste of memory, even if it is 32 bytes.

32 bits, perhaps?  And how many of those are there in the whole system,
actually?  Is this a number that actually matters?

> >> This patch fixes that by moving the 'enter_dead' function to the
> >> driver structure. A flag CPUIDLE_FLAG_DEAD_VALID has been added
> >> to handle the callback conditional invokation.
> > 
> > And how does that improve things?
> 
> In order to check if the play_dead is enabled for a specific state, we
> check if the pointer is set. As it has been moved to a single function,
> we need to add a flag to replace this check. That is not an improvement,

Well, exactly.

> it replace a check by another check.

Sorry, but I don't really see the point.

Thanks,
Rafael

  reply	other threads:[~2012-07-06 21:27 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-05 13:23 [PATCH 1/4] acpi: intel_idle : break dependency between modules Daniel Lezcano
2012-07-05 13:23 ` [PATCH 2/4] cpuidle: define the enter function in the driver structure Daniel Lezcano
2012-07-05 20:38   ` Rafael J. Wysocki
2012-07-06 10:58     ` Daniel Lezcano
2012-07-06 21:23       ` Rafael J. Wysocki
2012-07-10  8:29       ` Rajendra Nayak
2012-07-10 11:39         ` Daniel Lezcano
2012-07-10 12:38           ` Rajendra Nayak
2012-07-05 13:23 ` [PATCH 3/4] cpuidle: move enter_dead to " Daniel Lezcano
2012-07-05 20:40   ` Rafael J. Wysocki
2012-07-06 11:05     ` Daniel Lezcano
2012-07-06 21:27       ` Rafael J. Wysocki [this message]
2012-07-05 13:23 ` [PATCH 4/4] cpuidle : move tlb flag to the cpuidle header Daniel Lezcano
2012-07-05 20:43   ` Rafael J. Wysocki
2012-07-06 11:07     ` Daniel Lezcano
2012-07-06 21:29       ` Rafael J. Wysocki
2012-07-05 20:26 ` [PATCH 1/4] acpi: intel_idle : break dependency between modules 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=201207062327.18568.rjw@sisk.pl \
    --to=rjw@sisk.pl \
    --cc=daniel.lezcano@linaro.org \
    --cc=linaro-dev@lists.linaro.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-pm@lists.linux-foundation.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).