From: Balbir Singh <balbir@linux.vnet.ibm.com>
To: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Gautham R Shenoy <ego@in.ibm.com>,
"Pallipadi, Venkatesh" <venkatesh.pallipadi@intel.com>,
linux-kernel@vger.kernel.org, Paul Mackerras <paulus@samba.org>,
arun@linux.vnet.ibm.com, Ingo Molnar <mingo@elte.hu>,
linuxppc-dev@lists.ozlabs.org
Subject: Re: [PATCH 2/4]: CPUIDLE: Introduce architecture independent cpuidle_pm_idle in drivers/cpuidle/cpuidle.c
Date: Fri, 28 Aug 2009 12:29:08 +0530 [thread overview]
Message-ID: <20090828065908.GF4889@balbir.in.ibm.com> (raw)
In-Reply-To: <1251442085.18584.120.camel@twins>
* Peter Zijlstra <a.p.zijlstra@chello.nl> [2009-08-28 08:48:05]:
> On Fri, 2009-08-28 at 11:44 +0530, Arun R Bharadwaj wrote:
> > * Peter Zijlstra <a.p.zijlstra@chello.nl> [2009-08-27 14:53:27]:
> >
> > Hi Peter, Ben,
> >
> > I've put the whole thing in a sort of a block diagram. Hope it
> > explains things more clearly.
> >
> >
> >
> >
> >
> >
> > ----------------
> > | CPUIDLE | (Select idle states like
> > | GOVERNORS | C1, C1e, C6 etc in case
> > | (Menu/Ladder)| x86 & nap, snooze in
> > | | case of POWER - based on
> > ---------------- latency & power req)
> > ^
> > |
> > |
> > |
> > |
> > |
> > ---------- ----------------- -------------
> > | | | | | PSERIES |
> > | ACPI |------------------> | CPUIDLE | <--------------| IDLE |
> > | | | | | |
> > ---------- ----------------- -------------
> >
> > Main idle routine- pm_idle() Main idle routine-
> > ppc_md.power_save()
> >
> > pm_idle = cpuidle_pm_idle; ppc_md.power_save =
> > (start using cpuidle's idle cpuidle_pm_idle();
> > loop, which internally calls
> > governor to select the right
> > state to go into).
> >
> >
> > Relavent code snippet from drivers/cpuidle/cpuidle.c
> > -------------------------------------
> >
> > static void cpuidle_idle_call(void)
> > {
> > ............
> > ............
> >
> > /* Call the menu_select() to select the idle state to enter. */
> > next_state = cpuidle_curr_governor->select(dev);
> >
> > ............
> > ............
> >
> > /*
> > * Enter the idle state previously selected. target_state->enter
> > * would call pseries_cpuidle_loop() which selects nap/snooze
> > * /
> > dev->last_residency = target_state->enter(dev, target_state);
> > }
> >
> > void cpuidle_install_idle_handler(void)
> > {
> > .........
> > .........
> > cpuidle_pm_idle = cpuidle_idle_call;
> > }
>
> All I'm seeing here is a frigging mess.
>
> How on earths can something called: cpuidle_install_idle_handler() have
> a void argument, _WHAT_ handler is it going to install?
>
Peter, I think that is a typo, we need a function pointer like your
snippet of code showed
> So somehow you added to the ACPI mess by now having 3 wild function
> pointers, that's _NOT_ progress.
>
The goal, IIUC is to integrate three modules
1. CPUIdle - for idle CPU management
2. Architecture specific code for idle detection
3. CPUIdle governor
Again, if IIUC
The architecture specific idle code would call an idle loop that would
call into the CPUIdle framework, which inturn would depend on the
governor selected.
Passing void* is a mess, we need function pointer registration
and a framework so that we can query what is registered.
--
Balbir
next prev parent reply other threads:[~2009-08-28 6:59 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-27 11:49 [v3 PATCH 0/4]: CPUIDLE/POWER: Introducing cpuidle infrastructure to POWER Arun R Bharadwaj
2009-08-27 11:51 ` [PATCH 1/4]: CPUIDLE/POWER: Enable cpuidle for pSeries Arun R Bharadwaj
2009-08-27 11:53 ` [PATCH 2/4]: CPUIDLE: Introduce architecture independent cpuidle_pm_idle in drivers/cpuidle/cpuidle.c Arun R Bharadwaj
2009-08-27 12:53 ` Peter Zijlstra
2009-08-27 21:28 ` Benjamin Herrenschmidt
2009-08-28 4:49 ` Arun R Bharadwaj
2009-08-28 6:40 ` Peter Zijlstra
2009-08-28 6:14 ` Arun R Bharadwaj
2009-08-28 6:48 ` Peter Zijlstra
2009-08-28 6:59 ` Balbir Singh [this message]
2009-08-28 7:01 ` Peter Zijlstra
2009-08-28 8:19 ` Vaidyanathan Srinivasan
2009-08-28 6:43 ` Arun R Bharadwaj
2009-08-27 11:55 ` [PATCH 3/4]: ACPI/ARM: Register for cpuidle_pm_idle in drivers/acpi/processor_idle.c and arch/arm/mach-kirkwood/cpuidle.c Arun R Bharadwaj
2009-08-27 11:57 ` [PATCH 4/4]: CPUIDLE/POWER: Implement Pseries Processor Idle module Arun R Bharadwaj
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=20090828065908.GF4889@balbir.in.ibm.com \
--to=balbir@linux.vnet.ibm.com \
--cc=a.p.zijlstra@chello.nl \
--cc=arun@linux.vnet.ibm.com \
--cc=ego@in.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mingo@elte.hu \
--cc=paulus@samba.org \
--cc=venkatesh.pallipadi@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 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).