Re: [4.14.66-rt40] [report][cpuhotplug] BUG: sleeping function called from invalid context at kernel/locking/rtmutex.c:974

2018-09-06 Thread Sebastian Andrzej Siewior
On 2018-08-31 14:42:25 [-0500], Grygorii Strashko wrote:
> 
> 
> On 08/31/2018 02:30 PM, Sebastian Andrzej Siewior wrote:
> > On 2018-08-31 14:19:53 [-0500], Grygorii Strashko wrote:
> >>
> >> I've tried this and do not see warnings. I'm sending 4.14-rt patches i 
> >> have as
> >> I could miss smth while cherry-picking.
> > 
> > perfect. Thanks for the confirmation.
> > I saw your three patches. Could you please instead just backport the two
> > patches I have in v4.16 so that it applies on v4.14?
> > 
> 
> Do you mean these two:
> https://git.kernel.org/pub/scm/linux/kernel/git/rt/linux-rt-devel.git/commit/?h=linux-4.16.y-rt=c7a3334c762a9b1dd2e39cb2ded00ce66e8a06d1
Yes,

> https://git.kernel.org/pub/scm/linux/kernel/git/rt/linux-rt-devel.git/commit/?h=linux-4.16.y-rt=e083f14dc2e98ced872bf077b4d1cccf95b7e4f8
no, just 

https://git.kernel.org/pub/scm/linux/kernel/git/rt/linux-rt-devel.git/commit/?h=linux-4.16.y-rt-rebase=d6914631a84f47eaf5647da3bb09d58eca156b3f

Sebastian


Re: [4.14.66-rt40] [report][cpuhotplug] BUG: sleeping function called from invalid context at kernel/locking/rtmutex.c:974

2018-09-06 Thread Sebastian Andrzej Siewior
On 2018-08-31 14:42:25 [-0500], Grygorii Strashko wrote:
> 
> 
> On 08/31/2018 02:30 PM, Sebastian Andrzej Siewior wrote:
> > On 2018-08-31 14:19:53 [-0500], Grygorii Strashko wrote:
> >>
> >> I've tried this and do not see warnings. I'm sending 4.14-rt patches i 
> >> have as
> >> I could miss smth while cherry-picking.
> > 
> > perfect. Thanks for the confirmation.
> > I saw your three patches. Could you please instead just backport the two
> > patches I have in v4.16 so that it applies on v4.14?
> > 
> 
> Do you mean these two:
> https://git.kernel.org/pub/scm/linux/kernel/git/rt/linux-rt-devel.git/commit/?h=linux-4.16.y-rt=c7a3334c762a9b1dd2e39cb2ded00ce66e8a06d1
Yes,

> https://git.kernel.org/pub/scm/linux/kernel/git/rt/linux-rt-devel.git/commit/?h=linux-4.16.y-rt=e083f14dc2e98ced872bf077b4d1cccf95b7e4f8
no, just 

https://git.kernel.org/pub/scm/linux/kernel/git/rt/linux-rt-devel.git/commit/?h=linux-4.16.y-rt-rebase=d6914631a84f47eaf5647da3bb09d58eca156b3f

Sebastian


Re: [4.14.66-rt40] [report][cpuhotplug] BUG: sleeping function called from invalid context at kernel/locking/rtmutex.c:974

2018-08-31 Thread Grygorii Strashko



On 08/31/2018 02:30 PM, Sebastian Andrzej Siewior wrote:
> On 2018-08-31 14:19:53 [-0500], Grygorii Strashko wrote:
>>
>> I've tried this and do not see warnings. I'm sending 4.14-rt patches i have 
>> as
>> I could miss smth while cherry-picking.
> 
> perfect. Thanks for the confirmation.
> I saw your three patches. Could you please instead just backport the two
> patches I have in v4.16 so that it applies on v4.14?
> 

Do you mean these two:
https://git.kernel.org/pub/scm/linux/kernel/git/rt/linux-rt-devel.git/commit/?h=linux-4.16.y-rt=c7a3334c762a9b1dd2e39cb2ded00ce66e8a06d1

https://git.kernel.org/pub/scm/linux/kernel/git/rt/linux-rt-devel.git/commit/?h=linux-4.16.y-rt=e083f14dc2e98ced872bf077b4d1cccf95b7e4f8


-- 
regards,
-grygorii


Re: [4.14.66-rt40] [report][cpuhotplug] BUG: sleeping function called from invalid context at kernel/locking/rtmutex.c:974

2018-08-31 Thread Grygorii Strashko



On 08/31/2018 02:30 PM, Sebastian Andrzej Siewior wrote:
> On 2018-08-31 14:19:53 [-0500], Grygorii Strashko wrote:
>>
>> I've tried this and do not see warnings. I'm sending 4.14-rt patches i have 
>> as
>> I could miss smth while cherry-picking.
> 
> perfect. Thanks for the confirmation.
> I saw your three patches. Could you please instead just backport the two
> patches I have in v4.16 so that it applies on v4.14?
> 

Do you mean these two:
https://git.kernel.org/pub/scm/linux/kernel/git/rt/linux-rt-devel.git/commit/?h=linux-4.16.y-rt=c7a3334c762a9b1dd2e39cb2ded00ce66e8a06d1

