[tip: core/rcu] rcu: Unconditionally use rcuc threads on PREEMPT_RT

2021-02-15 Thread tip-bot2 for Scott Wood
The following commit has been merged into the core/rcu branch of tip: Commit-ID: 8b9a0ecc7ef5e1ed3afbc926de17399a37128c82 Gitweb: https://git.kernel.org/tip/8b9a0ecc7ef5e1ed3afbc926de17399a37128c82 Author:Scott Wood AuthorDate:Tue, 15 Dec 2020 15:16:46 +01:00 Committer

Re: [PATCH] sched/fair: Don't migrate with src_cpu == dst_cpu

2020-12-07 Thread Scott Wood
On Thu, 2020-12-03 at 09:47 +0100, Peter Zijlstra wrote: > On Thu, Dec 03, 2020 at 12:04:49AM -0600, Scott Wood wrote: > > Besides being a waste of time to try to move tasks to where they already > > are, this avoids triggering the WARN_ON_ONCE(is_migration_disabled(p)) >

Re: [PATCH 1/2] powerpc: Retire e200 core (mpc555x processor)

2020-12-04 Thread Scott Wood
booke.S | 57 +-- > arch/powerpc/kernel/setup_32.c| 2 - > arch/powerpc/kernel/traps.c | 25 -- > arch/powerpc/mm/nohash/fsl_booke.c| 12 ++--- > arch/powerpc/platforms/Kconfig.cputype| 13 ++---- > 13 files changed, 11 insertions(+), 187 deletions(-) Acked-by: Scott Wood -Scott

[PATCH] sched/fair: Don't migrate with src_cpu == dst_cpu

2020-12-02 Thread Scott Wood
Besides being a waste of time to try to move tasks to where they already are, this avoids triggering the WARN_ON_ONCE(is_migration_disabled(p)) in set_task_cpu(). Signed-off-by: Scott Wood --- Patch is against tip/master. Assertion was seen by running rteval on the RT tree. kernel/sched

Re: [PATCH] powerpc: Drop -me200 addition to build flags

2020-11-16 Thread Scott Wood
: kernel test robot > Signed-off-by: Michael Ellerman > --- > > More discussion: > https://lore.kernel.org/lkml/202011131146.g8dplqdd-...@intel.com > --- > arch/powerpc/Makefile | 1 - > 1 file changed, 1 deletion(-) Acked-by: Scott Wood I'd go further and

Re: Error: invalid switch -me200

2020-11-16 Thread Scott Wood
On Fri, 2020-11-13 at 18:50 -0600, Segher Boessenkool wrote: > On Fri, Nov 13, 2020 at 04:37:38PM -0800, Fāng-ruì Sòng wrote: > > On Fri, Nov 13, 2020 at 4:23 PM Segher Boessenkool > > wrote: > > > On Fri, Nov 13, 2020 at 12:14:18PM -0800, Nick Desaulniers wrote: > > > > > > > Error: invalid

[tip: sched/urgent] sched/core: Check cpus_mask, not cpus_ptr in __set_cpus_allowed_ptr(), to fix mask corruption

2020-06-23 Thread tip-bot2 for Scott Wood
The following commit has been merged into the sched/urgent branch of tip: Commit-ID: 16568f1f4fd4decee6935751d5ada1f963e5bd5f Gitweb: https://git.kernel.org/tip/16568f1f4fd4decee6935751d5ada1f963e5bd5f Author:Scott Wood AuthorDate:Wed, 17 Jun 2020 14:17:42 +02:00

[tip: sched/urgent] sched: __set_cpus_allowed_ptr(): Check cpus_mask, not cpus_ptr

2020-06-23 Thread tip-bot2 for Scott Wood
The following commit has been merged into the sched/urgent branch of tip: Commit-ID: a51dde512a93959d1df3a915fa3e3df68b1fc94d Gitweb: https://git.kernel.org/tip/a51dde512a93959d1df3a915fa3e3df68b1fc94d Author:Scott Wood AuthorDate:Wed, 17 Jun 2020 14:17:42 +02:00

Re: [PATCH] sched: __set_cpus_allowed_ptr(): Check cpus_mask, not cpus_ptr

2020-06-17 Thread Scott Wood
On Wed, 2020-06-17 at 15:15 +0100, Valentin Schneider wrote: > On 17/06/20 13:17, Sebastian Andrzej Siewior wrote: > > From: Scott Wood > > > > This function is concerned with the long-term cpu mask, not the > > transitory mask the task might have while migrate disab

Re: [PATCH] powerpc/fsl_booke/32: fix build with CONFIG_RANDOMIZE_BASE

2020-06-15 Thread Scott Wood
owerpc/mm/nohash/kaslr_booke.c | 1 + > 1 file changed, 1 insertion(+) Acked-by: Scott Wood -Scott

Re: [RFC PATCH 1/3] sched/fair: Call newidle_balance() from finish_task_switch()

2020-04-29 Thread Scott Wood
On Wed, 2020-04-29 at 10:27 +0200, Vincent Guittot wrote: > On Tue, 28 Apr 2020 at 07:02, Scott Wood wrote: > > diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c > > index 02f323b85b6d..74c3c5280d6b 100644 > > --- a/kernel/sched/fair.c > > +++ b/kernel/sched/fa

Re: [RFC PATCH 1/3] sched/fair: Call newidle_balance() from finish_task_switch()

2020-04-29 Thread Scott Wood
On Wed, 2020-04-29 at 11:05 +0200, Peter Zijlstra wrote: > On Tue, Apr 28, 2020 at 06:20:32PM -0500, Scott Wood wrote: > > On Wed, 2020-04-29 at 01:02 +0200, Peter Zijlstra wrote: > > > On Tue, Apr 28, 2020 at 05:55:03PM -0500, Scott Wood wrote: > > > > On Wed, 20

Re: [RFC PATCH 1/3] sched/fair: Call newidle_balance() from finish_task_switch()

