Re: [PATCH] random: Fix kernel panic due to system_wq use before init

2016-09-20 Thread Matt Fleming
On Mon, 19 Sep, at 01:09:22PM, Waiman Long wrote: > On 09/19/2016 10:51 AM, Matt Fleming wrote: > >On Mon, 19 Sep, at 10:48:12AM, Waiman Long wrote: > >>With this patch applied, I am able to successfully boot both the 16-socket > >>12-TB and 8-socket 6TB configurations without problem. > >> >

Re: [PATCH] random: Fix kernel panic due to system_wq use before init

2016-09-20 Thread Matt Fleming
On Mon, 19 Sep, at 01:09:22PM, Waiman Long wrote: > On 09/19/2016 10:51 AM, Matt Fleming wrote: > >On Mon, 19 Sep, at 10:48:12AM, Waiman Long wrote: > >>With this patch applied, I am able to successfully boot both the 16-socket > >>12-TB and 8-socket 6TB configurations without problem. > >> >

Re: [PATCH] random: Fix kernel panic due to system_wq use before init

2016-09-19 Thread Matt Fleming
On Mon, 19 Sep, at 10:48:12AM, Waiman Long wrote: > > With this patch applied, I am able to successfully boot both the 16-socket > 12-TB and 8-socket 6TB configurations without problem. > > Tested-by: Waiman Long Could you please show your dmesg after booting with

Re: [PATCH] random: Fix kernel panic due to system_wq use before init

2016-09-19 Thread Matt Fleming
On Mon, 19 Sep, at 10:48:12AM, Waiman Long wrote: > > With this patch applied, I am able to successfully boot both the 16-socket > 12-TB and 8-socket 6TB configurations without problem. > > Tested-by: Waiman Long Could you please show your dmesg after booting with efi=debug? The part I'm

Re: [PATCH] random: Fix kernel panic due to system_wq use before init

2016-09-19 Thread Waiman Long
On 09/19/2016 08:43 AM, Matt Fleming wrote: On Sun, 18 Sep, at 11:09:08PM, Waiman Long wrote: On 09/14/2016 03:19 PM, Linus Torvalds wrote: On Wed, Sep 14, 2016 at 12:14 PM, Waiman Long wrote: In the stack backtrace above, the kernel hadn't even reached SMP boot after

Re: [PATCH] random: Fix kernel panic due to system_wq use before init

2016-09-19 Thread Waiman Long
On 09/19/2016 08:43 AM, Matt Fleming wrote: On Sun, 18 Sep, at 11:09:08PM, Waiman Long wrote: On 09/14/2016 03:19 PM, Linus Torvalds wrote: On Wed, Sep 14, 2016 at 12:14 PM, Waiman Long wrote: In the stack backtrace above, the kernel hadn't even reached SMP boot after about 50s. That was

Re: [PATCH] random: Fix kernel panic due to system_wq use before init

2016-09-19 Thread Matt Fleming
On Sun, 18 Sep, at 11:09:08PM, Waiman Long wrote: > On 09/14/2016 03:19 PM, Linus Torvalds wrote: > >On Wed, Sep 14, 2016 at 12:14 PM, Waiman Long wrote: > >>In the stack backtrace above, the kernel hadn't even reached SMP boot after > >>about 50s. That was extremely slow. I

Re: [PATCH] random: Fix kernel panic due to system_wq use before init

2016-09-19 Thread Matt Fleming
On Sun, 18 Sep, at 11:09:08PM, Waiman Long wrote: > On 09/14/2016 03:19 PM, Linus Torvalds wrote: > >On Wed, Sep 14, 2016 at 12:14 PM, Waiman Long wrote: > >>In the stack backtrace above, the kernel hadn't even reached SMP boot after > >>about 50s. That was extremely slow. I tried the 4.7.3

Re: [PATCH] random: Fix kernel panic due to system_wq use before init

2016-09-19 Thread Matt Fleming
On Sun, 18 Sep, at 11:09:08PM, Waiman Long wrote: > > I have finally finished bisecting the problem. I was wrong in saying that > the 4.7.3 kernel had no problem. It did have. There were some slight > differences between the 4.8 and 4.7 kernel config files that I used. After > some further

Re: [PATCH] random: Fix kernel panic due to system_wq use before init

