Message ID | 20200921103741.GC5901@zn.tnic |
---|---|
State | New |
Headers | show |
Series | rcu/tree: Export rcu_idle_{enter,exit} to module | expand |
On Mon, Sep 21, 2020 at 12:37 PM Borislav Petkov <bp@alien8.de> wrote: > > Lemme add whatever get_maintainer spits, to Cc. > > On Mon, Sep 21, 2020 at 11:12:33AM +0200, Sven Joachim wrote: > > On 2020-09-15 12:32 +0200, Peter Zijlstra wrote: > > > > > The C3 BusMaster idle code takes lock in a number of places, some deep > > > inside the ACPI code. Instead of wrapping it all in RCU_NONIDLE, have > > > the driver take over RCU-idle duty and avoid flipping RCU state back > > > and forth a lot. > > > > > > ( by marking 'C3 && bm_check' as RCU_IDLE, we _must_ call enter_bm() for > > > that combination, otherwise we'll loose RCU-idle, this requires > > > shuffling some code around ) > > > > > > Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> > > > > I got modpost errors in 5.9-rc6 after this patch: > > > > ERROR: modpost: "rcu_idle_enter" [drivers/acpi/processor.ko] undefined! > > ERROR: modpost: "rcu_idle_exit" [drivers/acpi/processor.ko] undefined! > > > > Reverting commit 1fecfdbb7acc made them go away. Notably my > > configuration had CONFIG_ACPI_PROCESSOR=m, changing that > > to CONFIG_ACPI_PROCESSOR=y let the build succeed as well. > > I guess this. Running randconfigs on it for a while, to see what else > breaks. > > --- > From: Borislav Petkov <bp@suse.de> > Date: Mon, 21 Sep 2020 12:31:36 +0200 > > Fix this link error: > > ERROR: modpost: "rcu_idle_enter" [drivers/acpi/processor.ko] undefined! > ERROR: modpost: "rcu_idle_exit" [drivers/acpi/processor.ko] undefined! > > when CONFIG_ACPI_PROCESSOR is built as module. PeterZ says that in light > of ARM needing those soon too, they should simply be exported. > > Fixes: 1fecfdbb7acc ("ACPI: processor: Take over RCU-idle for C3-BM idle") > Reported-by: Sven Joachim <svenjoac@gmx.de> > Suggested-by: Peter Zijlstra <peterz@infradead.org> > Signed-off-by: Borislav Petkov <bp@suse.de> Well, I guess I should take this through cpuidle? Any concerns about doing that? Paul? > --- > kernel/rcu/tree.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c > index 8ce77d9ac716..f78ee759af9c 100644 > --- a/kernel/rcu/tree.c > +++ b/kernel/rcu/tree.c > @@ -673,6 +673,7 @@ void rcu_idle_enter(void) > lockdep_assert_irqs_disabled(); > rcu_eqs_enter(false); > } > +EXPORT_SYMBOL_GPL(rcu_idle_enter); > > #ifdef CONFIG_NO_HZ_FULL > /** > @@ -886,6 +887,7 @@ void rcu_idle_exit(void) > rcu_eqs_exit(false); > local_irq_restore(flags); > } > +EXPORT_SYMBOL_GPL(rcu_idle_exit); > > #ifdef CONFIG_NO_HZ_FULL > /** > -- > 2.21.0 > > -- > Regards/Gruss, > Boris. > > https://people.kernel.org/tglx/notes-about-netiquette
On Mon, Sep 21, 2020 at 12:37:41PM +0200, Borislav Petkov wrote: > Lemme add whatever get_maintainer spits, to Cc. > > On Mon, Sep 21, 2020 at 11:12:33AM +0200, Sven Joachim wrote: > > On 2020-09-15 12:32 +0200, Peter Zijlstra wrote: > > > > > The C3 BusMaster idle code takes lock in a number of places, some deep > > > inside the ACPI code. Instead of wrapping it all in RCU_NONIDLE, have > > > the driver take over RCU-idle duty and avoid flipping RCU state back > > > and forth a lot. > > > > > > ( by marking 'C3 && bm_check' as RCU_IDLE, we _must_ call enter_bm() for > > > that combination, otherwise we'll loose RCU-idle, this requires > > > shuffling some code around ) > > > > > > Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> > > > > I got modpost errors in 5.9-rc6 after this patch: > > > > ERROR: modpost: "rcu_idle_enter" [drivers/acpi/processor.ko] undefined! > > ERROR: modpost: "rcu_idle_exit" [drivers/acpi/processor.ko] undefined! > > > > Reverting commit 1fecfdbb7acc made them go away. Notably my > > configuration had CONFIG_ACPI_PROCESSOR=m, changing that > > to CONFIG_ACPI_PROCESSOR=y let the build succeed as well. > > I guess this. Running randconfigs on it for a while, to see what else > breaks. > > --- > From: Borislav Petkov <bp@suse.de> > Date: Mon, 21 Sep 2020 12:31:36 +0200 > > Fix this link error: > > ERROR: modpost: "rcu_idle_enter" [drivers/acpi/processor.ko] undefined! > ERROR: modpost: "rcu_idle_exit" [drivers/acpi/processor.ko] undefined! > > when CONFIG_ACPI_PROCESSOR is built as module. PeterZ says that in light > of ARM needing those soon too, they should simply be exported. > > Fixes: 1fecfdbb7acc ("ACPI: processor: Take over RCU-idle for C3-BM idle") > Reported-by: Sven Joachim <svenjoac@gmx.de> > Suggested-by: Peter Zijlstra <peterz@infradead.org> > Signed-off-by: Borislav Petkov <bp@suse.de> Reviewed-by: Paul E. McKenney <paulmckrcu@kernel.org> > --- > kernel/rcu/tree.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c > index 8ce77d9ac716..f78ee759af9c 100644 > --- a/kernel/rcu/tree.c > +++ b/kernel/rcu/tree.c > @@ -673,6 +673,7 @@ void rcu_idle_enter(void) > lockdep_assert_irqs_disabled(); > rcu_eqs_enter(false); > } > +EXPORT_SYMBOL_GPL(rcu_idle_enter); > > #ifdef CONFIG_NO_HZ_FULL > /** > @@ -886,6 +887,7 @@ void rcu_idle_exit(void) > rcu_eqs_exit(false); > local_irq_restore(flags); > } > +EXPORT_SYMBOL_GPL(rcu_idle_exit); > > #ifdef CONFIG_NO_HZ_FULL > /** > -- > 2.21.0 > > -- > Regards/Gruss, > Boris. > > https://people.kernel.org/tglx/notes-about-netiquette
On Mon, Sep 21, 2020 at 3:32 PM Paul E. McKenney <paulmck@kernel.org> wrote: > > On Mon, Sep 21, 2020 at 12:37:41PM +0200, Borislav Petkov wrote: > > Lemme add whatever get_maintainer spits, to Cc. > > > > On Mon, Sep 21, 2020 at 11:12:33AM +0200, Sven Joachim wrote: > > > On 2020-09-15 12:32 +0200, Peter Zijlstra wrote: > > > > > > > The C3 BusMaster idle code takes lock in a number of places, some deep > > > > inside the ACPI code. Instead of wrapping it all in RCU_NONIDLE, have > > > > the driver take over RCU-idle duty and avoid flipping RCU state back > > > > and forth a lot. > > > > > > > > ( by marking 'C3 && bm_check' as RCU_IDLE, we _must_ call enter_bm() for > > > > that combination, otherwise we'll loose RCU-idle, this requires > > > > shuffling some code around ) > > > > > > > > Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> > > > > > > I got modpost errors in 5.9-rc6 after this patch: > > > > > > ERROR: modpost: "rcu_idle_enter" [drivers/acpi/processor.ko] undefined! > > > ERROR: modpost: "rcu_idle_exit" [drivers/acpi/processor.ko] undefined! > > > > > > Reverting commit 1fecfdbb7acc made them go away. Notably my > > > configuration had CONFIG_ACPI_PROCESSOR=m, changing that > > > to CONFIG_ACPI_PROCESSOR=y let the build succeed as well. > > > > I guess this. Running randconfigs on it for a while, to see what else > > breaks. > > > > --- > > From: Borislav Petkov <bp@suse.de> > > Date: Mon, 21 Sep 2020 12:31:36 +0200 > > > > Fix this link error: > > > > ERROR: modpost: "rcu_idle_enter" [drivers/acpi/processor.ko] undefined! > > ERROR: modpost: "rcu_idle_exit" [drivers/acpi/processor.ko] undefined! > > > > when CONFIG_ACPI_PROCESSOR is built as module. PeterZ says that in light > > of ARM needing those soon too, they should simply be exported. > > > > Fixes: 1fecfdbb7acc ("ACPI: processor: Take over RCU-idle for C3-BM idle") > > Reported-by: Sven Joachim <svenjoac@gmx.de> > > Suggested-by: Peter Zijlstra <peterz@infradead.org> > > Signed-off-by: Borislav Petkov <bp@suse.de> > > Reviewed-by: Paul E. McKenney <paulmckrcu@kernel.org> OK Applied as 5.9-rc7 material, thanks! > > --- > > kernel/rcu/tree.c | 2 ++ > > 1 file changed, 2 insertions(+) > > > > diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c > > index 8ce77d9ac716..f78ee759af9c 100644 > > --- a/kernel/rcu/tree.c > > +++ b/kernel/rcu/tree.c > > @@ -673,6 +673,7 @@ void rcu_idle_enter(void) > > lockdep_assert_irqs_disabled(); > > rcu_eqs_enter(false); > > } > > +EXPORT_SYMBOL_GPL(rcu_idle_enter); > > > > #ifdef CONFIG_NO_HZ_FULL > > /** > > @@ -886,6 +887,7 @@ void rcu_idle_exit(void) > > rcu_eqs_exit(false); > > local_irq_restore(flags); > > } > > +EXPORT_SYMBOL_GPL(rcu_idle_exit); > > > > #ifdef CONFIG_NO_HZ_FULL > > /** > > -- > > 2.21.0 > > > > -- > > Regards/Gruss, > > Boris. > > > > https://people.kernel.org/tglx/notes-about-netiquette
diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c index 8ce77d9ac716..f78ee759af9c 100644 --- a/kernel/rcu/tree.c +++ b/kernel/rcu/tree.c @@ -673,6 +673,7 @@ void rcu_idle_enter(void) lockdep_assert_irqs_disabled(); rcu_eqs_enter(false); } +EXPORT_SYMBOL_GPL(rcu_idle_enter); #ifdef CONFIG_NO_HZ_FULL /** @@ -886,6 +887,7 @@ void rcu_idle_exit(void) rcu_eqs_exit(false); local_irq_restore(flags); } +EXPORT_SYMBOL_GPL(rcu_idle_exit); #ifdef CONFIG_NO_HZ_FULL /**