Re: mm/percpu.c: use smarter memory allocation for struct pcpu_alloc_info (crisv32 hang)

2017-11-28 Thread Jesper Nilsson
On Mon, Nov 27, 2017 at 03:51:04PM -0500, Nicolas Pitre wrote: > On Mon, 27 Nov 2017, Tejun Heo wrote: > > > Hello, > > > > On Mon, Nov 27, 2017 at 03:31:52PM -0500, Nicolas Pitre wrote: > > > So IMHO I don't think reverting the commit is the right thing to do. > > > That commit is clearly not

Re: mm/percpu.c: use smarter memory allocation for struct pcpu_alloc_info (crisv32 hang)

2017-11-28 Thread Jesper Nilsson
On Mon, Nov 27, 2017 at 03:51:04PM -0500, Nicolas Pitre wrote: > On Mon, 27 Nov 2017, Tejun Heo wrote: > > > Hello, > > > > On Mon, Nov 27, 2017 at 03:31:52PM -0500, Nicolas Pitre wrote: > > > So IMHO I don't think reverting the commit is the right thing to do. > > > That commit is clearly not

Re: mm/percpu.c: use smarter memory allocation for struct pcpu_alloc_info (crisv32 hang)

2017-11-27 Thread Guenter Roeck
On Mon, Nov 27, 2017 at 12:54:21PM -0800, Tejun Heo wrote: > Hello, Nicolas. > > On Mon, Nov 27, 2017 at 03:51:04PM -0500, Nicolas Pitre wrote: > > Subject: percpu: hack to let the CRIS architecture to boot until they clean > > up > > > > Commit 438a506180 ("percpu: don't forget to free the

Re: mm/percpu.c: use smarter memory allocation for struct pcpu_alloc_info (crisv32 hang)

2017-11-27 Thread Guenter Roeck
On Mon, Nov 27, 2017 at 12:54:21PM -0800, Tejun Heo wrote: > Hello, Nicolas. > > On Mon, Nov 27, 2017 at 03:51:04PM -0500, Nicolas Pitre wrote: > > Subject: percpu: hack to let the CRIS architecture to boot until they clean > > up > > > > Commit 438a506180 ("percpu: don't forget to free the

Re: mm/percpu.c: use smarter memory allocation for struct pcpu_alloc_info (crisv32 hang)

2017-11-27 Thread Tejun Heo
Hello, Nicolas. On Mon, Nov 27, 2017 at 03:51:04PM -0500, Nicolas Pitre wrote: > Subject: percpu: hack to let the CRIS architecture to boot until they clean up > > Commit 438a506180 ("percpu: don't forget to free the temporary struct > pcpu_alloc_info") uncovered a problem on the CRIS

Re: mm/percpu.c: use smarter memory allocation for struct pcpu_alloc_info (crisv32 hang)

2017-11-27 Thread Tejun Heo
Hello, Nicolas. On Mon, Nov 27, 2017 at 03:51:04PM -0500, Nicolas Pitre wrote: > Subject: percpu: hack to let the CRIS architecture to boot until they clean up > > Commit 438a506180 ("percpu: don't forget to free the temporary struct > pcpu_alloc_info") uncovered a problem on the CRIS

Re: mm/percpu.c: use smarter memory allocation for struct pcpu_alloc_info (crisv32 hang)

2017-11-27 Thread Nicolas Pitre
On Mon, 27 Nov 2017, Tejun Heo wrote: > Hello, > > On Mon, Nov 27, 2017 at 03:31:52PM -0500, Nicolas Pitre wrote: > > So IMHO I don't think reverting the commit is the right thing to do. > > That commit is clearly not at fault here. > > It's not about the blame. We just want to avoid breaking

Re: mm/percpu.c: use smarter memory allocation for struct pcpu_alloc_info (crisv32 hang)

2017-11-27 Thread Nicolas Pitre
On Mon, 27 Nov 2017, Tejun Heo wrote: > Hello, > > On Mon, Nov 27, 2017 at 03:31:52PM -0500, Nicolas Pitre wrote: > > So IMHO I don't think reverting the commit is the right thing to do. > > That commit is clearly not at fault here. > > It's not about the blame. We just want to avoid breaking

Re: mm/percpu.c: use smarter memory allocation for struct pcpu_alloc_info (crisv32 hang)

2017-11-27 Thread Tejun Heo
Hello, On Mon, Nov 27, 2017 at 03:31:52PM -0500, Nicolas Pitre wrote: > So IMHO I don't think reverting the commit is the right thing to do. > That commit is clearly not at fault here. It's not about the blame. We just want to avoid breaking boot in a way which is difficult to debug. Once

Re: mm/percpu.c: use smarter memory allocation for struct pcpu_alloc_info (crisv32 hang)

2017-11-27 Thread Tejun Heo
Hello, On Mon, Nov 27, 2017 at 03:31:52PM -0500, Nicolas Pitre wrote: > So IMHO I don't think reverting the commit is the right thing to do. > That commit is clearly not at fault here. It's not about the blame. We just want to avoid breaking boot in a way which is difficult to debug. Once

Re: mm/percpu.c: use smarter memory allocation for struct pcpu_alloc_info (crisv32 hang)

2017-11-27 Thread Nicolas Pitre
On Mon, 27 Nov 2017, Tejun Heo wrote: > Hello, > > I'm reverting the offending commit till we figure out what's going on. It is figured out. The cris port is wrongly initializing the bootmem allocator with virtual memory addresses rather than physical addresses. And because its __va()

Re: mm/percpu.c: use smarter memory allocation for struct pcpu_alloc_info (crisv32 hang)

2017-11-27 Thread Nicolas Pitre
On Mon, 27 Nov 2017, Tejun Heo wrote: > Hello, > > I'm reverting the offending commit till we figure out what's going on. It is figured out. The cris port is wrongly initializing the bootmem allocator with virtual memory addresses rather than physical addresses. And because its __va()

Re: mm/percpu.c: use smarter memory allocation for struct pcpu_alloc_info (crisv32 hang)

2017-11-27 Thread Tejun Heo
Hello, I'm reverting the offending commit till we figure out what's going on. Thanks. -- tejun

Re: mm/percpu.c: use smarter memory allocation for struct pcpu_alloc_info (crisv32 hang)

2017-11-27 Thread Tejun Heo
Hello, I'm reverting the offending commit till we figure out what's going on. Thanks. -- tejun

Re: mm/percpu.c: use smarter memory allocation for struct pcpu_alloc_info (crisv32 hang)

2017-11-22 Thread Jesper Nilsson
On Wed, Nov 22, 2017 at 03:17:00PM -0500, Nicolas Pitre wrote: > On Wed, 22 Nov 2017, Jesper Nilsson wrote: > > > On Mon, Nov 20, 2017 at 10:50:46PM -0500, Nicolas Pitre wrote: > > > On Mon, 20 Nov 2017, Guenter Roeck wrote: > > > > On Mon, Nov 20, 2017 at 07:28:21PM -0500, Nicolas Pitre wrote: >

Re: mm/percpu.c: use smarter memory allocation for struct pcpu_alloc_info (crisv32 hang)

2017-11-22 Thread Jesper Nilsson
On Wed, Nov 22, 2017 at 03:17:00PM -0500, Nicolas Pitre wrote: > On Wed, 22 Nov 2017, Jesper Nilsson wrote: > > > On Mon, Nov 20, 2017 at 10:50:46PM -0500, Nicolas Pitre wrote: > > > On Mon, 20 Nov 2017, Guenter Roeck wrote: > > > > On Mon, Nov 20, 2017 at 07:28:21PM -0500, Nicolas Pitre wrote: >

Re: mm/percpu.c: use smarter memory allocation for struct pcpu_alloc_info (crisv32 hang)

2017-11-22 Thread Nicolas Pitre
On Wed, 22 Nov 2017, Jesper Nilsson wrote: > On Mon, Nov 20, 2017 at 10:50:46PM -0500, Nicolas Pitre wrote: > > On Mon, 20 Nov 2017, Guenter Roeck wrote: > > > On Mon, Nov 20, 2017 at 07:28:21PM -0500, Nicolas Pitre wrote: > > > > On Mon, 20 Nov 2017, Guenter Roeck wrote: > > > > > > > > >

Re: mm/percpu.c: use smarter memory allocation for struct pcpu_alloc_info (crisv32 hang)

2017-11-22 Thread Nicolas Pitre
On Wed, 22 Nov 2017, Jesper Nilsson wrote: > On Mon, Nov 20, 2017 at 10:50:46PM -0500, Nicolas Pitre wrote: > > On Mon, 20 Nov 2017, Guenter Roeck wrote: > > > On Mon, Nov 20, 2017 at 07:28:21PM -0500, Nicolas Pitre wrote: > > > > On Mon, 20 Nov 2017, Guenter Roeck wrote: > > > > > > > > >

Re: mm/percpu.c: use smarter memory allocation for struct pcpu_alloc_info (crisv32 hang)

2017-11-22 Thread Jesper Nilsson
On Mon, Nov 20, 2017 at 10:50:46PM -0500, Nicolas Pitre wrote: > On Mon, 20 Nov 2017, Guenter Roeck wrote: > > On Mon, Nov 20, 2017 at 07:28:21PM -0500, Nicolas Pitre wrote: > > > On Mon, 20 Nov 2017, Guenter Roeck wrote: > > > > > > > bdata->node_min_pfn=6

Re: mm/percpu.c: use smarter memory allocation for struct pcpu_alloc_info (crisv32 hang)

2017-11-22 Thread Jesper Nilsson
On Mon, Nov 20, 2017 at 10:50:46PM -0500, Nicolas Pitre wrote: > On Mon, 20 Nov 2017, Guenter Roeck wrote: > > On Mon, Nov 20, 2017 at 07:28:21PM -0500, Nicolas Pitre wrote: > > > On Mon, 20 Nov 2017, Guenter Roeck wrote: > > > > > > > bdata->node_min_pfn=6

Re: mm/percpu.c: use smarter memory allocation for struct pcpu_alloc_info (crisv32 hang)

2017-11-20 Thread Nicolas Pitre
On Mon, 20 Nov 2017, Guenter Roeck wrote: > On Mon, Nov 20, 2017 at 07:28:21PM -0500, Nicolas Pitre wrote: > > On Mon, 20 Nov 2017, Guenter Roeck wrote: > > > > > bdata->node_min_pfn=6 PFN_PHYS(bdata->node_min_pfn)=c000 > > > start_off=536000 region=c0536000 > > > > If

Re: mm/percpu.c: use smarter memory allocation for struct pcpu_alloc_info (crisv32 hang)

2017-11-20 Thread Nicolas Pitre
On Mon, 20 Nov 2017, Guenter Roeck wrote: > On Mon, Nov 20, 2017 at 07:28:21PM -0500, Nicolas Pitre wrote: > > On Mon, 20 Nov 2017, Guenter Roeck wrote: > > > > > bdata->node_min_pfn=6 PFN_PHYS(bdata->node_min_pfn)=c000 > > > start_off=536000 region=c0536000 > > > > If

Re: mm/percpu.c: use smarter memory allocation for struct pcpu_alloc_info (crisv32 hang)

2017-11-20 Thread Guenter Roeck
On Mon, Nov 20, 2017 at 07:28:21PM -0500, Nicolas Pitre wrote: > On Mon, 20 Nov 2017, Guenter Roeck wrote: > > > On Mon, Nov 20, 2017 at 03:21:32PM -0500, Nicolas Pitre wrote: > > > On Mon, 20 Nov 2017, Guenter Roeck wrote: > > > > > > > On Mon, Nov 20, 2017 at 01:18:38PM -0500, Nicolas Pitre

Re: mm/percpu.c: use smarter memory allocation for struct pcpu_alloc_info (crisv32 hang)

2017-11-20 Thread Guenter Roeck
On Mon, Nov 20, 2017 at 07:28:21PM -0500, Nicolas Pitre wrote: > On Mon, 20 Nov 2017, Guenter Roeck wrote: > > > On Mon, Nov 20, 2017 at 03:21:32PM -0500, Nicolas Pitre wrote: > > > On Mon, 20 Nov 2017, Guenter Roeck wrote: > > > > > > > On Mon, Nov 20, 2017 at 01:18:38PM -0500, Nicolas Pitre

Re: mm/percpu.c: use smarter memory allocation for struct pcpu_alloc_info (crisv32 hang)

2017-11-20 Thread Nicolas Pitre
On Mon, 20 Nov 2017, Guenter Roeck wrote: > On Mon, Nov 20, 2017 at 03:21:32PM -0500, Nicolas Pitre wrote: > > On Mon, 20 Nov 2017, Guenter Roeck wrote: > > > > > On Mon, Nov 20, 2017 at 01:18:38PM -0500, Nicolas Pitre wrote: > > > > On Sun, 19 Nov 2017, Guenter Roeck wrote: > > > > > > > > >

Re: mm/percpu.c: use smarter memory allocation for struct pcpu_alloc_info (crisv32 hang)

2017-11-20 Thread Nicolas Pitre
On Mon, 20 Nov 2017, Guenter Roeck wrote: > On Mon, Nov 20, 2017 at 03:21:32PM -0500, Nicolas Pitre wrote: > > On Mon, 20 Nov 2017, Guenter Roeck wrote: > > > > > On Mon, Nov 20, 2017 at 01:18:38PM -0500, Nicolas Pitre wrote: > > > > On Sun, 19 Nov 2017, Guenter Roeck wrote: > > > > > > > > >

Re: mm/percpu.c: use smarter memory allocation for struct pcpu_alloc_info (crisv32 hang)

2017-11-20 Thread Guenter Roeck
On Mon, Nov 20, 2017 at 03:21:32PM -0500, Nicolas Pitre wrote: > On Mon, 20 Nov 2017, Guenter Roeck wrote: > > > On Mon, Nov 20, 2017 at 01:18:38PM -0500, Nicolas Pitre wrote: > > > On Sun, 19 Nov 2017, Guenter Roeck wrote: > > > > > > > On 11/19/2017 08:08 PM, Nicolas Pitre wrote: > > > > > On

Re: mm/percpu.c: use smarter memory allocation for struct pcpu_alloc_info (crisv32 hang)

2017-11-20 Thread Guenter Roeck
On Mon, Nov 20, 2017 at 03:21:32PM -0500, Nicolas Pitre wrote: > On Mon, 20 Nov 2017, Guenter Roeck wrote: > > > On Mon, Nov 20, 2017 at 01:18:38PM -0500, Nicolas Pitre wrote: > > > On Sun, 19 Nov 2017, Guenter Roeck wrote: > > > > > > > On 11/19/2017 08:08 PM, Nicolas Pitre wrote: > > > > > On

Re: mm/percpu.c: use smarter memory allocation for struct pcpu_alloc_info (crisv32 hang)

2017-11-20 Thread Nicolas Pitre
On Mon, 20 Nov 2017, Guenter Roeck wrote: > On Mon, Nov 20, 2017 at 01:18:38PM -0500, Nicolas Pitre wrote: > > On Sun, 19 Nov 2017, Guenter Roeck wrote: > > > > > On 11/19/2017 08:08 PM, Nicolas Pitre wrote: > > > > On Sun, 19 Nov 2017, Guenter Roeck wrote: > > > > > On 11/19/2017 12:36 PM,

Re: mm/percpu.c: use smarter memory allocation for struct pcpu_alloc_info (crisv32 hang)

2017-11-20 Thread Nicolas Pitre
On Mon, 20 Nov 2017, Guenter Roeck wrote: > On Mon, Nov 20, 2017 at 01:18:38PM -0500, Nicolas Pitre wrote: > > On Sun, 19 Nov 2017, Guenter Roeck wrote: > > > > > On 11/19/2017 08:08 PM, Nicolas Pitre wrote: > > > > On Sun, 19 Nov 2017, Guenter Roeck wrote: > > > > > On 11/19/2017 12:36 PM,

Re: mm/percpu.c: use smarter memory allocation for struct pcpu_alloc_info (crisv32 hang)

2017-11-20 Thread Guenter Roeck
On Mon, Nov 20, 2017 at 01:18:38PM -0500, Nicolas Pitre wrote: > On Sun, 19 Nov 2017, Guenter Roeck wrote: > > > On 11/19/2017 08:08 PM, Nicolas Pitre wrote: > > > On Sun, 19 Nov 2017, Guenter Roeck wrote: > > > > On 11/19/2017 12:36 PM, Nicolas Pitre wrote: > > > > > On Sat, 18 Nov 2017, Guenter

Re: mm/percpu.c: use smarter memory allocation for struct pcpu_alloc_info (crisv32 hang)

2017-11-20 Thread Guenter Roeck
On Mon, Nov 20, 2017 at 01:18:38PM -0500, Nicolas Pitre wrote: > On Sun, 19 Nov 2017, Guenter Roeck wrote: > > > On 11/19/2017 08:08 PM, Nicolas Pitre wrote: > > > On Sun, 19 Nov 2017, Guenter Roeck wrote: > > > > On 11/19/2017 12:36 PM, Nicolas Pitre wrote: > > > > > On Sat, 18 Nov 2017, Guenter

Re: mm/percpu.c: use smarter memory allocation for struct pcpu_alloc_info (crisv32 hang)

2017-11-20 Thread Nicolas Pitre
On Sun, 19 Nov 2017, Guenter Roeck wrote: > On 11/19/2017 08:08 PM, Nicolas Pitre wrote: > > On Sun, 19 Nov 2017, Guenter Roeck wrote: > > > On 11/19/2017 12:36 PM, Nicolas Pitre wrote: > > > > On Sat, 18 Nov 2017, Guenter Roeck wrote: > > > > > On Tue, Oct 03, 2017 at 06:29:49PM -0400, Nicolas

Re: mm/percpu.c: use smarter memory allocation for struct pcpu_alloc_info (crisv32 hang)

2017-11-20 Thread Nicolas Pitre
On Sun, 19 Nov 2017, Guenter Roeck wrote: > On 11/19/2017 08:08 PM, Nicolas Pitre wrote: > > On Sun, 19 Nov 2017, Guenter Roeck wrote: > > > On 11/19/2017 12:36 PM, Nicolas Pitre wrote: > > > > On Sat, 18 Nov 2017, Guenter Roeck wrote: > > > > > On Tue, Oct 03, 2017 at 06:29:49PM -0400, Nicolas

Re: mm/percpu.c: use smarter memory allocation for struct pcpu_alloc_info (crisv32 hang)

2017-11-19 Thread Guenter Roeck
On 11/19/2017 08:08 PM, Nicolas Pitre wrote: On Sun, 19 Nov 2017, Guenter Roeck wrote: On 11/19/2017 12:36 PM, Nicolas Pitre wrote: On Sat, 18 Nov 2017, Guenter Roeck wrote: On Tue, Oct 03, 2017 at 06:29:49PM -0400, Nicolas Pitre wrote: @@ -2295,6 +2295,7 @@ void __init

Re: mm/percpu.c: use smarter memory allocation for struct pcpu_alloc_info (crisv32 hang)

2017-11-19 Thread Guenter Roeck
On 11/19/2017 08:08 PM, Nicolas Pitre wrote: On Sun, 19 Nov 2017, Guenter Roeck wrote: On 11/19/2017 12:36 PM, Nicolas Pitre wrote: On Sat, 18 Nov 2017, Guenter Roeck wrote: On Tue, Oct 03, 2017 at 06:29:49PM -0400, Nicolas Pitre wrote: @@ -2295,6 +2295,7 @@ void __init

Re: mm/percpu.c: use smarter memory allocation for struct pcpu_alloc_info (crisv32 hang)

2017-11-19 Thread Nicolas Pitre
On Sun, 19 Nov 2017, Guenter Roeck wrote: > On 11/19/2017 12:36 PM, Nicolas Pitre wrote: > > On Sat, 18 Nov 2017, Guenter Roeck wrote: > > > On Tue, Oct 03, 2017 at 06:29:49PM -0400, Nicolas Pitre wrote: > > > > @@ -2295,6 +2295,7 @@ void __init setup_per_cpu_areas(void) > > > > if

Re: mm/percpu.c: use smarter memory allocation for struct pcpu_alloc_info (crisv32 hang)

2017-11-19 Thread Nicolas Pitre
On Sun, 19 Nov 2017, Guenter Roeck wrote: > On 11/19/2017 12:36 PM, Nicolas Pitre wrote: > > On Sat, 18 Nov 2017, Guenter Roeck wrote: > > > On Tue, Oct 03, 2017 at 06:29:49PM -0400, Nicolas Pitre wrote: > > > > @@ -2295,6 +2295,7 @@ void __init setup_per_cpu_areas(void) > > > > if

Re: mm/percpu.c: use smarter memory allocation for struct pcpu_alloc_info (crisv32 hang)

2017-11-19 Thread Guenter Roeck
On 11/19/2017 12:36 PM, Nicolas Pitre wrote: On Sat, 18 Nov 2017, Guenter Roeck wrote: Hi, On Tue, Oct 03, 2017 at 06:29:49PM -0400, Nicolas Pitre wrote: On Tue, 3 Oct 2017, Tejun Heo wrote: On Tue, Oct 03, 2017 at 04:57:44PM -0400, Nicolas Pitre wrote: This can be much smaller than a

Re: mm/percpu.c: use smarter memory allocation for struct pcpu_alloc_info (crisv32 hang)

2017-11-19 Thread Guenter Roeck
On 11/19/2017 12:36 PM, Nicolas Pitre wrote: On Sat, 18 Nov 2017, Guenter Roeck wrote: Hi, On Tue, Oct 03, 2017 at 06:29:49PM -0400, Nicolas Pitre wrote: On Tue, 3 Oct 2017, Tejun Heo wrote: On Tue, Oct 03, 2017 at 04:57:44PM -0400, Nicolas Pitre wrote: This can be much smaller than a

Re: mm/percpu.c: use smarter memory allocation for struct pcpu_alloc_info (crisv32 hang)

2017-11-19 Thread Nicolas Pitre
On Sat, 18 Nov 2017, Guenter Roeck wrote: > Hi, > > On Tue, Oct 03, 2017 at 06:29:49PM -0400, Nicolas Pitre wrote: > > On Tue, 3 Oct 2017, Tejun Heo wrote: > > > > > On Tue, Oct 03, 2017 at 04:57:44PM -0400, Nicolas Pitre wrote: > > > > This can be much smaller than a page on very small memory

Re: mm/percpu.c: use smarter memory allocation for struct pcpu_alloc_info (crisv32 hang)

2017-11-19 Thread Nicolas Pitre
On Sat, 18 Nov 2017, Guenter Roeck wrote: > Hi, > > On Tue, Oct 03, 2017 at 06:29:49PM -0400, Nicolas Pitre wrote: > > On Tue, 3 Oct 2017, Tejun Heo wrote: > > > > > On Tue, Oct 03, 2017 at 04:57:44PM -0400, Nicolas Pitre wrote: > > > > This can be much smaller than a page on very small memory

Re: mm/percpu.c: use smarter memory allocation for struct pcpu_alloc_info (crisv32 hang)

2017-11-18 Thread Guenter Roeck
Hi, On Tue, Oct 03, 2017 at 06:29:49PM -0400, Nicolas Pitre wrote: > On Tue, 3 Oct 2017, Tejun Heo wrote: > > > On Tue, Oct 03, 2017 at 04:57:44PM -0400, Nicolas Pitre wrote: > > > This can be much smaller than a page on very small memory systems. > > > Always rounding up the size to a page is

Re: mm/percpu.c: use smarter memory allocation for struct pcpu_alloc_info (crisv32 hang)

2017-11-18 Thread Guenter Roeck
Hi, On Tue, Oct 03, 2017 at 06:29:49PM -0400, Nicolas Pitre wrote: > On Tue, 3 Oct 2017, Tejun Heo wrote: > > > On Tue, Oct 03, 2017 at 04:57:44PM -0400, Nicolas Pitre wrote: > > > This can be much smaller than a page on very small memory systems. > > > Always rounding up the size to a page is