2016-09-19 Thread Matt Fleming
On Sun, 18 Sep, at 11:09:08PM, Waiman Long wrote: > > I have finally finished bisecting the problem. I was wrong in saying that > the 4.7.3 kernel had no problem. It did have. There were some slight > differences between the 4.8 and 4.7 kernel config files that I used. After > some further

Re: [PATCH] random: Fix kernel panic due to system_wq use before init

2016-09-18 Thread Waiman Long
On 09/14/2016 03:19 PM, Linus Torvalds wrote: On Wed, Sep 14, 2016 at 12:14 PM, Waiman Long wrote: In the stack backtrace above, the kernel hadn't even reached SMP boot after about 50s. That was extremely slow. I tried the 4.7.3 kernel and it booted up fine. So I suspect

Re: [PATCH] random: Fix kernel panic due to system_wq use before init

2016-09-18 Thread Waiman Long
On 09/14/2016 03:19 PM, Linus Torvalds wrote: On Wed, Sep 14, 2016 at 12:14 PM, Waiman Long wrote: In the stack backtrace above, the kernel hadn't even reached SMP boot after about 50s. That was extremely slow. I tried the 4.7.3 kernel and it booted up fine. So I suspect that there may be too

Re: [PATCH] random: Fix kernel panic due to system_wq use before init

2016-09-14 Thread Tejun Heo
Hello, On Wed, Sep 14, 2016 at 03:55:51PM -0400, Tejun Heo wrote: > We've used keventd_up() for this purpose and it hasn't been big enough > an issue as workqueue usages during earlyboot are very rare (only five > users right now). But, yeah, it's getting used a more and more and > there's no

Re: [PATCH] random: Fix kernel panic due to system_wq use before init

2016-09-14 Thread Tejun Heo
Hello, On Wed, Sep 14, 2016 at 03:55:51PM -0400, Tejun Heo wrote: > We've used keventd_up() for this purpose and it hasn't been big enough > an issue as workqueue usages during earlyboot are very rare (only five > users right now). But, yeah, it's getting used a more and more and > there's no

Re: [PATCH] random: Fix kernel panic due to system_wq use before init

2016-09-14 Thread Waiman Long
On 09/14/2016 05:06 PM, Linus Torvalds wrote: On Wed, Sep 14, 2016 at 12:34 PM, Waiman Long wrote: I can try, but the 16-socket system that I have at the moment takes a long time (more than an hour) for one shutdown-reboot cycle. It may not be really more interrupts in

Re: [PATCH] random: Fix kernel panic due to system_wq use before init

2016-09-14 Thread Waiman Long
On 09/14/2016 05:06 PM, Linus Torvalds wrote: On Wed, Sep 14, 2016 at 12:34 PM, Waiman Long wrote: I can try, but the 16-socket system that I have at the moment takes a long time (more than an hour) for one shutdown-reboot cycle. It may not be really more interrupts in 4.8, it may be that the

Re: [PATCH] random: Fix kernel panic due to system_wq use before init

2016-09-14 Thread Linus Torvalds
On Wed, Sep 14, 2016 at 12:34 PM, Waiman Long wrote: > > I can try, but the 16-socket system that I have at the moment takes a long > time (more than an hour) for one shutdown-reboot cycle. It may not be really > more interrupts in 4.8, it may be that the random driver just

Re: [PATCH] random: Fix kernel panic due to system_wq use before init

2016-09-14 Thread Linus Torvalds
On Wed, Sep 14, 2016 at 12:34 PM, Waiman Long wrote: > > I can try, but the 16-socket system that I have at the moment takes a long > time (more than an hour) for one shutdown-reboot cycle. It may not be really > more interrupts in 4.8, it may be that the random driver just somehow run > very

Re: [PATCH] random: Fix kernel panic due to system_wq use before init

2016-09-14 Thread Tejun Heo
Hello, Linus. On Wed, Sep 14, 2016 at 12:14:30PM -0700, Linus Torvalds wrote: > I'm wondering if we couldn't just initialize "system_wq" earlier. > Right now init_workqueues() is an "early_initcall()", so it's at the > same priority as a number of other random early initcalls. My gut > feeling is

Re: [PATCH] random: Fix kernel panic due to system_wq use before init