https://git.kernel.org/pub/scm/linux/kernel/git/rt/linux-rt-devel.git/commit/?h=linux-4.16.y-rt=e083f14dc2e98ced872bf077b4d1cccf95b7e4f8


-- 
regards,
-grygorii


Re: [4.14.66-rt40] [report][cpuhotplug] BUG: sleeping function called from invalid context at kernel/locking/rtmutex.c:974

2018-08-31 Thread Sebastian Andrzej Siewior
On 2018-08-31 14:19:53 [-0500], Grygorii Strashko wrote:
> 
> I've tried this and do not see warnings. I'm sending 4.14-rt patches i have as
> I could miss smth while cherry-picking.

perfect. Thanks for the confirmation.
I saw your three patches. Could you please instead just backport the two
patches I have in v4.16 so that it applies on v4.14?

Sebastian


Re: [4.14.66-rt40] [report][cpuhotplug] BUG: sleeping function called from invalid context at kernel/locking/rtmutex.c:974

2018-08-31 Thread Sebastian Andrzej Siewior
On 2018-08-31 14:19:53 [-0500], Grygorii Strashko wrote:
> 
> I've tried this and do not see warnings. I'm sending 4.14-rt patches i have as
> I could miss smth while cherry-picking.

perfect. Thanks for the confirmation.
I saw your three patches. Could you please instead just backport the two
patches I have in v4.16 so that it applies on v4.14?

Sebastian


Re: [4.14.66-rt40] [report][cpuhotplug] BUG: sleeping function called from invalid context at kernel/locking/rtmutex.c:974

2018-08-31 Thread Grygorii Strashko



On 08/30/2018 04:14 AM, Sebastian Andrzej Siewior wrote:
> On 2018-08-29 16:28:50 [-0500], Grygorii Strashko wrote:
>>
>> Thank you. Are there any plans to back port them for 4.14-rt?
>> Patch [1] need to be reworked a bit, [2] - I was able to cherry-pick from 
>> 4.18-rt.
> 
> Grygorii, could you please replace the second patch with
> 
>
> https://git.kernel.org/pub/scm/linux/kernel/git/rt/linux-rt-devel.git/plain/patches/irqchip-gic-v3-its-Move-pending-table-allocation-to-.patch?h=linux-4.18.y-rt-patches
> 
> (incremental patch
>
> https://git.kernel.org/pub/scm/linux/kernel/git/rt/linux-rt-devel.git/patch/?id=4a0819bb25d12d39c0390636122eefba232596c1
> )
> 
> and check if it works? It should work but I can't test it myself because
> my box with GICv3 died recently…

I've tried this and do not see warnings. I'm sending 4.14-rt patches i have as
I could miss smth while cherry-picking.

-- 
regards,
-grygorii


Re: [4.14.66-rt40] [report][cpuhotplug] BUG: sleeping function called from invalid context at kernel/locking/rtmutex.c:974

2018-08-31 Thread Grygorii Strashko



On 08/30/2018 04:14 AM, Sebastian Andrzej Siewior wrote:
> On 2018-08-29 16:28:50 [-0500], Grygorii Strashko wrote:
>>
>> Thank you. Are there any plans to back port them for 4.14-rt?
>> Patch [1] need to be reworked a bit, [2] - I was able to cherry-pick from 
>> 4.18-rt.
> 
> Grygorii, could you please replace the second patch with
> 
>
> https://git.kernel.org/pub/scm/linux/kernel/git/rt/linux-rt-devel.git/plain/patches/irqchip-gic-v3-its-Move-pending-table-allocation-to-.patch?h=linux-4.18.y-rt-patches
> 
> (incremental patch
>
> https://git.kernel.org/pub/scm/linux/kernel/git/rt/linux-rt-devel.git/patch/?id=4a0819bb25d12d39c0390636122eefba232596c1
> )
> 
> and check if it works? It should work but I can't test it myself because
> my box with GICv3 died recently…

I've tried this and do not see warnings. I'm sending 4.14-rt patches i have as
I could miss smth while cherry-picking.

-- 
regards,
-grygorii


Re: [4.14.66-rt40] [report][cpuhotplug] BUG: sleeping function called from invalid context at kernel/locking/rtmutex.c:974

2018-08-30 Thread Sebastian Andrzej Siewior
On 2018-08-29 16:28:50 [-0500], Grygorii Strashko wrote:
> 
> Thank you. Are there any plans to back port them for 4.14-rt?
> Patch [1] need to be reworked a bit, [2] - I was able to cherry-pick from 
> 4.18-rt.

Grygorii, could you please replace the second patch with

  
https://git.kernel.org/pub/scm/linux/kernel/git/rt/linux-rt-devel.git/plain/patches/irqchip-gic-v3-its-Move-pending-table-allocation-to-.patch?h=linux-4.18.y-rt-patches

(incremental patch  
  
https://git.kernel.org/pub/scm/linux/kernel/git/rt/linux-rt-devel.git/patch/?id=4a0819bb25d12d39c0390636122eefba232596c1
)

and check if it works? It should work but I can't test it myself because
my box with GICv3 died recently…

Sebastian


Re: [4.14.66-rt40] [report][cpuhotplug] BUG: sleeping function called from invalid context at kernel/locking/rtmutex.c:974