2020-04-28 Thread Scott Wood
On Wed, 2020-04-29 at 01:02 +0200, Peter Zijlstra wrote: > On Tue, Apr 28, 2020 at 05:55:03PM -0500, Scott Wood wrote: > > On Wed, 2020-04-29 at 00:09 +0200, Peter Zijlstra wrote: > > > Also, if you move it this late, this is entirely the wrong place. If > > > you &g

Re: [RFC PATCH 1/3] sched/fair: Call newidle_balance() from finish_task_switch()

2020-04-28 Thread Scott Wood
On Wed, 2020-04-29 at 00:09 +0200, Peter Zijlstra wrote: > On Tue, Apr 28, 2020 at 10:37:18PM +0100, Valentin Schneider wrote: > > On 28/04/20 06:02, Scott Wood wrote: > > > Thus, newidle_balance() is entered with interrupts enabled, which > > > allows > > > (in

Re: [RFC PATCH 3/3] sched,rt: break out of load balancing if an RT task appears

2020-04-28 Thread Scott Wood
On Tue, 2020-04-28 at 17:33 -0500, Scott Wood wrote: > On Tue, 2020-04-28 at 22:56 +0100, Valentin Schneider wrote: > > On 28/04/20 06:02, Scott Wood wrote: > > > diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c > > > index dfde7f0ce3db..e7437e4e40b4 100644 >

Re: [RFC PATCH 3/3] sched,rt: break out of load balancing if an RT task appears

2020-04-28 Thread Scott Wood
On Tue, 2020-04-28 at 22:56 +0100, Valentin Schneider wrote: > On 28/04/20 06:02, Scott Wood wrote: > > diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c > > index dfde7f0ce3db..e7437e4e40b4 100644 > > --- a/kernel/sched/fair.c > > +++ b/kernel/sched/fair.c > &

Re: [RFC PATCH 1/3] sched/fair: Call newidle_balance() from finish_task_switch()

2020-04-28 Thread Scott Wood
On Tue, 2020-04-28 at 22:37 +0100, Valentin Schneider wrote: > On 28/04/20 06:02, Scott Wood wrote: > > Thus, newidle_balance() is entered with interrupts enabled, which allows > > (in the next patch) enabling interrupts when the lock is dropped. > > > >

Re: [PATCH v7 00/12] implement KASLR for powerpc/fsl_booke/32

2019-10-22 Thread Scott Wood
On Mon, 2019-10-21 at 11:34 +0800, Jason Yan wrote: > > On 2019/10/10 2:46, Scott Wood wrote: > > On Wed, 2019-10-09 at 16:41 +0800, Jason Yan wrote: > > > Hi Scott, > > > > > > On 2019/10/9 15:13, Scott Wood wrote: > > > > On Wed, 2019-10-09

Re: [PATCH RT v2 2/3] sched: Lazy migrate_disable processing

2019-10-18 Thread Scott Wood
On Fri, 2019-10-18 at 14:12 -0400, Waiman Long wrote: > On 10/12/19 2:52 AM, Scott Wood wrote: > > Avoid overhead on the majority of migrate disable/enable sequences by > > only manipulating scheduler data (and grabbing the relevant locks) when > > the task actually sc

[tip: x86/cpu] x86/Kconfig: Enforce limit of 512 CPUs with MAXSMP and no CPUMASK_OFFSTACK

2019-10-17 Thread tip-bot2 for Scott Wood
The following commit has been merged into the x86/cpu branch of tip: Commit-ID: 1edae1ae62589f28d00da186465a003e2a7f9c6c Gitweb: https://git.kernel.org/tip/1edae1ae62589f28d00da186465a003e2a7f9c6c Author:Scott Wood AuthorDate:Sat, 12 Oct 2019 02:00:54 -05:00 Committer

Re: [PATCH RT] kernel/sched: Don't recompute cpumask weight in migrate_enable_update_cpus_allowed()

2019-10-12 Thread Scott Wood
On Fri, 2019-10-11 at 10:09 -0400, Waiman Long wrote: > At each invocation of rt_spin_unlock(), cpumask_weight() is called > via migrate_enable_update_cpus_allowed() to recompute the weight of > cpus_mask which doesn't change that often. > > The following is a sample output of perf-record running

[PATCH] x86/smp: Enforce limit of 512 cpus with MAXSMP and no CPUMASK_OFFSTACK

2019-10-12 Thread Scott Wood
elect CPUMASK_OFFSTACK if !PREEMPT_RT_FULL" in MAXSMP. However, even if we ignore the RT tree, checking for MAXSMP in addition to CPUMASK_OFFSTACK is redundant. Signed-off-by: Scott Wood --- arch/x86/Kconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/x86/Kconfig

[PATCH RT v2 2/3] sched: Lazy migrate_disable processing

2019-10-12 Thread Scott Wood
help with local_bh_disable() (and thus rcutorture) unless something similar is done with the recently added local_lock. Signed-off-by: Scott Wood --- The speedup is smaller than before, due to commit 659252061477862f ("lib/smp_processor_id: Don't use cpumask_equal()") achieving an o

[PATCH RT v2 0/3] migrate disable fixes and performance

2019-10-12 Thread Scott Wood
These are the unapplied patches from v1, minus the sched deadline patch, and with stop_one_cpu_nowait() in place of clobbering current->state. Scott Wood (3): sched: migrate_enable: Use select_fallback_rq() sched: Lazy migrate_disable processing sched: migrate_enable:

[PATCH RT v2 3/3] sched: migrate_enable: Use stop_one_cpu_nowait()

2019-10-12 Thread Scott Wood
us to another cpu). Signed-off-by: Scott Wood --- include/linux/stop_machine.h | 2 ++ kernel/sched/core.c | 22 +- kernel/stop_machine.c| 7 +-- 3 files changed, 20 insertions(+), 11 deletions(-) diff --git a/include/linux/stop_machine.h b/include/li

