All of lore.kernel.org
 help / color / mirror / Atom feed
From: Trinabh Gupta <trinabh@linux.vnet.ibm.com>
To: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Len Brown <lenb@kernel.org>, Len Brown <len.brown@intel.com>,
	linux-pm@lists.linux-foundation.org,
	linux-kernel@vger.kernel.org
Subject: Re: [linux-pm] [PATCH 16/18] 2.6.40: x86 idle APM: remove deprecated apm_cpu_idle()
Date: Sun, 03 Apr 2011 08:18:56 +0530	[thread overview]
Message-ID: <4D97E018.1090504@linux.vnet.ibm.com> (raw)
In-Reply-To: <20110402220021.74ecdb5b@lxorguk.ukuu.org.uk>



On 04/03/2011 02:30 AM, Alan Cox wrote:
>> This patch series was posted in reply to a table of contents
>>
>> https://lkml.org/lkml/2011/4/2/8
>>
>> "By the end of this series, pm_idle is removed as a public
>>   x86 idle-loop registration mechanism.  A few other things are
>>   cleaned up in the process."
>
> Ok so lets rewind a bit - why do we want to remove pm_idle rather than
> just fix up the way registration occurs. It's just a symbol, one trivial
> interface that is exported and perhaps wants the export method tidying up.
>
>> Trinabh also replied to you, pointing one of the previous
>> LKML discussions about the mis-use of pm_idle.
>
> And there are misuses of just about every kernel symbol - kmalloc for
> example causes some people a lot of trouble !

There are other problems too. This design of pm_idle has been copied
by numerous other architectures. arm/blackfin/cris/ia64/m32r/m68knomm
/microblaze/mn10300/sh/sparc all have pm_idle. This will keep spreading
in future I guess.

>
>> We'll create a new APM cpuidle driver in Linux (Trinabh prototyped one),
>> and at the same time, schedule it for removal in a year.  Personally,
>> I think it is make-work, and in real-life it is more likely to do
>> more harm than removing apm_idle, but I don't want to stand in the
>> way of process.
>
> So you could just leave it alone - that's less work, less disruption and
> doesn't do any harm at all.
>
> As I read this the plan at the moment otherwise is
>
> 	- churn up all the code
> 	- remove PM idle hook
> 	- rewrite the APM code
> 	- replace the APM code
>
> whereas you could just leave the symbol exported or even just a hook to
> make people to do it right using:
>
> 	int register_pm_idle(function);

A patch was posted to do exactly this; see
https://lkml.org/lkml/2010/10/19/449 . The problem  is that it
results in two places of registration: cpuidle subsystem and
this. It was pointed that 99.99% of people run cpuidle and
we should directly call cpuidle and use its registration mechanism
rather than duplicate code.

Thanks,
-Trinabh

  parent reply	other threads:[~2011-04-03  2:49 UTC|newest]