2018-08-30 Thread Sebastian Andrzej Siewior
On 2018-08-29 16:28:50 [-0500], Grygorii Strashko wrote:
> 
> Thank you. Are there any plans to back port them for 4.14-rt?
> Patch [1] need to be reworked a bit, [2] - I was able to cherry-pick from 
> 4.18-rt.

Grygorii, could you please replace the second patch with

  
https://git.kernel.org/pub/scm/linux/kernel/git/rt/linux-rt-devel.git/plain/patches/irqchip-gic-v3-its-Move-pending-table-allocation-to-.patch?h=linux-4.18.y-rt-patches

(incremental patch  
  
https://git.kernel.org/pub/scm/linux/kernel/git/rt/linux-rt-devel.git/patch/?id=4a0819bb25d12d39c0390636122eefba232596c1
)

and check if it works? It should work but I can't test it myself because
my box with GICv3 died recently…

Sebastian


Re: [4.14.66-rt40] [report][cpuhotplug] BUG: sleeping function called from invalid context at kernel/locking/rtmutex.c:974

2018-08-29 Thread Steven Rostedt
On Wed, 29 Aug 2018 16:28:50 -0500
Grygorii Strashko  wrote:

> On 08/29/2018 09:08 AM, Sebastian Andrzej Siewior wrote:
> > On 2018-08-28 18:28:42 [-0500], Grygorii Strashko wrote:  
> 
> [...]
> 
> >> [0.912275] [] alloc_pages_current+0xcc/0xe0
> >> [0.912287] [] its_allocate_pending_table+0x60/0xa0
> >> [0.912295] [] its_cpu_init+0x2a0/0x380
> >> [0.912303] [] gic_cpu_init.part.6+0x15c/0x170
> >> [0.912311] [] gic_starting_cpu+0x14/0x20  
> > 
> > This is fixed by
> >
> > https://git.kernel.org/pub/scm/linux/kernel/git/rt/linux-rt-devel.git/tree/patches/irqchip-gic-v3-its-Make-its_lock-a-raw_spin_lock_t.patch?h=linux-4.18.y-rt-patches
> >   
> [1]
> >
> > https://git.kernel.org/pub/scm/linux/kernel/git/rt/linux-rt-devel.git/tree/patches/irqchip-gic-v3-its-Move-ITS-pend_page-allocation-int.patch?h=linux-4.18.y-rt-patches
> >   
> [2]
> > 
> > in the v4.18 tree. The first patch was merged upstream. The second will
> > be replaced by the patches Marc Zyngier proposed in
> >https://lkml.kernel.org/r/3302f069-8f4e-8d97-5166-0dec01b43...@arm.com
> > 
> > I plan to test + replace those for the next v4.18 release.  
> 
> Thank you. Are there any plans to back port them for 4.14-rt?
> Patch [1] need to be reworked a bit, [2] - I was able to cherry-pick from 
> 4.18-rt.
> 

Next week I plan on looking into the patches that need to be
backported. There's quite a lot of them.

-- Steve


Re: [4.14.66-rt40] [report][cpuhotplug] BUG: sleeping function called from invalid context at kernel/locking/rtmutex.c:974

2018-08-29 Thread Steven Rostedt
On Wed, 29 Aug 2018 16:28:50 -0500
Grygorii Strashko  wrote:

> On 08/29/2018 09:08 AM, Sebastian Andrzej Siewior wrote:
> > On 2018-08-28 18:28:42 [-0500], Grygorii Strashko wrote:  
> 
> [...]
> 
> >> [0.912275] [] alloc_pages_current+0xcc/0xe0
> >> [0.912287] [] its_allocate_pending_table+0x60/0xa0
> >> [0.912295] [] its_cpu_init+0x2a0/0x380
> >> [0.912303] [] gic_cpu_init.part.6+0x15c/0x170
> >> [0.912311] [] gic_starting_cpu+0x14/0x20  
> > 
> > This is fixed by
> >
> > https://git.kernel.org/pub/scm/linux/kernel/git/rt/linux-rt-devel.git/tree/patches/irqchip-gic-v3-its-Make-its_lock-a-raw_spin_lock_t.patch?h=linux-4.18.y-rt-patches
> >   
> [1]
> >
> > https://git.kernel.org/pub/scm/linux/kernel/git/rt/linux-rt-devel.git/tree/patches/irqchip-gic-v3-its-Move-ITS-pend_page-allocation-int.patch?h=linux-4.18.y-rt-patches
> >   
> [2]
> > 
> > in the v4.18 tree. The first patch was merged upstream. The second will
> > be replaced by the patches Marc Zyngier proposed in
> >https://lkml.kernel.org/r/3302f069-8f4e-8d97-5166-0dec01b43...@arm.com
> > 
> > I plan to test + replace those for the next v4.18 release.  
> 
> Thank you. Are there any plans to back port them for 4.14-rt?
> Patch [1] need to be reworked a bit, [2] - I was able to cherry-pick from 
> 4.18-rt.
> 

Next week I plan on looking into the patches that need to be
backported. There's quite a lot of them.

-- Steve


Re: [4.14.66-rt40] [report][cpuhotplug] BUG: sleeping function called from invalid context at kernel/locking/rtmutex.c:974

2018-08-29 Thread Grygorii Strashko