[PATCH RT v2 1/3] sched: migrate_enable: Use select_fallback_rq()

2019-10-12 Thread Scott Wood
migrate_enable() currently open-codes a variant of select_fallback_rq(). However, it does not have the "No more Mr. Nice Guy" fallback and thus it will pass an invalid CPU to the migration thread if cpus_mask only contains a CPU that is !active. Signed-off-by: Scott Wood --- Thi

Re: [PATCH RT 5/8] sched/deadline: Reclaim cpuset bandwidth in .migrate_task_rq()

2019-10-09 Thread Scott Wood
On Wed, 2019-10-09 at 09:27 +0200, Juri Lelli wrote: > On 09/10/19 01:25, Scott Wood wrote: > > On Tue, 2019-10-01 at 10:52 +0200, Juri Lelli wrote: > > > On 30/09/19 11:24, Scott Wood wrote: > > > > On Mon, 2019-09-30 at 09:12 +0200, Juri Lelli wrote: > > >

Re: [PATCH v7 00/12] implement KASLR for powerpc/fsl_booke/32

2019-10-09 Thread Scott Wood
On Wed, 2019-10-09 at 16:41 +0800, Jason Yan wrote: > Hi Scott, > > On 2019/10/9 15:13, Scott Wood wrote: > > On Wed, 2019-10-09 at 14:10 +0800, Jason Yan wrote: > > > Hi Scott, > > > > > > Would you please take sometime to test this? > > > &g

Re: [PATCH v7 00/12] implement KASLR for powerpc/fsl_booke/32

2019-10-09 Thread Scott Wood
On Wed, 2019-10-09 at 14:10 +0800, Jason Yan wrote: > Hi Scott, > > Would you please take sometime to test this? > > Thank you so much. > > On 2019/9/24 13:52, Jason Yan wrote: > > Hi Scott, > > > > Can you test v7 to see if it works to load a kernel at a non-zero address? > > > > Thanks,

Re: [PATCH RT 5/8] sched/deadline: Reclaim cpuset bandwidth in .migrate_task_rq()

2019-10-09 Thread Scott Wood
On Tue, 2019-10-01 at 10:52 +0200, Juri Lelli wrote: > On 30/09/19 11:24, Scott Wood wrote: > > On Mon, 2019-09-30 at 09:12 +0200, Juri Lelli wrote: > > [...] > > > > Hummm, I was actually more worried about the fact that we call > > > free_old_ &

[PATCH] tick-sched: Update nohz load even if tick already stopped

2019-10-02 Thread Scott Wood
. Calling calc_load_nohz_start() regardless of whether the tick is already stopped addresses the issue when going idle. Tracking load changes when not going idle (e.g. multiple SCHED_FIFO tasks coming and going) is not addressed by this patch. Signed-off-by: Scott Wood --- kernel/time/tick-sched.c | 4

Re: [PATCH RT 5/8] sched/deadline: Reclaim cpuset bandwidth in .migrate_task_rq()

2019-09-30 Thread Scott Wood
On Mon, 2019-09-30 at 09:12 +0200, Juri Lelli wrote: > On 27/09/19 11:40, Scott Wood wrote: > > On Fri, 2019-09-27 at 10:11 +0200, Juri Lelli wrote: > > > Hi Scott, > > > > > > On 27/07/19 00:56, Scott Wood wrote: > > > > With the

Re: [PATCH RT 4/8] sched: migrate disable: Protect cpus_ptr with lock

2019-09-27 Thread Scott Wood
On Fri, 2019-09-27 at 14:19 +0200, Sebastian Andrzej Siewior wrote: > On 2019-09-26 11:52:42 [-0500], Scott Wood wrote: > > Looks good, thanks! > > Thanks, just released. > Moving forward. It would be nice to have some DL-dev feedback on DL > patch. For the remaining onc

Re: [PATCH RT 5/8] sched/deadline: Reclaim cpuset bandwidth in .migrate_task_rq()

2019-09-27 Thread Scott Wood
On Fri, 2019-09-27 at 10:11 +0200, Juri Lelli wrote: > Hi Scott, > > On 27/07/19 00:56, Scott Wood wrote: > > With the changes to migrate disabling, ->set_cpus_allowed() no longer > > gets deferred until migrate_enable(). To avoid releasing the bandwidth > > while t

Re: [PATCH RT 4/8] sched: migrate disable: Protect cpus_ptr with lock

2019-09-26 Thread Scott Wood
On Thu, 2019-09-26 at 18:39 +0200, Sebastian Andrzej Siewior wrote: > On 2019-07-27 00:56:34 [-0500], Scott Wood wrote: > > Various places assume that cpus_ptr is protected by rq/pi locks, > > so don't change it before grabbing those locks. > > > > Signed-off-by: Sco

Re: [PATCH RT 7/8] sched: migrate_enable: Use select_fallback_rq()

2019-09-24 Thread Scott Wood
On Tue, 2019-09-17 at 18:00 +0200, Sebastian Andrzej Siewior wrote: > On 2019-07-27 00:56:37 [-0500], Scott Wood wrote: > > migrate_enable() currently open-codes a variant of select_fallback_rq(). > > However, it does not have the "No more Mr. Nice Guy" fallback

Re: [PATCH RT v3 3/5] sched: migrate_dis/enable: Use rt_invol_sleep

2019-09-24 Thread Scott Wood
On Tue, 2019-09-24 at 18:05 +0200, Sebastian Andrzej Siewior wrote: > On 2019-09-24 10:47:36 [-0500], Scott Wood wrote: > > When the stop machine finishes it will do a wake_up_process() via > > complete(). Since this does not pass WF_LOCK_SLEEPER, saved_state will > > be &g

Re: [PATCH RT v3 3/5] sched: migrate_dis/enable: Use rt_invol_sleep