2016-09-14 Thread Tejun Heo
Hello, Linus. On Wed, Sep 14, 2016 at 12:14:30PM -0700, Linus Torvalds wrote: > I'm wondering if we couldn't just initialize "system_wq" earlier. > Right now init_workqueues() is an "early_initcall()", so it's at the > same priority as a number of other random early initcalls. My gut > feeling is

Re: [PATCH] random: Fix kernel panic due to system_wq use before init

2016-09-14 Thread Waiman Long
On 09/14/2016 03:19 PM, Linus Torvalds wrote: On Wed, Sep 14, 2016 at 12:14 PM, Waiman Long wrote: In the stack backtrace above, the kernel hadn't even reached SMP boot after about 50s. That was extremely slow. I tried the 4.7.3 kernel and it booted up fine. So I suspect

Re: [PATCH] random: Fix kernel panic due to system_wq use before init

2016-09-14 Thread Waiman Long
On 09/14/2016 03:19 PM, Linus Torvalds wrote: On Wed, Sep 14, 2016 at 12:14 PM, Waiman Long wrote: In the stack backtrace above, the kernel hadn't even reached SMP boot after about 50s. That was extremely slow. I tried the 4.7.3 kernel and it booted up fine. So I suspect that there may be too

Re: [PATCH] random: Fix kernel panic due to system_wq use before init

2016-09-14 Thread Waiman Long
On 09/14/2016 03:14 PM, Linus Torvalds wrote: Ugh, I detest this patch. My gut feeling is that a driver (even a fairly core one like the random code) should not have to know these kinds of details like "schedule_work() needs system_wq to have been initialized". I'm wondering if we couldn't

Re: [PATCH] random: Fix kernel panic due to system_wq use before init

2016-09-14 Thread Waiman Long
On 09/14/2016 03:14 PM, Linus Torvalds wrote: Ugh, I detest this patch. My gut feeling is that a driver (even a fairly core one like the random code) should not have to know these kinds of details like "schedule_work() needs system_wq to have been initialized". I'm wondering if we couldn't

Re: [PATCH] random: Fix kernel panic due to system_wq use before init

2016-09-14 Thread Linus Torvalds
On Wed, Sep 14, 2016 at 12:14 PM, Waiman Long wrote: > > In the stack backtrace above, the kernel hadn't even reached SMP boot after > about 50s. That was extremely slow. I tried the 4.7.3 kernel and it booted > up fine. So I suspect that there may be too many interrupts

Re: [PATCH] random: Fix kernel panic due to system_wq use before init

2016-09-14 Thread Linus Torvalds
On Wed, Sep 14, 2016 at 12:14 PM, Waiman Long wrote: > > In the stack backtrace above, the kernel hadn't even reached SMP boot after > about 50s. That was extremely slow. I tried the 4.7.3 kernel and it booted > up fine. So I suspect that there may be too many interrupts going on and it >

Re: [PATCH] random: Fix kernel panic due to system_wq use before init

2016-09-14 Thread Waiman Long
On 09/14/2016 03:03 PM, Waiman Long wrote: While booting a 4.8-rc6 kernel on a 16-socket 768-thread Broadwell-EX system, the kernel panic'ed with the following log: [ 51.837010] BUG: unable to handle kernel NULL pointer dereference at 0102 [ 51.845635] IP: []

Re: [PATCH] random: Fix kernel panic due to system_wq use before init

2016-09-14 Thread Waiman Long
On 09/14/2016 03:03 PM, Waiman Long wrote: While booting a 4.8-rc6 kernel on a 16-socket 768-thread Broadwell-EX system, the kernel panic'ed with the following log: [ 51.837010] BUG: unable to handle kernel NULL pointer dereference at 0102 [ 51.845635] IP: []

Re: [PATCH] random: Fix kernel panic due to system_wq use before init

2016-09-14 Thread Linus Torvalds
Ugh, I detest this patch. My gut feeling is that a driver (even a fairly core one like the random code) should not have to know these kinds of details like "schedule_work() needs system_wq to have been initialized". I'm wondering if we couldn't just initialize "system_wq" earlier. Right now

Re: [PATCH] random: Fix kernel panic due to system_wq use before init

2016-09-14 Thread Linus Torvalds
Ugh, I detest this patch. My gut feeling is that a driver (even a fairly core one like the random code) should not have to know these kinds of details like "schedule_work() needs system_wq to have been initialized". I'm wondering if we couldn't just initialize "system_wq" earlier. Right now