On 08/29/2018 09:08 AM, Sebastian Andrzej Siewior wrote:
> On 2018-08-28 18:28:42 [-0500], Grygorii Strashko wrote:

[...]

>> [0.912275] [] alloc_pages_current+0xcc/0xe0
>> [0.912287] [] its_allocate_pending_table+0x60/0xa0
>> [0.912295] [] its_cpu_init+0x2a0/0x380
>> [0.912303] [] gic_cpu_init.part.6+0x15c/0x170
>> [0.912311] [] gic_starting_cpu+0x14/0x20
> 
> This is fixed by
>
> https://git.kernel.org/pub/scm/linux/kernel/git/rt/linux-rt-devel.git/tree/patches/irqchip-gic-v3-its-Make-its_lock-a-raw_spin_lock_t.patch?h=linux-4.18.y-rt-patches
[1]
>
> https://git.kernel.org/pub/scm/linux/kernel/git/rt/linux-rt-devel.git/tree/patches/irqchip-gic-v3-its-Move-ITS-pend_page-allocation-int.patch?h=linux-4.18.y-rt-patches
[2]
> 
> in the v4.18 tree. The first patch was merged upstream. The second will
> be replaced by the patches Marc Zyngier proposed in
>https://lkml.kernel.org/r/3302f069-8f4e-8d97-5166-0dec01b43...@arm.com
> 
> I plan to test + replace those for the next v4.18 release.

Thank you. Are there any plans to back port them for 4.14-rt?
Patch [1] need to be reworked a bit, [2] - I was able to cherry-pick from 
4.18-rt.

-- 
regards,
-grygorii


Re: [4.14.66-rt40] [report][cpuhotplug] BUG: sleeping function called from invalid context at kernel/locking/rtmutex.c:974

2018-08-29 Thread Grygorii Strashko



On 08/29/2018 09:08 AM, Sebastian Andrzej Siewior wrote:
> On 2018-08-28 18:28:42 [-0500], Grygorii Strashko wrote:

[...]

>> [0.912275] [] alloc_pages_current+0xcc/0xe0
>> [0.912287] [] its_allocate_pending_table+0x60/0xa0
>> [0.912295] [] its_cpu_init+0x2a0/0x380
>> [0.912303] [] gic_cpu_init.part.6+0x15c/0x170
>> [0.912311] [] gic_starting_cpu+0x14/0x20
> 
> This is fixed by
>
> https://git.kernel.org/pub/scm/linux/kernel/git/rt/linux-rt-devel.git/tree/patches/irqchip-gic-v3-its-Make-its_lock-a-raw_spin_lock_t.patch?h=linux-4.18.y-rt-patches
[1]
>
> https://git.kernel.org/pub/scm/linux/kernel/git/rt/linux-rt-devel.git/tree/patches/irqchip-gic-v3-its-Move-ITS-pend_page-allocation-int.patch?h=linux-4.18.y-rt-patches
[2]
> 
> in the v4.18 tree. The first patch was merged upstream. The second will
> be replaced by the patches Marc Zyngier proposed in
>https://lkml.kernel.org/r/3302f069-8f4e-8d97-5166-0dec01b43...@arm.com
> 
> I plan to test + replace those for the next v4.18 release.

Thank you. Are there any plans to back port them for 4.14-rt?
Patch [1] need to be reworked a bit, [2] - I was able to cherry-pick from 
4.18-rt.

-- 
regards,
-grygorii


Re: [4.14.66-rt40] [report][cpuhotplug] BUG: sleeping function called from invalid context at kernel/locking/rtmutex.c:974

2018-08-29 Thread Sebastian Andrzej Siewior
On 2018-08-28 18:28:42 [-0500], Grygorii Strashko wrote:
> Hi
Hi,