2019-09-24 Thread Scott Wood
On Tue, 2019-09-24 at 17:25 +0200, Sebastian Andrzej Siewior wrote: > On 2019-09-24 08:53:43 [-0500], Scott Wood wrote: > > As I pointed out in the "[PATCH RT 6/8] sched: migrate_enable: Set state > > to > > TASK_RUNNING" discussion, we can get here inside

Re: [PATCH RT v3 3/5] sched: migrate_dis/enable: Use rt_invol_sleep

2019-09-24 Thread Scott Wood
On Tue, 2019-09-24 at 13:21 +0200, Sebastian Andrzej Siewior wrote: > On 2019-09-23 19:52:33 [+0200], To Scott Wood wrote: > > I made dis: > > diff --git a/kernel/cpu.c b/kernel/cpu.c > index 885a195dfbe02..25afa2bb1a2cf 100644 > --- a/kernel/cpu.c > +++ b/kernel/cpu.c &g

Re: [PATCH RT v3 3/5] sched: migrate_dis/enable: Use rt_invol_sleep

2019-09-23 Thread Scott Wood
On Tue, 2019-09-17 at 09:06 -0500, Scott Wood wrote: > On Tue, 2019-09-17 at 09:59 +0200, Sebastian Andrzej Siewior wrote: > > On 2019-09-11 17:57:27 [+0100], Scott Wood wrote: > > > diff --git a/kernel/cpu.c b/kernel/cpu.c > > > index 885a195dfbe0..32c6175b63b6 1006

Re: [PATCH RT 6/8] sched: migrate_enable: Set state to TASK_RUNNING

2019-09-17 Thread Scott Wood
On Tue, 2019-09-17 at 17:31 +0200, Sebastian Andrzej Siewior wrote: > On 2019-07-27 00:56:36 [-0500], Scott Wood wrote: > > If migrate_enable() is called while a task is preparing to sleep > > (state != TASK_RUNNING), that triggers a debug check in stop_one_cpu(). > > E

Re: [PATCH RT 8/8] sched: Lazy migrate_disable processing

2019-09-17 Thread Scott Wood
On Tue, 2019-09-17 at 18:50 +0200, Sebastian Andrzej Siewior wrote: > On 2019-07-27 00:56:38 [-0500], Scott Wood wrote: > > diff --git a/kernel/cpu.c b/kernel/cpu.c > > index 885a195dfbe0..0096acf1a692 100644 > > --- a/kernel/cpu.c > > +++ b/kernel/cpu.c > >

Re: [PATCH RT v3 5/5] rcutorture: Avoid problematic critical section nesting on RT

2019-09-17 Thread Scott Wood
On Tue, 2019-09-17 at 16:50 +0200, Sebastian Andrzej Siewior wrote: > On 2019-09-17 09:36:22 [-0500], Scott Wood wrote: > > > On non-RT you can (but should not) use the counter part of the > > > function > > > in random order like: > > > local_

Re: [PATCH RT v3 1/5] rcu: Acquire RCU lock when disabling BHs

2019-09-17 Thread Scott Wood
On Tue, 2019-09-17 at 16:42 +0200, Sebastian Andrzej Siewior wrote: > On 2019-09-17 09:06:28 [-0500], Scott Wood wrote: > > Sorry, I missed that you were asking about rcu_read_lock_bh() as > > well. I > > did remove the change to rcu_read_lock_bh_held(). > > Sor

Re: [PATCH RT 2/8] sched: __set_cpus_allowed_ptr: Check cpus_mask, not cpus_ptr

2019-09-17 Thread Scott Wood
On Tue, 2019-09-17 at 16:57 +0200, Sebastian Andrzej Siewior wrote: > On 2019-07-27 00:56:32 [-0500], Scott Wood wrote: > > This function is concerned with the long-term cpu mask, not the > > transitory mask the task might have while migrate disabled. Before > > this patch,

Re: [PATCH RT v3 5/5] rcutorture: Avoid problematic critical section nesting on RT

2019-09-17 Thread Scott Wood
On Tue, 2019-09-17 at 12:07 +0200, Sebastian Andrzej Siewior wrote: > On 2019-09-16 11:55:57 [-0500], Scott Wood wrote: > > On Thu, 2019-09-12 at 18:17 -0400, Joel Fernandes wrote: > > > On Wed, Sep 11, 2019 at 05:57:29PM +0100, Scott Wood wrote: > > > > rcutortu

Re: [PATCH RT v3 4/5] rcu: Disable use_softirq on PREEMPT_RT

2019-09-17 Thread Scott Wood
On Wed, 2019-09-11 at 17:57 +0100, Scott Wood wrote: > kernel/rcu/tree.c | 9 +++-- > 1 file changed, 7 insertions(+), 2 deletions(-) > > diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c > index fc8b00c61b32..ee0a5ec2c30f 100644 > --- a/kernel/rcu/tree.c > ++

Re: [PATCH RT v3 1/5] rcu: Acquire RCU lock when disabling BHs

