* [PATCH] x86: fix idle notifier not being called in CONFIG_X86_32
@ 2013-03-04 5:41 Illyas Mansoor
2013-03-06 10:18 ` Ingo Molnar
0 siblings, 1 reply; 6+ messages in thread
From: Illyas Mansoor @ 2013-03-04 5:41 UTC (permalink / raw)
To: Linux Kernel, Linux PM, Frederic Weisbecker, Ingo Molnar
Cc: X86, Len Brown, Thomas Gleixner, Matthew Garrett, Tejun Heo,
Paul E. McKenney, Illyas Mansoor, Rudramuni, Vishwesh M, richard,
josh, Kumar P, Mahesh, Sil, Dyut K
Idle notifier not registered if CONFIG_X86_32 is defined,
those callbacks are empty for X86_32 platform.
ifdef CONFIG_X86_64
void enter_idle(void);
void exit_idle(void);
else
static inline void enter_idle(void) { }
static inline void exit_idle(void) { }
static inline void __exit_idle(void) { }
endif
Make this work on X86_32 platforms by
removing the restriction for X86_64
Signed-off-by: Dyut Kumar Sil <dyut.k.sil@intel.com>
Signed-off-by: Ashish K <ashish.k@intel.com>
Signed-off-by: Illyas Mansoor <illyas.mansoor@intel.com>
Reviewed-by: Cuesta, Fernand <fernand.cuesta@intel.com>
Reviewed-by: Cuesta, Fernand <fernand.cuesta@intel.com>
Reviewed-by: Kumar P, Mahesh <mahesh.kumar.p@intel.com>
Tested-by: Cuesta, Fernand <fernand.cuesta@intel.com>
---
arch/x86/include/asm/idle.h | 6 ------
arch/x86/kernel/process.c | 4 ----
2 files changed, 10 deletions(-)
diff --git a/arch/x86/include/asm/idle.h b/arch/x86/include/asm/idle.h
index c5d1785..489ac46 100644
--- a/arch/x86/include/asm/idle.h
+++ b/arch/x86/include/asm/idle.h
@@ -8,14 +8,8 @@ struct notifier_block;
void idle_notifier_register(struct notifier_block *n);
void idle_notifier_unregister(struct notifier_block *n);
-#ifdef CONFIG_X86_64
void enter_idle(void);
void exit_idle(void);
-#else /* !CONFIG_X86_64 */
-static inline void enter_idle(void) { }
-static inline void exit_idle(void) { }
-static inline void __exit_idle(void) { }
-#endif /* CONFIG_X86_64 */
void amd_e400_remove_cpu(int cpu);
diff --git a/arch/x86/kernel/process.c b/arch/x86/kernel/process.c
index 14ae100..043e553 100644
--- a/arch/x86/kernel/process.c
+++ b/arch/x86/kernel/process.c
@@ -38,7 +38,6 @@
*/
DEFINE_PER_CPU_SHARED_ALIGNED(struct tss_struct, init_tss) = INIT_TSS;
-#ifdef CONFIG_X86_64
static DEFINE_PER_CPU(unsigned char, is_idle);
static ATOMIC_NOTIFIER_HEAD(idle_notifier);
@@ -53,7 +52,6 @@ void idle_notifier_unregister(struct notifier_block *n)
atomic_notifier_chain_unregister(&idle_notifier, n);
}
EXPORT_SYMBOL_GPL(idle_notifier_unregister);
-#endif
struct kmem_cache *task_xstate_cachep;
EXPORT_SYMBOL_GPL(task_xstate_cachep);
@@ -277,7 +275,6 @@ static inline void play_dead(void)
}
#endif
-#ifdef CONFIG_X86_64
void enter_idle(void)
{
this_cpu_write(is_idle, 1);
@@ -299,7 +296,6 @@ void exit_idle(void)
return;
__exit_idle();
}
-#endif
/*
* The idle thread. There's no useful work to be
--
1.7.9.5
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] x86: fix idle notifier not being called in CONFIG_X86_32
2013-03-04 5:41 [PATCH] x86: fix idle notifier not being called in CONFIG_X86_32 Illyas Mansoor
@ 2013-03-06 10:18 ` Ingo Molnar
2013-03-06 10:20 ` Mansoor, Illyas
0 siblings, 1 reply; 6+ messages in thread
From: Ingo Molnar @ 2013-03-06 10:18 UTC (permalink / raw)
To: Illyas Mansoor
Cc: Linux Kernel, Linux PM, Frederic Weisbecker, Ingo Molnar, X86,
Len Brown, Thomas Gleixner, Matthew Garrett, Tejun Heo,
Paul E. McKenney, Rudramuni, Vishwesh M, richard, josh,
Kumar P, Mahesh, Sil, Dyut K
* Illyas Mansoor <illyas.mansoor@intel.com> wrote:
> Idle notifier not registered if CONFIG_X86_32 is defined,
> those callbacks are empty for X86_32 platform.
>
> ifdef CONFIG_X86_64
> void enter_idle(void);
> void exit_idle(void);
> else
> static inline void enter_idle(void) { }
> static inline void exit_idle(void) { }
> static inline void __exit_idle(void) { }
> endif
>
> Make this work on X86_32 platforms by
> removing the restriction for X86_64
What will they be used for?
Thanks,
Ingo
^ permalink raw reply [flat|nested] 6+ messages in thread
* RE: [PATCH] x86: fix idle notifier not being called in CONFIG_X86_32
2013-03-06 10:18 ` Ingo Molnar
@ 2013-03-06 10:20 ` Mansoor, Illyas
2013-03-06 10:36 ` Ingo Molnar
0 siblings, 1 reply; 6+ messages in thread
From: Mansoor, Illyas @ 2013-03-06 10:20 UTC (permalink / raw)
To: Ingo Molnar
Cc: Linux Kernel, Linux PM, Frederic Weisbecker, Ingo Molnar, X86,
Len Brown, Thomas Gleixner, Matthew Garrett, Tejun Heo,
Paul E. McKenney, Rudramuni, Vishwesh M, richard@nod.at,
josh@joshtriplett.org, Kumar P, Mahesh, Sil, Dyut K
[-- Attachment #1: Type: text/plain, Size: 671 bytes --]
> * Illyas Mansoor <illyas.mansoor@intel.com> wrote:
>
> > Idle notifier not registered if CONFIG_X86_32 is defined, those
> > callbacks are empty for X86_32 platform.
> >
> > ifdef CONFIG_X86_64
> > void enter_idle(void);
> > void exit_idle(void);
> > else
> > static inline void enter_idle(void) { } static inline void
> > exit_idle(void) { } static inline void __exit_idle(void) { } endif
> >
> > Make this work on X86_32 platforms by
> > removing the restriction for X86_64
>
> What will they be used for?
It's being used by interactive governor, and since the idle notifications are
not received
It breaks the governor functionality on X86_32
Thanks,
-Illyas
[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 7212 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] x86: fix idle notifier not being called in CONFIG_X86_32
2013-03-06 10:20 ` Mansoor, Illyas
@ 2013-03-06 10:36 ` Ingo Molnar
2013-03-06 10:56 ` Mansoor, Illyas
0 siblings, 1 reply; 6+ messages in thread
From: Ingo Molnar @ 2013-03-06 10:36 UTC (permalink / raw)
To: Mansoor, Illyas, Peter Zijlstra
Cc: Linux Kernel, Linux PM, Frederic Weisbecker, Ingo Molnar, X86,
Len Brown, Thomas Gleixner, Matthew Garrett, Tejun Heo,
Paul E. McKenney, Rudramuni, Vishwesh M, richard@nod.at,
josh@joshtriplett.org, Kumar P, Mahesh, Sil, Dyut K,
Arjan van de Ven
* Mansoor, Illyas <illyas.mansoor@intel.com> wrote:
> > * Illyas Mansoor <illyas.mansoor@intel.com> wrote:
> >
> > > Idle notifier not registered if CONFIG_X86_32 is defined, those
> > > callbacks are empty for X86_32 platform.
> > >
> > > ifdef CONFIG_X86_64
> > > void enter_idle(void);
> > > void exit_idle(void);
> > > else
> > > static inline void enter_idle(void) { } static inline void
> > > exit_idle(void) { } static inline void __exit_idle(void) { } endif
> > >
> > > Make this work on X86_32 platforms by
> > > removing the restriction for X86_64
> >
> > What will they be used for?
>
> It's being used by interactive governor, and since the idle notifications are not
> received It breaks the governor functionality on X86_32
But we never allowed idle notifiers on 32-bit and wanted to phase them out even on
x86-64 as well.
There's ongoing work to improve power saving in the scheduler - see Alex Shi's
patchset on lkml: I think the two pieces of code should cooperate within the
scheduler instead of going in two directions, duplicating effort and getting in each
other's way ...
Thanks,
Ingo
^ permalink raw reply [flat|nested] 6+ messages in thread
* RE: [PATCH] x86: fix idle notifier not being called in CONFIG_X86_32
2013-03-06 10:36 ` Ingo Molnar
@ 2013-03-06 10:56 ` Mansoor, Illyas
2013-03-25 16:48 ` Len Brown
0 siblings, 1 reply; 6+ messages in thread
From: Mansoor, Illyas @ 2013-03-06 10:56 UTC (permalink / raw)
To: Ingo Molnar, Peter Zijlstra
Cc: Linux Kernel, Linux PM, Frederic Weisbecker, Ingo Molnar, X86,
Len Brown, Thomas Gleixner, Matthew Garrett, Tejun Heo,
Paul E. McKenney, Rudramuni, Vishwesh M, richard@nod.at,
josh@joshtriplett.org, Kumar P, Mahesh, Sil, Dyut K,
Arjan van de Ven
[-- Attachment #1: Type: text/plain, Size: 2306 bytes --]
> -----Original Message-----
> From: Ingo Molnar [mailto:mingo.kernel.org@gmail.com] On Behalf Of Ingo
> Molnar
> Sent: Wednesday, March 06, 2013 4:06 PM
> To: Mansoor, Illyas; Peter Zijlstra
> Cc: Linux Kernel; Linux PM; Frederic Weisbecker; Ingo Molnar; X86; Len Brown;
> Thomas Gleixner; Matthew Garrett; Tejun Heo; Paul E. McKenney; Rudramuni,
> Vishwesh M; richard@nod.at; josh@joshtriplett.org; Kumar P, Mahesh; Sil, Dyut
> K; Arjan van de Ven
> Subject: Re: [PATCH] x86: fix idle notifier not being called in CONFIG_X86_32
>
>
> * Mansoor, Illyas <illyas.mansoor@intel.com> wrote:
>
> > > * Illyas Mansoor <illyas.mansoor@intel.com> wrote:
> > >
> > > > Idle notifier not registered if CONFIG_X86_32 is defined, those
> > > > callbacks are empty for X86_32 platform.
> > > >
> > > > ifdef CONFIG_X86_64
> > > > void enter_idle(void);
> > > > void exit_idle(void);
> > > > else
> > > > static inline void enter_idle(void) { } static inline void
> > > > exit_idle(void) { } static inline void __exit_idle(void) { } endif
> > > >
> > > > Make this work on X86_32 platforms by removing the restriction for
> > > > X86_64
> > >
> > > What will they be used for?
> >
> > It's being used by interactive governor, and since the idle
> > notifications are not received It breaks the governor functionality on
> > X86_32
>
> But we never allowed idle notifiers on 32-bit and wanted to phase them out
even
> on
> x86-64 as well.
Support for Idle notifiers on 32-bit got broken from commit
90e240142bd31ff10aeda5a280a53153f4eff004
Before that they were getting registered from process_64.c since it was not
guarded using
CONFIG_X86_64
Commit 90e240142bd31ff10aeda5a280a53153f4eff004 merged x8_64 and x86_32 into
process.c and put
Restriction x86_64 on idle notifier which was correct since the notifier calls
were taken from process_64.c
>
> There's ongoing work to improve power saving in the scheduler - see Alex Shi's
> patchset on lkml: I think the two pieces of code should cooperate within the
> scheduler instead of going in two directions, duplicating effort and getting
in each
> other's way ...
Agree, it should not be conflicting each other.
Is there an alternative to idle notifications once those are deprecated.
Sorry couldn't find that from Alex Shi's patches on LKML
Thanks,
Illyas
[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 7212 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] x86: fix idle notifier not being called in CONFIG_X86_32
2013-03-06 10:56 ` Mansoor, Illyas
@ 2013-03-25 16:48 ` Len Brown
0 siblings, 0 replies; 6+ messages in thread
From: Len Brown @ 2013-03-25 16:48 UTC (permalink / raw)
To: Mansoor, Illyas
Cc: Ingo Molnar, Peter Zijlstra, Linux Kernel, Linux PM,
Frederic Weisbecker, Ingo Molnar, X86, Thomas Gleixner,
Matthew Garrett, Tejun Heo, Paul E. McKenney,
Rudramuni, Vishwesh M, richard@nod.at, josh@joshtriplett.org,
Kumar P, Mahesh, Sil, Dyut K, Arjan van de Ven
I'm okay with this patch since it makes 32-bit and 64-bit consistent,
and technically, it fixes a regression.
If/when we get rid of the notifier, we should do it for both 32-and
64-bit at the same time.
It isn't clear to me that Alex's work will solve this particular
problem, or that there is a code or logical conflict -- though
maybe you are referring to some code I've not read yet.
So for this trivial patch...
Acked-by: Len Brown <len.brown@intel.com>
But I think the bigger problem here is the expectation that out of tree
drivers will not break. The interactive governor is not upstream.
Len Brown, Intel Open Source Technology Center
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2013-03-25 17:18 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-04 5:41 [PATCH] x86: fix idle notifier not being called in CONFIG_X86_32 Illyas Mansoor
2013-03-06 10:18 ` Ingo Molnar
2013-03-06 10:20 ` Mansoor, Illyas
2013-03-06 10:36 ` Ingo Molnar
2013-03-06 10:56 ` Mansoor, Illyas
2013-03-25 16:48 ` Len Brown
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).