…
> = Log 1 =
…
> [0.625149] GICv3: CPU1: found redistributor 1 region 0:0x018a
> [0.625176] BUG: sleeping function called from invalid context at 
> kernel/locking/rtmutex.c:974
> [0.625182] in_atomic(): 1, irqs_disabled(): 128, pid: 0, name: swapper/1
> [0.625189] 1 lock held by swapper/1/0:
> [0.625193]  #0:  ((pa_lock).lock){+.+.}, at: [] 
> get_page_from_freelist+0x160/0xd20
> [0.625228] irq event stamp: 0
> [0.625233] hardirqs last  enabled at (0): [<  (null)>]   
> (null)
> [0.625246] hardirqs last disabled at (0): [] 
> copy_process.isra.5.part.6+0x2c0/0x18a8
> [0.625255] softirqs last  enabled at (0): [] 
> copy_process.isra.5.part.6+0x2c0/0x18a8
> [0.625260] softirqs last disabled at (0): [<  (null)>]   
> (null)
> [0.625263] Preemption disabled at:
> [0.625274] [] secondary_start_kernel+0x80/0x118
> [0.625286] CPU: 1 PID: 0 Comm: swapper/1 Not tainted 
> 4.14.66-rt40-02415-g6a801ed-dirty #5
> [0.625290] Hardware name: Texas Instruments AM654 Base Board (DT)
> [0.625295] Call trace:
> [0.625306] [] dump_backtrace+0x0/0x400
> [0.625313] [] show_stack+0x14/0x20
> [0.625324] [] dump_stack+0xac/0xe4
> [0.625333] [] ___might_sleep+0x154/0x228
> [0.625342] [] rt_spin_lock+0x5c/0x70
> [0.625350] [] get_page_from_freelist+0x160/0xd20
> [0.625359] [] __alloc_pages_nodemask+0xe4/0xc68
> [0.625368] [] its_allocate_pending_table+0x68/0xa8
> [0.625375] [] its_cpu_init+0x294/0x374
> [0.625382] [] gic_cpu_init.part.6+0x15c/0x170
> [0.625388] [] gic_starting_cpu+0x14/0x20
> [0.625396] [] cpuhp_invoke_callback+0x9c/0x260
> [0.625404] [] notify_cpu_starting+0x70/0xa8
> [0.625412] [] secondary_start_kernel+0xac/0x118
> 
> = Log 2 =
…
> [0.912050] GICv3: CPU1: found redistributor 1 region 0:0x018a
> [0.912081] BUG: sleeping function called from invalid context at 
> kernel/locking/rtmutex.c:974
> [0.912087] in_atomic(): 1, irqs_disabled(): 128, pid: 0, name: swapper/1
> [0.912092] 1 lock held by swapper/1/0:
> [0.912096]  #0:  ((pa_lock).lock){+.+.}, at: [] 
> get_page_from_freelist+0x154/0xeb0
> [0.912130] irq event stamp: 0
> [0.912135] hardirqs last  enabled at (0): [<  (null)>]   
> (null)
> [0.912147] hardirqs last disabled at (0): [] 
> copy_process.isra.5.part.6+0x438/0x1920
> [0.912156] softirqs last  enabled at (0): [] 
> copy_process.isra.5.part.6+0x438/0x1920
> [0.912160] softirqs last disabled at (0): [<  (null)>]   
> (null)
> [0.912164] Preemption disabled at:
> [0.912175] [] secondary_start_kernel+0x80/0x118
> [0.912188] CPU: 1 PID: 0 Comm: swapper/1 Not tainted 
> 4.14.66-rt40-02415-g6a801ed-dirty #4
> [0.912192] Hardware name: Texas Instruments AM654 Base Board (DT)
> [0.912197] Call trace:
> [0.912207] [] dump_backtrace+0x0/0x400
> [0.912215] [] show_stack+0x14/0x20
> [0.912225] [] dump_stack+0xac/0xe4
> [0.912234] [] ___might_sleep+0x154/0x228
> [0.912245] [] rt_spin_lock+0x5c/0x70
> [0.912251] [] get_page_from_freelist+0x154/0xeb0
> [0.912258] [] __alloc_pages_nodemask+0x108/0xc88
> [0.912268] [] alloc_page_interleave+0x18/0xa0
> [0.912275] [] alloc_pages_current+0xcc/0xe0
> [0.912287] [] its_allocate_pending_table+0x60/0xa0
> [0.912295] [] its_cpu_init+0x2a0/0x380
> [0.912303] [] gic_cpu_init.part.6+0x15c/0x170
> [0.912311] [] gic_starting_cpu+0x14/0x20

This is fixed by
  
https://git.kernel.org/pub/scm/linux/kernel/git/rt/linux-rt-devel.git/tree/patches/irqchip-gic-v3-its-Make-its_lock-a-raw_spin_lock_t.patch?h=linux-4.18.y-rt-patches
  
https://git.kernel.org/pub/scm/linux/kernel/git/rt/linux-rt-devel.git/tree/patches/irqchip-gic-v3-its-Move-ITS-pend_page-allocation-int.patch?h=linux-4.18.y-rt-patches

in the v4.18 tree. The first patch was merged upstream. The second will
be replaced by the patches Marc Zyngier proposed in 
  https://lkml.kernel.org/r/3302f069-8f4e-8d97-5166-0dec01b43...@arm.com

I plan to test + replace those for the next v4.18 release.

Sebastian


Re: [4.14.66-rt40] [report][cpuhotplug] BUG: sleeping function called from invalid context at kernel/locking/rtmutex.c:974

2018-08-29 Thread Sebastian Andrzej Siewior
On 2018-08-28 18:28:42 [-0500], Grygorii Strashko wrote:
> Hi
Hi,