2019-09-17 Thread Scott Wood
On Tue, 2019-09-17 at 09:44 +0200, Sebastian Andrzej Siewior wrote: > On 2019-09-11 17:57:25 [+0100], Scott Wood wrote: > > > > @@ -615,10 +645,7 @@ static inline void rcu_read_unlock(void) > > static inline void rcu_read_lock_bh(void) > > { > > local_bh_di

Re: [PATCH RT v3 3/5] sched: migrate_dis/enable: Use rt_invol_sleep

2019-09-17 Thread Scott Wood
On Tue, 2019-09-17 at 09:59 +0200, Sebastian Andrzej Siewior wrote: > On 2019-09-11 17:57:27 [+0100], Scott Wood wrote: > > diff --git a/kernel/cpu.c b/kernel/cpu.c > > index 885a195dfbe0..32c6175b63b6 100644 > > --- a/kernel/cpu.c > > +++ b/kernel/cpu.c &

Re: [PATCH v3 2/2] powerpc/83xx: map IMMR with a BAT.

2019-09-16 Thread Scott Wood
fix_to_virt() > --- > arch/powerpc/include/asm/fixmap.h | 8 > arch/powerpc/platforms/83xx/misc.c | 11 +++ > 2 files changed, 19 insertions(+) Acked-by: Scott Wood -Scott

Re: [PATCH RT v3 5/5] rcutorture: Avoid problematic critical section nesting on RT

2019-09-16 Thread Scott Wood
On Thu, 2019-09-12 at 18:17 -0400, Joel Fernandes wrote: > On Wed, Sep 11, 2019 at 05:57:29PM +0100, Scott Wood wrote: > > rcutorture was generating some nesting scenarios that are not > > reasonable. Constrain the state selection to avoid them. > > > > Example #1:

Re: [PATCH v2 2/2] powerpc/83xx: map IMMR with a BAT.

2019-09-16 Thread Scott Wood
On Mon, 2019-09-16 at 06:42 +, Christophe Leroy wrote: > @@ -145,6 +147,15 @@ void __init mpc83xx_setup_arch(void) > if (ppc_md.progress) > ppc_md.progress("mpc83xx_setup_arch()", 0); > > + if (!__map_without_bats) { > + phys_addr_t immrbase =

Re: [PATCH 2/2] powerpc/83xx: map IMMR with a BAT.

2019-09-15 Thread Scott Wood
On Sat, 2019-09-14 at 18:51 +0200, Christophe Leroy wrote: > > Le 14/09/2019 à 16:34, Scott Wood a écrit : > > On Fri, 2019-08-23 at 12:50 +, Christophe Leroy wrote: > > > On mpc83xx with a QE, IMMR is 2Mbytes. > > > On mpc83xx without a QE, IMMR is 1Mbytes. >

Re: [PATCH 2/2] powerpc/83xx: map IMMR with a BAT.

2019-09-14 Thread Scott Wood
On Fri, 2019-08-23 at 12:50 +, Christophe Leroy wrote: > On mpc83xx with a QE, IMMR is 2Mbytes. > On mpc83xx without a QE, IMMR is 1Mbytes. > Each driver will map a part of it to access the registers it needs. > Some driver will map the same part of IMMR as other drivers. > > In order to

Re: [PATCH v6 00/12] implement KASLR for powerpc/fsl_booke/32

2019-09-14 Thread Scott Wood
On Tue, 2019-09-10 at 13:34 +0800, Jason Yan wrote: > Hi Scott, > > On 2019/8/28 12:05, Scott Wood wrote: > > On Fri, 2019-08-09 at 18:07 +0800, Jason Yan wrote: > > > This series implements KASLR for powerpc/fsl_booke/32, as a security > > > feature tha

[PATCH RT v3 5/5] rcutorture: Avoid problematic critical section nesting on RT

2019-09-11 Thread Scott Wood
kernels, until debug checks are added to ensure that they are not happening elsewhere. Signed-off-by: Scott Wood --- v3: Limit to RT kernels, and remove one constraint that, while it is bad on both RT and non-RT (missing a schedule), does not oops or otherwise prevent using rcutorture. It wolud

[PATCH RT v3 4/5] rcu: Disable use_softirq on PREEMPT_RT

2019-09-11 Thread Scott Wood
cutorture] [ 137.287920] 039: kthread+0x106/0x140 [ 137.291591] 039: ? rcu_torture_one_read+0x450/0x450 [rcutorture] [ 137.297681] 039: ? kthread_bind+0x10/0x10 [ 137.301783] 039: ret_from_fork+0x3a/0x50 Signed-off-by: Scott Wood --- The prohibition on use_softirq should be able to

[PATCH RT v3 3/5] sched: migrate_dis/enable: Use rt_invol_sleep

2019-09-11 Thread Scott Wood
-off-by: Scott Wood --- v3: Add to pin_current_cpu as well include/linux/sched.h| 4 ++-- kernel/cpu.c | 2 ++ kernel/rcu/tree_plugin.h | 2 +- kernel/sched/core.c | 4 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/include/linux/sched.h b/include/linux

[PATCH RT v3 0/5] RCU fixes

2019-09-11 Thread Scott Wood
With these patches, rcutorture works on PREEMPT_RT_FULL. Scott Wood (5): rcu: Acquire RCU lock when disabling BHs sched: Rename sleeping_lock to rt_invol_sleep sched: migrate_dis/enable: Use rt_invol_sleep rcu: Disable use_softirq on PREEMPT_RT rcutorture: Avoid problematic critical

[PATCH RT v3 2/5] sched: Rename sleeping_lock to rt_invol_sleep

2019-09-11 Thread Scott Wood
It's already used for one situation other than acquiring a lock, and the next patch will add another, so change the name to avoid confusion. Signed-off-by: Scott Wood --- include/linux/sched.h | 15 --- kernel/locking/rtmutex.c | 14 +++--- kernel/locking/rwlock-rt.c

[PATCH RT v3 1/5] rcu: Acquire RCU lock when disabling BHs

2019-09-11 Thread Scott Wood
(), that wouldn't allow blocked BH disablers to be boosted. Fix this by calling rcu_read_lock() from local_bh_disable(), and update rcu_read_lock_bh_held() accordingly. Signed-off-by: Scott Wood --- v3: Remove change to rcu_read_lock_bh_held(), and move debug portions of rcu_read_[un]lock_bh() to separate

Re: [PATCH v6 06/12] powerpc/fsl_booke/32: implement KASLR infrastructure

2019-08-28 Thread Scott Wood
On Wed, 2019-08-28 at 19:03 +0800, Jason Yan wrote: > > On 2019/8/28 12:54, Scott Wood wrote: > > On Fri, Aug 09, 2019 at 06:07:54PM +0800, Jason Yan wrote: > > > +/* > > > + * To see if we need to relocate the kernel to a random offset > > > + * vo

Re: [PATCH v6 00/12] implement KASLR for powerpc/fsl_booke/32

2019-08-27 Thread Scott Wood
On Tue, 2019-08-27 at 11:33 +1000, Michael Ellerman wrote: > Jason Yan writes: > > A polite ping :) > > > > What else should I do now? > > That's a good question. > > Scott, are you still maintaining FSL bits, Sort of... now that it's become very low volume, it's easy to forget when

Re: [PATCH v6 00/12] implement KASLR for powerpc/fsl_booke/32

2019-08-27 Thread Scott Wood
On Tue, 2019-08-27 at 23:05 -0500, Scott Wood wrote: > On Fri, 2019-08-09 at 18:07 +0800, Jason Yan wrote: > > Freescale Book-E > > parts expect lowmem to be mapped by fixed TLB entries(TLB1). The TLB1 > > entries are not suitable to map the kernel directly in a randomized &g

Re: [PATCH v6 06/12] powerpc/fsl_booke/32: implement KASLR infrastructure

2019-08-27 Thread Scott Wood
On Fri, Aug 09, 2019 at 06:07:54PM +0800, Jason Yan wrote: > This patch add support to boot kernel from places other than KERNELBASE. > Since CONFIG_RELOCATABLE has already supported, what we need to do is > map or copy kernel to a proper place and relocate. Freescale Book-E > parts expect lowmem

Re: [PATCH v6 00/12] implement KASLR for powerpc/fsl_booke/32

2019-08-27 Thread Scott Wood
On Fri, 2019-08-09 at 18:07 +0800, Jason Yan wrote: > This series implements KASLR for powerpc/fsl_booke/32, as a security > feature that deters exploit attempts relying on knowledge of the location > of kernel internals. > > Since CONFIG_RELOCATABLE has already supported, what we need to do is >

Re: [PATCH v6 04/12] powerpc/fsl_booke/32: introduce create_tlb_entry() helper

2019-08-27 Thread Scott Wood
On Fri, Aug 09, 2019 at 06:07:52PM +0800, Jason Yan wrote: > Add a new helper create_tlb_entry() to create a tlb entry by the virtual > and physical address. This is a preparation to support boot kernel at a > randomized address. > > Signed-off-by: Jason Yan > Cc: Diana Craciun > Cc: Michael

Re: [PATCH RT v2 1/3] rcu: Acquire RCU lock when disabling BHs

2019-08-26 Thread Scott Wood
On Mon, 2019-08-26 at 17:59 +0200, Sebastian Andrzej Siewior wrote: > On 2019-08-23 14:46:39 [-0500], Scott Wood wrote: > > > > Before consolidation, RT mapped rcu_read_lock_bh_held() to > > > > rcu_read_lock_bh() and called rcu_read_lock() from > > > > rc

Re: [PATCH RT v2 2/3] sched: migrate_enable: Use sleeping_lock to indicate involuntary sleep

2019-08-26 Thread Scott Wood
On Mon, 2019-08-26 at 09:29 -0700, Paul E. McKenney wrote: > On Mon, Aug 26, 2019 at 05:25:23PM +0200, Sebastian Andrzej Siewior wrote: > > On 2019-08-23 23:10:14 [-0400], Joel Fernandes wrote: > > > On Fri, Aug 23, 2019 at 02:28:46PM -0500, Scott Wood wrote: > > > &g

Re: [PATCH RT v2 1/3] rcu: Acquire RCU lock when disabling BHs

2019-08-23 Thread Scott Wood
On Fri, 2019-08-23 at 18:17 +0200, Sebastian Andrzej Siewior wrote: > On 2019-08-22 22:23:23 [-0500], Scott Wood wrote: > > On Thu, 2019-08-22 at 09:39 -0400, Joel Fernandes wrote: > > > On Wed, Aug 21, 2019 at 04:33:58PM -0700, Paul E. McKenney wrote: > > > > On W

Re: [PATCH RT v2 2/3] sched: migrate_enable: Use sleeping_lock to indicate involuntary sleep

2019-08-23 Thread Scott Wood
On Fri, 2019-08-23 at 18:20 +0200, Sebastian Andrzej Siewior wrote: > On 2019-08-21 18:19:05 [-0500], Scott Wood wrote: > > Without this, rcu_note_context_switch() will complain if an RCU read > > lock is held when migrate_enable() calls stop_one_cpu(). > > > >

Re: [PATCH RT v2 1/3] rcu: Acquire RCU lock when disabling BHs

2019-08-22 Thread Scott Wood
On Thu, 2019-08-22 at 09:39 -0400, Joel Fernandes wrote: > On Wed, Aug 21, 2019 at 04:33:58PM -0700, Paul E. McKenney wrote: > > On Wed, Aug 21, 2019 at 06:19:04PM -0500, Scott Wood wrote: > > > Signed-off-by: Scott Wood > > > --- > > > Another question is wh

Re: [PATCH RT v2 1/3] rcu: Acquire RCU lock when disabling BHs

2019-08-22 Thread Scott Wood
On Wed, 2019-08-21 at 16:33 -0700, Paul E. McKenney wrote: > On Wed, Aug 21, 2019 at 06:19:04PM -0500, Scott Wood wrote: > > diff --git a/include/linux/rcupdate.h b/include/linux/rcupdate.h > > index 388ace315f32..d6e357378732 100644 > > --- a/include/linux/rcupdate.h &g

Re: [PATCH RT v2 2/3] sched: migrate_enable: Use sleeping_lock to indicate involuntary sleep

2019-08-22 Thread Scott Wood
On Wed, 2019-08-21 at 16:35 -0700, Paul E. McKenney wrote: > On Wed, Aug 21, 2019 at 06:19:05PM -0500, Scott Wood wrote: > > Without this, rcu_note_context_switch() will complain if an RCU read > > lock is held when migrate_enable() calls stop_one_cpu(). > > > > Signed

Re: [PATCH RT v2 3/3] rcu: Disable use_softirq on PREEMPT_RT

2019-08-22 Thread Scott Wood
On Thu, 2019-08-22 at 09:59 -0400, Joel Fernandes wrote: > On Wed, Aug 21, 2019 at 06:19:06PM -0500, Scott Wood wrote: > > I think the prohibition on use_softirq can be dropped once RT gets the > > latest RCU code, but the question of what use_softirq should default > > to

[PATCH RT v2 1/3] rcu: Acquire RCU lock when disabling BHs

2019-08-21 Thread Scott Wood
(), that wouldn't allow blocked BH disablers to be boosted. Fix this by calling rcu_read_lock() from local_bh_disable(), and update rcu_read_lock_bh_held() accordingly. Signed-off-by: Scott Wood --- Another question is whether non-raw spinlocks are intended to create an RCU read-side critical section due

[PATCH RT v2 3/3] rcu: Disable use_softirq on PREEMPT_RT

2019-08-21 Thread Scott Wood
cutorture] [ 137.287920] 039: kthread+0x106/0x140 [ 137.291591] 039: ? rcu_torture_one_read+0x450/0x450 [rcutorture] [ 137.297681] 039: ? kthread_bind+0x10/0x10 [ 137.301783] 039: ret_from_fork+0x3a/0x50 Signed-off-by: Scott Wood --- I think the prohibition on use_softirq can be dropped onc

[PATCH RT v2 0/3] RCU fixes

2019-08-21 Thread Scott Wood
te disable patchset is applied since it removes a restriction. Scott Wood (3): rcu: Acquire RCU lock when disabling BHs sched: migrate_enable: Use sleeping_lock to indicate involuntary sleep rcu: Disable use_softirq on PREEMPT_RT include/linux/rcupdate.h | 4 include/linux/sched

[PATCH RT v2 2/3] sched: migrate_enable: Use sleeping_lock to indicate involuntary sleep

2019-08-21 Thread Scott Wood
Without this, rcu_note_context_switch() will complain if an RCU read lock is held when migrate_enable() calls stop_one_cpu(). Signed-off-by: Scott Wood --- v2: Added comment. If my migrate disable changes aren't taken, then pin_current_cpu() will also need to use sleeping_lock_inc() because

Re: [RFC v2] rcu/tree: Try to invoke_rcu_core() if in_irq() during unlock

2019-08-19 Thread Scott Wood
On Sun, 2019-08-18 at 17:49 -0400, Joel Fernandes (Google) wrote: > When we're in hard interrupt context in rcu_read_unlock_special(), we > can still benefit from invoke_rcu_core() doing wake ups of rcuc > threads when the !use_softirq parameter is passed. This is safe > to do so because: What

[PATCH RT 4/8] sched: migrate disable: Protect cpus_ptr with lock

2019-07-26 Thread Scott Wood
Various places assume that cpus_ptr is protected by rq/pi locks, so don't change it before grabbing those locks. Signed-off-by: Scott Wood --- kernel/sched/core.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/kernel/sched/core.c b/kernel/sched/core.c index

[PATCH RT 1/8] sched: migrate_enable: Use sleeping_lock to indicate involuntary sleep

2019-07-26 Thread Scott Wood
Without this, rcu_note_context_switch() will complain if an RCU read lock is held when migrate_enable() calls stop_one_cpu(). Signed-off-by: Scott Wood --- include/linux/sched.h| 4 ++-- kernel/rcu/tree_plugin.h | 2 +- kernel/sched/core.c | 2 ++ 3 files changed, 5 insertions(+), 3

[PATCH RT 6/8] sched: migrate_enable: Set state to TASK_RUNNING

2019-07-26 Thread Scott Wood
If migrate_enable() is called while a task is preparing to sleep (state != TASK_RUNNING), that triggers a debug check in stop_one_cpu(). Explicitly reset state to acknowledge that we're accepting the spurious wakeup. Signed-off-by: Scott Wood --- kernel/sched/core.c | 8 1 file changed

[PATCH RT 5/8] sched/deadline: Reclaim cpuset bandwidth in .migrate_task_rq()

2019-07-26 Thread Scott Wood
With the changes to migrate disabling, ->set_cpus_allowed() no longer gets deferred until migrate_enable(). To avoid releasing the bandwidth while the task may still be executing on the old CPU, move the subtraction to ->migrate_task_rq(). Signed-off-by: Scott Wood --- kernel/sched/dead

[PATCH RT 2/8] sched: __set_cpus_allowed_ptr: Check cpus_mask, not cpus_ptr

2019-07-26 Thread Scott Wood
on, then the mask update would be lost. Signed-off-by: Scott Wood --- kernel/sched/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/sched/core.c b/kernel/sched/core.c index c3407707e367..6e643d656d71 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c

[PATCH RT 7/8] sched: migrate_enable: Use select_fallback_rq()

2019-07-26 Thread Scott Wood
migrate_enable() currently open-codes a variant of select_fallback_rq(). However, it does not have the "No more Mr. Nice Guy" fallback and thus it will pass an invalid CPU to the migration thread if cpus_mask only contains a CPU that is !active. Signed-off-by: Scott Wood --- Thi

[PATCH RT 3/8] sched: Remove dead __migrate_disabled() check

2019-07-26 Thread Scott Wood
This code was unreachable given the __migrate_disabled() branch to "out" immediately beforehand. Signed-off-by: Scott Wood --- kernel/sched/core.c | 7 --- 1 file changed, 7 deletions(-) diff --git a/kernel/sched/core.c b/kernel/sched/core.c index 6e643d656d71..99a3cfccf

[PATCH RT 8/8] sched: Lazy migrate_disable processing

2019-07-26 Thread Scott Wood
() (and thus rcutorture) unless something similar is done with the recently added local_lock. Signed-off-by: Scott Wood --- include/linux/cpu.h| 4 -- include/linux/sched.h | 11 +-- init/init_task.c | 4 ++ kernel/cpu.c | 97 + kernel/sched/core.c

[RT PATCH 0/8] migrate disable fixes and performance

2019-07-26 Thread Scott Wood
. In v5.0-rt with a previous version of these patches, lazy migrate disable reduced kernel build time by around 15-20% wall and 70-75% system. Scott Wood (8): sched: migrate_enable: Use sleeping_lock to indicate involuntary sleep sched: __set_cpus_allowed_ptr: Check cpus_mask, not cpus_ptr

Re: [PATCH] clk: qoriq: Fix -Wunused-const-variable

2019-06-28 Thread Scott Wood
ttps://github.com/ClangBuiltLinux/linux/issues/525 > Cc: clang-built-li...@googlegroups.com > Signed-off-by: Nathan Huckleberry Acked-by: Scott Wood -Scott

Re: [RFC] Deadlock via recursive wakeup via RCU with threadirqs

2019-06-28 Thread Scott Wood
On Fri, 2019-06-28 at 16:15 +0200, Peter Zijlstra wrote: > On Thu, Jun 27, 2019 at 01:36:12PM -0700, Paul E. McKenney wrote: > > On Thu, Jun 27, 2019 at 03:17:27PM -0500, Scott Wood wrote: > > > On Thu, 2019-06-27 at 11:41 -0700, Paul E. McKenney wrote: > > > > Of co

Re: [RFC PATCH RT 4/4] rcutorture: Avoid problematic critical section nesting

2019-06-28 Thread Scott Wood
On Thu, 2019-06-27 at 17:52 -0700, Paul E. McKenney wrote: > On Thu, Jun 27, 2019 at 05:46:27PM -0500, Scott Wood wrote: > > On Thu, 2019-06-27 at 13:50 -0700, Paul E. McKenney wrote: > > > If by IPI-to-self you mean the IRQ work trick, that isn't implemented > > > a

Re: [RFC PATCH RT 4/4] rcutorture: Avoid problematic critical section nesting

2019-06-27 Thread Scott Wood
On Thu, 2019-06-27 at 13:50 -0700, Paul E. McKenney wrote: > On Thu, Jun 27, 2019 at 03:16:09PM -0500, Scott Wood wrote: > > On Thu, 2019-06-27 at 11:00 -0700, Paul E. McKenney wrote: > > > On Wed, Jun 26, 2019 at 11:49:16AM -0500, Scott Wood wrote: > > > > > &g

Re: [RFC] Deadlock via recursive wakeup via RCU with threadirqs

2019-06-27 Thread Scott Wood
On Thu, 2019-06-27 at 11:41 -0700, Paul E. McKenney wrote: > On Thu, Jun 27, 2019 at 02:16:38PM -0400, Joel Fernandes wrote: > > > > I think the fix should be to prevent the wake-up not based on whether we > > are > > in hard/soft-interrupt mode but that we are doing the rcu_read_unlock() > >

Re: [RFC PATCH RT 4/4] rcutorture: Avoid problematic critical section nesting

2019-06-27 Thread Scott Wood
On Thu, 2019-06-27 at 11:00 -0700, Paul E. McKenney wrote: > On Wed, Jun 26, 2019 at 11:49:16AM -0500, Scott Wood wrote: > > On Wed, 2019-06-26 at 11:08 -0400, Steven Rostedt wrote: > > > On Fri, 21 Jun 2019 16:59:55 -0700 > > > "Paul E. McKenney" wrot

Re: [RFC PATCH RT 4/4] rcutorture: Avoid problematic critical section nesting

2019-06-26 Thread Scott Wood
On Wed, 2019-06-26 at 11:08 -0400, Steven Rostedt wrote: > On Fri, 21 Jun 2019 16:59:55 -0700 > "Paul E. McKenney" wrote: > > > I have no objection to the outlawing of a number of these sequences in > > mainline, but am rather pointing out that until they really are outlawed > > and eliminated,

Re: [RFC PATCH RT 3/4] rcu: unlock special: Treat irq and preempt disabled the same

2019-06-24 Thread Scott Wood
On Sat, 2019-06-22 at 12:13 -0700, Paul E. McKenney wrote: > On Fri, Jun 21, 2019 at 05:26:06PM -0700, Paul E. McKenney wrote: > > On Thu, Jun 20, 2019 at 06:08:19PM -0500, Scott Wood wrote: > > > On Thu, 2019-06-20 at 15:25 -0700, Paul E. McKenney wrote: > > > > On T

Re: [RFC PATCH RT 3/4] rcu: unlock special: Treat irq and preempt disabled the same

2019-06-20 Thread Scott Wood
On Thu, 2019-06-20 at 15:25 -0700, Paul E. McKenney wrote: > On Thu, Jun 20, 2019 at 04:59:30PM -0500, Scott Wood wrote: > > On Thu, 2019-06-20 at 14:10 -0700, Paul E. McKenney wrote: > > > On Tue, Jun 18, 2019 at 08:19:07PM -0500, Scott Wood wrote: > > > > [No

Re: [RFC PATCH RT 3/4] rcu: unlock special: Treat irq and preempt disabled the same

2019-06-20 Thread Scott Wood
On Thu, 2019-06-20 at 14:10 -0700, Paul E. McKenney wrote: > On Tue, Jun 18, 2019 at 08:19:07PM -0500, Scott Wood wrote: > > [Note: Just before posting this I noticed that the invoke_rcu_core stuff > > is part of the latest RCU pull request, and it has a patch that > > add

Re: [RFC PATCH RT 4/4] rcutorture: Avoid problematic critical section nesting

2019-06-20 Thread Scott Wood
On Thu, 2019-06-20 at 14:18 -0700, Paul E. McKenney wrote: > On Tue, Jun 18, 2019 at 08:19:08PM -0500, Scott Wood wrote: > > rcutorture was generating some nesting scenarios that are not > > reasonable. Constrain the state selection to avoid them. > > > > Example #1:

  1   2   3   4   5   6   7   8   9   10   >