Thread overview: 150+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-24  7:08 [PATCH 0/5] x86 idle cruft removal Len Brown
2011-03-24  7:08 ` [PATCH 1/5] x86 idle: remove "no-hlt" cmdline param Len Brown
2011-03-24  7:08 ` Len Brown
2011-03-24  7:08   ` [PATCH 2/5] x86 idle: remove NOP cpuinfo_x86.hlt_works_ok flag Len Brown
2011-03-24  7:08   ` Len Brown
2011-03-24  7:08   ` [PATCH 3/5] x86 idle: remove NOP halt_works() Len Brown
2011-03-24  7:08   ` Len Brown
2011-03-24  7:08   ` [PATCH 4/5] x86 idle floppy: delete disable_hlt()/enable_hlt() Len Brown
2011-03-24 15:58     ` Andi Kleen
2011-03-24 15:58       ` Andi Kleen
2011-03-24  7:08   ` Len Brown
2011-03-24  7:08   ` [PATCH 5/5] x86 idle: remove NOP hlt_use_halt() Len Brown
2011-03-25 19:02     ` Vaidyanathan Srinivasan
2011-03-25 19:02     ` [linux-pm] " Vaidyanathan Srinivasan
2011-03-24  7:08   ` Len Brown
2011-03-31  6:03 ` [PATCH 0/9] x86 idle cruft removal - v2 Len Brown
2011-03-31  6:03   ` [PATCH 1/9] x86 idle: remove "no-hlt" cmdline param Len Brown
2011-03-31  6:03   ` Len Brown
2011-03-31  6:03     ` [PATCH 2/9] x86 idle: remove NOP cpuinfo_x86.hlt_works_ok flag Len Brown
2011-03-31  6:03     ` Len Brown
2011-03-31  6:12       ` Ingo Molnar
2011-03-31  7:02         ` Len Brown
2011-03-31  7:02         ` Len Brown
2011-03-31  8:18           ` Ingo Molnar
2011-03-31  8:18           ` Ingo Molnar
2011-03-31  9:23             ` Alan Cox
2011-03-31  9:27               ` Ingo Molnar
2011-03-31  9:27               ` Ingo Molnar
2011-03-31  9:33                 ` Alan Cox
2011-03-31  9:33                 ` Alan Cox
2011-03-31  9:35                   ` Ingo Molnar
2011-03-31  9:35                   ` Ingo Molnar
2011-03-31 14:19                     ` H. Peter Anvin
2011-03-31 14:41                       ` Alan Cox
2011-03-31 15:09                         ` H. Peter Anvin
2011-03-31 15:09                         ` H. Peter Anvin
2011-03-31 14:41                       ` Alan Cox
2011-03-31 14:19                     ` H. Peter Anvin
2011-03-31  9:23             ` Alan Cox
2011-03-31 18:07             ` Len Brown
2011-03-31 18:07             ` Len Brown
2011-03-31 18:28               ` H. Peter Anvin
2011-03-31 18:28               ` H. Peter Anvin
2011-03-31  6:12       ` Ingo Molnar
2011-03-31  6:03     ` [PATCH 3/9] x86 idle: remove NOP halt_works() Len Brown
2011-03-31  6:03     ` Len Brown
2011-03-31  6:03     ` [PATCH 4/9] x86 idle floppy: delete disable_hlt()/enable_hlt() Len Brown
2011-03-31  6:03     ` Len Brown
2011-03-31  6:03     ` [PATCH 5/9] x86 idle: remove NOP hlt_use_halt() Len Brown
2011-03-31  6:03     ` Len Brown
2011-03-31  6:03     ` [PATCH 6/9] x86 idle APM: delete apm_cpu_idle(), and its use of (pm_idle)() Len Brown
2011-03-31  6:03     ` Len Brown
2011-03-31  6:03     ` [PATCH 7/9] x86 idle: do not EXPORT_SYMBOL pm_idle and default_idle Len Brown
2011-03-31  6:03     ` Len Brown
2011-03-31  6:03     ` [PATCH 8/9] x86 idle: move mwait_idle_with_hints() to where it is used Len Brown
2011-03-31  6:03     ` Len Brown
2011-03-31  6:03     ` [PATCH 9/9] x86 idle: delete mwait_idle() Len Brown
2011-04-01 11:02       ` Andreas Herrmann
2011-04-01 11:02       ` Andreas Herrmann
2011-03-31  6:03     ` Len Brown
2011-03-31  6:39   ` [PATCH 0/9] x86 idle cruft removal - v2 Trinabh Gupta
2011-03-31  6:39   ` [linux-pm] " Trinabh Gupta
2011-03-31  7:21     ` Len Brown
2011-03-31  7:21     ` [linux-pm] " Len Brown
2011-03-31  9:45   ` Alan Cox
2011-03-31 10:28     ` Ingo Molnar
2011-03-31 10:28     ` Ingo Molnar
2011-03-31  9:45   ` Alan Cox
2011-04-01  4:24   ` Len Brown
2011-04-01  9:38     ` [linux-pm] " Trinabh Gupta
2011-04-01 18:33       ` Len Brown
2011-04-01 18:33       ` Len Brown
2011-04-01  9:38     ` Trinabh Gupta
2011-04-02  6:22     ` idle cleanup - v3 Len Brown
2011-04-02  6:22     ` Len Brown
2011-04-02  6:22       ` [PATCH 01/18] cpuidle: menu: fixed wrapping timers at 4.294 seconds Len Brown
2011-04-02  6:22         ` [PATCH 02/18] x86 idle floppy: deprecate disable_hlt() Len Brown
2011-04-02  6:22           ` Len Brown
2011-04-02  6:22         ` [PATCH 03/18] x86 idle APM: deprecate CONFIG_APM_CPU_IDLE Len Brown
2011-04-02  6:22         ` Len Brown
2011-04-02 11:28           ` Alan Cox
2011-04-02 11:28           ` Alan Cox
2011-04-02 18:28             ` Len Brown
2011-04-02 19:44               ` Alan Cox
2011-04-02 19:44               ` Alan Cox
2011-04-08  6:22               ` Pavel Machek
2011-04-08  6:22               ` Pavel Machek
2011-04-02 18:28             ` Len Brown
2011-04-02  6:22         ` [PATCH 04/18] x86 idle: EXPORT_SYMBOL(default_idle, pm_idle) only when APM demands it Len Brown
2011-04-02 11:28           ` Alan Cox
2011-04-02 12:21             ` [linux-pm] " Trinabh Gupta
2011-04-02 12:21             ` Trinabh Gupta
2011-04-02 11:28           ` Alan Cox
2011-04-02  6:22         ` Len Brown
2011-04-02  6:22         ` [PATCH 05/18] x86 idle: deprecate "no-hlt" cmdline param Len Brown
2011-04-02  6:22         ` Len Brown
2011-04-02  6:22         ` [PATCH 06/18] x86 idle: deprecate mwait_idle() and "idle=mwait" " Len Brown
2011-04-02  6:22         ` Len Brown
2011-04-02  6:22         ` [PATCH 07/18] x86 idle: clarify AMD erratum 400 workaround Len Brown
2011-04-02  6:22         ` Len Brown
2011-04-02  8:23           ` Borislav Petkov
2011-04-02 19:19             ` Len Brown
2011-04-02 19:19             ` Len Brown
2011-04-02 19:22               ` [PATCH 07/18] x86 idle: clarify AMD erratum 400 workaround -v2 Len Brown
2011-04-02 19:22               ` Len Brown
2011-04-03  9:00                 ` Borislav Petkov
2011-04-03  9:00                 ` Borislav Petkov
2011-04-02  8:23           ` [PATCH 07/18] x86 idle: clarify AMD erratum 400 workaround Borislav Petkov
2011-04-02  6:22         ` [PATCH 08/18] cpuidle: create bootparam "cpuidle.off=1" Len Brown
2011-04-02  6:22         ` Len Brown
2011-07-15 11:27           ` Deepthi Dharwar
2011-07-15 11:27           ` [linux-pm] " Deepthi Dharwar
2011-04-02  6:22         ` [PATCH 09/18] cpuidle: replace xen access to x86 pm_idle and default_idle Len Brown
2011-04-02  6:22         ` Len Brown
2011-04-04 15:33           ` [Xen-devel] " Konrad Rzeszutek Wilk
2011-04-04 15:33             ` Konrad Rzeszutek Wilk
2011-04-04 15:33           ` [Xen-devel] " Konrad Rzeszutek Wilk
2011-04-02  6:22         ` [PATCH 10/18] x86 idle: move mwait_idle_with_hints() to where it is used Len Brown
2011-04-02  6:22           ` Len Brown
2011-04-02  6:22         ` [PATCH 11/18] cpuidle: stop using pm_idle Len Brown
2011-04-25 10:41           ` Trinabh Gupta
2011-04-25 10:41           ` [linux-pm] " Trinabh Gupta
2011-04-02  6:22         ` Len Brown
2011-04-02  6:22         ` [PATCH 12/18] 2.6.40: x86 idle: remove deprecated "no-hlt" cmdline param Len Brown
2011-04-02  6:22           ` Len Brown
2011-04-02  6:22         ` [PATCH 13/18] 2.6.40: x86 idle: remove deprecated "hlt_bug: no" in 32-bit /proc/cpuinfo Len Brown
2011-04-02  6:22         ` Len Brown
2011-04-02  6:22         ` [PATCH 14/18] 2.6.40: x86 idle floppy: remove deprecated disable_hlt()/enable_hlt() Len Brown
2011-04-02  6:22           ` Len Brown
2011-04-02  6:22         ` [PATCH 15/18] 2.6.40: x86 idle: remove deprecated hlt_use_halt() Len Brown
2011-04-02  6:22           ` Len Brown
2011-04-02  6:22         ` [PATCH 16/18] 2.6.40: x86 idle APM: remove deprecated apm_cpu_idle() Len Brown
2011-04-02 11:40           ` Alan Cox
2011-04-02 11:40           ` Alan Cox
2011-04-02 19:44             ` Len Brown
2011-04-02 19:44             ` Len Brown
2011-04-02 21:00               ` Alan Cox
2011-04-03  2:48                 ` Trinabh Gupta
2011-04-03  2:48                 ` Trinabh Gupta [this message]
2011-04-04 10:05                   ` [linux-pm] " Alan Cox
2011-04-04 10:05                   ` Alan Cox
2011-04-02 21:00               ` Alan Cox
2011-04-02  6:22         ` Len Brown
2011-04-02  6:22         ` [PATCH 17/18] 2.6.40: x86 idle: do not export default_idle() and (pm_idle)() Len Brown
2011-04-02  6:22         ` Len Brown
2011-04-02  6:23         ` [PATCH 18/18] 2.6.40: x86 idle: remove deprecated mwait_idle() Len Brown
2011-04-02  6:23         ` Len Brown
2011-04-02  6:22       ` [PATCH 01/18] cpuidle: menu: fixed wrapping timers at 4.294 seconds Len Brown
2011-04-01  4:24   ` [PATCH 0/9] x86 idle cruft removal - v2 Len Brown
2011-03-31  6:03 ` Len Brown

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=4D97E018.1090504@linux.vnet.ibm.com \
    --to=trinabh@linux.vnet.ibm.com \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=len.brown@intel.com \
    --cc=lenb@kernel.org \
    --cc=linux-kernel@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 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.