…
> = Log 1 =
…
> [0.625149] GICv3: CPU1: found redistributor 1 region 0:0x018a
> [0.625176] BUG: sleeping function called from invalid context at 
> kernel/locking/rtmutex.c:974
> [0.625182] in_atomic(): 1, irqs_disabled(): 128, pid: 0, name: swapper/1
> [0.625189] 1 lock held by swapper/1/0:
> [0.625193]  #0:  ((pa_lock).lock){+.+.}, at: [] 
> get_page_from_freelist+0x160/0xd20
> [0.625228] irq event stamp: 0
> [0.625233] hardirqs last  enabled at (0): [<  (null)>]   
> (null)
> [0.625246] hardirqs last disabled at (0): [] 
> copy_process.isra.5.part.6+0x2c0/0x18a8
> [0.625255] softirqs last  enabled at (0): [] 
> copy_process.isra.5.part.6+0x2c0/0x18a8
> [0.625260] softirqs last disabled at (0): [<  (null)>]   
> (null)
> [0.625263] Preemption disabled at:
> [0.625274] [] secondary_start_kernel+0x80/0x118
> [0.625286] CPU: 1 PID: 0 Comm: swapper/1 Not tainted 
> 4.14.66-rt40-02415-g6a801ed-dirty #5
> [0.625290] Hardware name: Texas Instruments AM654 Base Board (DT)
> [0.625295] Call trace:
> [0.625306] [] dump_backtrace+0x0/0x400
> [0.625313] [] show_stack+0x14/0x20
> [0.625324] [] dump_stack+0xac/0xe4
> [0.625333] [] ___might_sleep+0x154/0x228
> [0.625342] [] rt_spin_lock+0x5c/0x70
> [0.625350] [] get_page_from_freelist+0x160/0xd20
> [0.625359] [] __alloc_pages_nodemask+0xe4/0xc68
> [0.625368] [] its_allocate_pending_table+0x68/0xa8
> [0.625375] [] its_cpu_init+0x294/0x374
> [0.625382] [] gic_cpu_init.part.6+0x15c/0x170
> [0.625388] [] gic_starting_cpu+0x14/0x20
> [0.625396] [] cpuhp_invoke_callback+0x9c/0x260
> [0.625404] [] notify_cpu_starting+0x70/0xa8
> [0.625412] [] secondary_start_kernel+0xac/0x118
> 
> = Log 2 =
…
> [0.912050] GICv3: CPU1: found redistributor 1 region 0:0x018a
> [0.912081] BUG: sleeping function called from invalid context at 
> kernel/locking/rtmutex.c:974
> [0.912087] in_atomic(): 1, irqs_disabled(): 128, pid: 0, name: swapper/1
> [0.912092] 1 lock held by swapper/1/0:
> [0.912096]  #0:  ((pa_lock).lock){+.+.}, at: [] 
> get_page_from_freelist+0x154/0xeb0
> [0.912130] irq event stamp: 0
> [0.912135] hardirqs last  enabled at (0): [<  (null)>]   
> (null)
> [0.912147] hardirqs last disabled at (0): [] 
> copy_process.isra.5.part.6+0x438/0x1920
> [0.912156] softirqs last  enabled at (0): [] 
> copy_process.isra.5.part.6+0x438/0x1920
> [0.912160] softirqs last disabled at (0): [<  (null)>]   
> (null)
> [0.912164] Preemption disabled at:
> [0.912175] [] secondary_start_kernel+0x80/0x118
> [0.912188] CPU: 1 PID: 0 Comm: swapper/1 Not tainted 
> 4.14.66-rt40-02415-g6a801ed-dirty #4
> [0.912192] Hardware name: Texas Instruments AM654 Base Board (DT)
> [0.912197] Call trace:
> [0.912207] [] dump_backtrace+0x0/0x400
> [0.912215] [] show_stack+0x14/0x20
> [0.912225] [] dump_stack+0xac/0xe4
> [0.912234] [] ___might_sleep+0x154/0x228
> [0.912245] [] rt_spin_lock+0x5c/0x70
> [0.912251] [] get_page_from_freelist+0x154/0xeb0
> [0.912258] [] __alloc_pages_nodemask+0x108/0xc88
> [0.912268] [] alloc_page_interleave+0x18/0xa0
> [0.912275] [] alloc_pages_current+0xcc/0xe0
> [0.912287] [] its_allocate_pending_table+0x60/0xa0
> [0.912295] [] its_cpu_init+0x2a0/0x380
> [0.912303] [] gic_cpu_init.part.6+0x15c/0x170
> [0.912311] [] gic_starting_cpu+0x14/0x20

This is fixed by
  
https://git.kernel.org/pub/scm/linux/kernel/git/rt/linux-rt-devel.git/tree/patches/irqchip-gic-v3-its-Make-its_lock-a-raw_spin_lock_t.patch?h=linux-4.18.y-rt-patches
  
https://git.kernel.org/pub/scm/linux/kernel/git/rt/linux-rt-devel.git/tree/patches/irqchip-gic-v3-its-Move-ITS-pend_page-allocation-int.patch?h=linux-4.18.y-rt-patches

in the v4.18 tree. The first patch was merged upstream. The second will
be replaced by the patches Marc Zyngier proposed in 
  https://lkml.kernel.org/r/3302f069-8f4e-8d97-5166-0dec01b43...@arm.com

I plan to test + replace those for the next v4.18 release.

Sebastian


[4.14.66-rt40] [report][cpuhotplug] BUG: sleeping function called from invalid context at kernel/locking/rtmutex.c:974

2018-08-28 Thread Grygorii Strashko
Hi

I can see below back traces during secondary CPUs initialization (boot) on TI's 
AM6 SoC (ARM64 4 CPUs)
with debug options enabled it happens without CONFIG_NUMA=n (log 1) and with 
CONFIG_NUMA=y.
This is TI branch, there are no RT specific changes.

I've also found the similar issue was reported by Mike Galbraith [1]

[1] https://www.spinics.net/lists/linux-rt-users/msg19058.html

= Log 1 =
[0.00] Booting Linux on physical CPU 0x0
[0.00] Linux version 4.14.66-rt40-02415-g6a801ed-dirty 
(a0226610local@uda0226610) (gcc version 7.2.1 20171011 (Linaro GCC 
7.2-2017.11)) #5 SMP PREEMPT RT Mon Aug 27 21:04:26 CDT 2018
[0.00] Boot CPU: AArch64 Processor [410fd034]
[0.00] Machine model: Texas Instruments AM654 Base Board
[0.00] earlycon: ns16550a0 at MMIO32 0x0280 (options '')
[0.00] bootconsole [ns16550a0] enabled
[0.00] cma: Reserved 512 MiB at 0xc000
[0.00] psci: probing for conduit method from DT.
[0.00] psci: PSCIv1.1 detected in firmware.
[0.00] psci: Using standard PSCI v0.2 function IDs
[0.00] psci: Trusted OS migration not required
[0.00] psci: SMC Calling Convention v1.1
[0.00] percpu: Embedded 2 pages/cpu @80087feb s55504 r8192 
d67376 u131072
[0.00] Detected VIPT I-cache on CPU0
[0.00] CPU features: enabling workaround for ARM erratum 845719
[0.00] Speculative Store Bypass Disable mitigation not required
[0.00] Built 1 zonelists, mobility grouping on.  Total pages: 65088
[0.00] Kernel command line: console=ttyS2,115200n8 
earlycon=ns16550a,mmio32,0x0280 
mtdparts=4704.ospi.0:512k(ospi.tiboot3),2m(ospi.tispl),5m(ospi.u-boot),128k(ospi.env),-@8m(ospi.rootfs)
 root=PARTUUID=f2c6fe8e-0t
[0.00] PID hash table entries: 4096 (order: -1, 32768 bytes)
[0.00] Dentry cache hash table entries: 524288 (order: 9, 33554432 
bytes)
[0.00] Inode-cache hash table entries: 262144 (order: 5, 2097152 bytes)
[0.00] software IO TLB [mem 0xf9dd-0xfddd] (64MB) mapped at 
[800079dd-80007ddc]
[0.00] Memory: 3511168K/4169728K available (7806K kernel code, 1000K 
rwdata, 3008K rodata, 512K init, 14066K bss, 134272K reserved, 524288K 
cma-reserved)
[0.00] Virtual kernel memory layout:
[0.00] modules : 0x - 0x0800   (   128 
MB)
[0.00] vmalloc : 0x0800 - 0x7bdf   (126847 
GB)
[0.00]   .text : 0x0808 - 0x0882   (  7808 
KB)
[0.00] .rodata : 0x0882 - 0x08b2   (  3072 
KB)
[0.00]   .init : 0x08b2 - 0x08ba   (   512 
KB)
[0.00]   .data : 0x08ba - 0x08c9a008   (  1001 
KB)
[0.00].bss : 0x08c9a008 - 0x09a56af0   ( 14067 
KB)
[0.00] fixed   : 0x7fdffe7b - 0x7fdffec0   (  4416 
KB)
[0.00] PCI I/O : 0x7fdffee0 - 0x7fdfffe0   (16 
MB)
[0.00] vmemmap : 0x7fe0 - 0x8000   (   128 
GB maximum)
[0.00]   0x7fe0 - 0x7fe00220   (34 
MB actual)
[0.00] memory  : 0x8000 - 0x80088000   ( 34816 
MB)
[0.00] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
[0.00] Running RCU self tests
[0.00] Preemptible hierarchical RCU implementation.
[0.00]  RCU event tracing is enabled.
[0.00]  RCU lockdep checking is enabled.
[0.00]  RCU restricting CPUs from NR_CPUS=64 to nr_cpu_ids=4.
[0.00]  RCU priority boosting: priority 1 delay 500 ms.
[0.00]  RCU callback double-/use-after-free debug enabled.
[0.00]  No expedited grace period (rcu_normal_after_boot).
[0.00]  Tasks RCU enabled.
[0.00] RCU: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=4
[0.00] NR_IRQS: 64, nr_irqs: 64, preallocated irqs: 0
[0.00] GICv3: GIC: Using split EOI/Deactivate mode
[0.00] GICv3: no VLPI support, no direct LPI support
[0.00] ITS [mem 0x0182-0x0182]
[0.00] GIC: enabling workaround for ITS: Socionext Synquacer pre-ITS
[0.00] ITS@0x0182: allocated 1048576 Devices @8fc00 
(flat, esz 8, psz 64K, shr 0)
[0.00] ITS: using cache flushing for cmd queue
[0.00] GIC: using LPI property table @0x0008fd73
[0.00] ITS: Allocated 1792 chunks for LPIs
[0.00] GICv3: CPU0: found redistributor 0 region 0:0x0188
[0.00] CPU0: using LPI pending table @0x0008ffd8
[0.00] GIC: using cache flushing for LPI property table
[0.00] arch_timer: cp15 timer(s) running at 200.00MHz (phys).
[0.00] clocksource: arch_sys_counter: mask: 0xff 
max_cycles: 0x2e2049d3e8, 

[4.14.66-rt40] [report][cpuhotplug] BUG: sleeping function called from invalid context at kernel/locking/rtmutex.c:974

2018-08-28 Thread Grygorii Strashko
Hi

I can see below back traces during secondary CPUs initialization (boot) on TI's 
AM6 SoC (ARM64 4 CPUs)
with debug options enabled it happens without CONFIG_NUMA=n (log 1) and with 
CONFIG_NUMA=y.
This is TI branch, there are no RT specific changes.

I've also found the similar issue was reported by Mike Galbraith [1]

[1] https://www.spinics.net/lists/linux-rt-users/msg19058.html

= Log 1 =
[0.00] Booting Linux on physical CPU 0x0
[0.00] Linux version 4.14.66-rt40-02415-g6a801ed-dirty 
(a0226610local@uda0226610) (gcc version 7.2.1 20171011 (Linaro GCC 
7.2-2017.11)) #5 SMP PREEMPT RT Mon Aug 27 21:04:26 CDT 2018
[0.00] Boot CPU: AArch64 Processor [410fd034]
[0.00] Machine model: Texas Instruments AM654 Base Board
[0.00] earlycon: ns16550a0 at MMIO32 0x0280 (options '')
[0.00] bootconsole [ns16550a0] enabled
[0.00] cma: Reserved 512 MiB at 0xc000
[0.00] psci: probing for conduit method from DT.
[0.00] psci: PSCIv1.1 detected in firmware.
[0.00] psci: Using standard PSCI v0.2 function IDs
[0.00] psci: Trusted OS migration not required
[0.00] psci: SMC Calling Convention v1.1
[0.00] percpu: Embedded 2 pages/cpu @80087feb s55504 r8192 
d67376 u131072
[0.00] Detected VIPT I-cache on CPU0
[0.00] CPU features: enabling workaround for ARM erratum 845719
[0.00] Speculative Store Bypass Disable mitigation not required
[0.00] Built 1 zonelists, mobility grouping on.  Total pages: 65088
[0.00] Kernel command line: console=ttyS2,115200n8 
earlycon=ns16550a,mmio32,0x0280 
mtdparts=4704.ospi.0:512k(ospi.tiboot3),2m(ospi.tispl),5m(ospi.u-boot),128k(ospi.env),-@8m(ospi.rootfs)
 root=PARTUUID=f2c6fe8e-0t
[0.00] PID hash table entries: 4096 (order: -1, 32768 bytes)
[0.00] Dentry cache hash table entries: 524288 (order: 9, 33554432 
bytes)
[0.00] Inode-cache hash table entries: 262144 (order: 5, 2097152 bytes)
[0.00] software IO TLB [mem 0xf9dd-0xfddd] (64MB) mapped at 
[800079dd-80007ddc]
[0.00] Memory: 3511168K/4169728K available (7806K kernel code, 1000K 
rwdata, 3008K rodata, 512K init, 14066K bss, 134272K reserved, 524288K 
cma-reserved)
[0.00] Virtual kernel memory layout:
[0.00] modules : 0x - 0x0800   (   128 
MB)
[0.00] vmalloc : 0x0800 - 0x7bdf   (126847 
GB)
[0.00]   .text : 0x0808 - 0x0882   (  7808 
KB)
[0.00] .rodata : 0x0882 - 0x08b2   (  3072 
KB)
[0.00]   .init : 0x08b2 - 0x08ba   (   512 
KB)
[0.00]   .data : 0x08ba - 0x08c9a008   (  1001 
KB)
[0.00].bss : 0x08c9a008 - 0x09a56af0   ( 14067 
KB)
[0.00] fixed   : 0x7fdffe7b - 0x7fdffec0   (  4416 
KB)
[0.00] PCI I/O : 0x7fdffee0 - 0x7fdfffe0   (16 
MB)
[0.00] vmemmap : 0x7fe0 - 0x8000   (   128 
GB maximum)
[0.00]   0x7fe0 - 0x7fe00220   (34 
MB actual)
[0.00] memory  : 0x8000 - 0x80088000   ( 34816 
MB)
[0.00] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
[0.00] Running RCU self tests
[0.00] Preemptible hierarchical RCU implementation.
[0.00]  RCU event tracing is enabled.
[0.00]  RCU lockdep checking is enabled.
[0.00]  RCU restricting CPUs from NR_CPUS=64 to nr_cpu_ids=4.
[0.00]  RCU priority boosting: priority 1 delay 500 ms.
[0.00]  RCU callback double-/use-after-free debug enabled.
[0.00]  No expedited grace period (rcu_normal_after_boot).
[0.00]  Tasks RCU enabled.
[0.00] RCU: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=4
[0.00] NR_IRQS: 64, nr_irqs: 64, preallocated irqs: 0
[0.00] GICv3: GIC: Using split EOI/Deactivate mode
[0.00] GICv3: no VLPI support, no direct LPI support
[0.00] ITS [mem 0x0182-0x0182]
[0.00] GIC: enabling workaround for ITS: Socionext Synquacer pre-ITS
[0.00] ITS@0x0182: allocated 1048576 Devices @8fc00 
(flat, esz 8, psz 64K, shr 0)
[0.00] ITS: using cache flushing for cmd queue
[0.00] GIC: using LPI property table @0x0008fd73
[0.00] ITS: Allocated 1792 chunks for LPIs
[0.00] GICv3: CPU0: found redistributor 0 region 0:0x0188
[0.00] CPU0: using LPI pending table @0x0008ffd8
[0.00] GIC: using cache flushing for LPI property table
[0.00] arch_timer: cp15 timer(s) running at 200.00MHz (phys).
[0.00] clocksource: arch_sys_counter: mask: 0xff 
max_cycles: 0x2e2049d3e8,