Re: [PATCH v3] printk: Add console owner and waiter logic to load balance console writes

2017-11-08 Thread Sergey Senozhatsky
On (11/09/17 00:06), Steven Rostedt wrote: > What does safe context mean? "safe" means that we don't cause lockups, stalls, sched throttlings, etc. by doing console_unlock() from that context [task]. > Do we really want to allow the printk thread to sleep when there's more > to print? What

Re: [PATCH v3] printk: Add console owner and waiter logic to load balance console writes

2017-11-08 Thread Sergey Senozhatsky
On (11/09/17 00:06), Steven Rostedt wrote: > What does safe context mean? "safe" means that we don't cause lockups, stalls, sched throttlings, etc. by doing console_unlock() from that context [task]. > Do we really want to allow the printk thread to sleep when there's more > to print? What

Re: [PATCH v3] printk: Add console owner and waiter logic to load balance console writes

2017-11-08 Thread Steven Rostedt
On Thu, 9 Nov 2017 13:45:48 +0900 Sergey Senozhatsky wrote: > > so what we are looking at > >a) we take over printing. can be from safe context to unsafe context > [well, bad karma]. can be from unsafe context to a safe one. or from > safe

Re: [PATCH v3] printk: Add console owner and waiter logic to load balance console writes

2017-11-08 Thread Steven Rostedt
On Thu, 9 Nov 2017 13:45:48 +0900 Sergey Senozhatsky wrote: > > so what we are looking at > >a) we take over printing. can be from safe context to unsafe context > [well, bad karma]. can be from unsafe context to a safe one. or from > safe context to another safe context... or

Re: [PATCH v3] printk: Add console owner and waiter logic to load balance console writes

2017-11-08 Thread Sergey Senozhatsky
On (11/08/17 22:29), Steven Rostedt wrote: > > On (11/08/17 09:29), Steven Rostedt wrote: > > > On Wed, 8 Nov 2017 14:19:55 +0900 > > > Sergey Senozhatsky wrote: > > > > > > > the change goes further. I did express some of my concerns during the > > > > KS,

Re: [PATCH v3] printk: Add console owner and waiter logic to load balance console writes

2017-11-08 Thread Sergey Senozhatsky
On (11/08/17 22:29), Steven Rostedt wrote: > > On (11/08/17 09:29), Steven Rostedt wrote: > > > On Wed, 8 Nov 2017 14:19:55 +0900 > > > Sergey Senozhatsky wrote: > > > > > > > the change goes further. I did express some of my concerns during the > > > > KS, > > > > I'll just bring them to the

Re: [PATCH v3] printk: Add console owner and waiter logic to load balance console writes

2017-11-08 Thread Steven Rostedt
On Thu, 9 Nov 2017 09:56:35 +0900 Sergey Senozhatsky wrote: > Hello Steven, > > On (11/08/17 09:29), Steven Rostedt wrote: > > On Wed, 8 Nov 2017 14:19:55 +0900 > > Sergey Senozhatsky wrote: > > > > > the change goes

Re: [PATCH v3] printk: Add console owner and waiter logic to load balance console writes

2017-11-08 Thread Steven Rostedt
On Thu, 9 Nov 2017 09:56:35 +0900 Sergey Senozhatsky wrote: > Hello Steven, > > On (11/08/17 09:29), Steven Rostedt wrote: > > On Wed, 8 Nov 2017 14:19:55 +0900 > > Sergey Senozhatsky wrote: > > > > > the change goes further. I did express some of my concerns during the KS, > > > I'll just

Re: [PATCH v3] printk: Add console owner and waiter logic to load balance console writes

2017-11-08 Thread Sergey Senozhatsky
Hello Steven, On (11/08/17 09:29), Steven Rostedt wrote: > On Wed, 8 Nov 2017 14:19:55 +0900 > Sergey Senozhatsky wrote: > > > the change goes further. I did express some of my concerns during the KS, > > I'll just bring them to the list. > > > > > > we now

Re: [PATCH v3] printk: Add console owner and waiter logic to load balance console writes

2017-11-08 Thread Sergey Senozhatsky
Hello Steven, On (11/08/17 09:29), Steven Rostedt wrote: > On Wed, 8 Nov 2017 14:19:55 +0900 > Sergey Senozhatsky wrote: > > > the change goes further. I did express some of my concerns during the KS, > > I'll just bring them to the list. > > > > > > we now always shift printing from a save -

Re: [PATCH v3] printk: Add console owner and waiter logic to load balance console writes

2017-11-08 Thread Steven Rostedt
On Wed, 8 Nov 2017 14:19:55 +0900 Sergey Senozhatsky wrote: > the change goes further. I did express some of my concerns during the KS, > I'll just bring them to the list. > > > we now always shift printing from a save - scheduleable - context to > a

Re: [PATCH v3] printk: Add console owner and waiter logic to load balance console writes

2017-11-08 Thread Steven Rostedt
On Wed, 8 Nov 2017 14:19:55 +0900 Sergey Senozhatsky wrote: > the change goes further. I did express some of my concerns during the KS, > I'll just bring them to the list. > > > we now always shift printing from a save - scheduleable - context to > a potentially unsafe one - atomic. by

Re: [PATCH v3] printk: Add console owner and waiter logic to load balance console writes

2017-11-07 Thread Sergey Senozhatsky
(Ccing Tejun) On (11/07/17 10:40), Sergey Senozhatsky wrote: > On (11/06/17 21:06), Tetsuo Handa wrote: > > I tried your patch with warn_alloc() torture. It did not cause lockups. > > But I felt that possibility of failing to flush last second messages (such > > as SysRq-c or SysRq-b) to consoles

Re: [PATCH v3] printk: Add console owner and waiter logic to load balance console writes

2017-11-07 Thread Sergey Senozhatsky
(Ccing Tejun) On (11/07/17 10:40), Sergey Senozhatsky wrote: > On (11/06/17 21:06), Tetsuo Handa wrote: > > I tried your patch with warn_alloc() torture. It did not cause lockups. > > But I felt that possibility of failing to flush last second messages (such > > as SysRq-c or SysRq-b) to consoles

Re: [PATCH v3] printk: Add console owner and waiter logic to load balance console writes

2017-11-06 Thread Sergey Senozhatsky
On (11/06/17 21:06), Tetsuo Handa wrote: > I tried your patch with warn_alloc() torture. It did not cause lockups. > But I felt that possibility of failing to flush last second messages (such > as SysRq-c or SysRq-b) to consoles has increased. Is this psychological? do I understand it correctly

Re: [PATCH v3] printk: Add console owner and waiter logic to load balance console writes

2017-11-06 Thread Sergey Senozhatsky
On (11/06/17 21:06), Tetsuo Handa wrote: > I tried your patch with warn_alloc() torture. It did not cause lockups. > But I felt that possibility of failing to flush last second messages (such > as SysRq-c or SysRq-b) to consoles has increased. Is this psychological? do I understand it correctly

Re: [PATCH v3] printk: Add console owner and waiter logic to load balance console writes

2017-11-06 Thread Tetsuo Handa
I tried your patch with warn_alloc() torture. It did not cause lockups. But I felt that possibility of failing to flush last second messages (such as SysRq-c or SysRq-b) to consoles has increased. Is this psychological? -- vmcore-dmesg start -- [ 169.016198] postgres cpuset= [

Re: [PATCH v3] printk: Add console owner and waiter logic to load balance console writes

2017-11-06 Thread Tetsuo Handa
I tried your patch with warn_alloc() torture. It did not cause lockups. But I felt that possibility of failing to flush last second messages (such as SysRq-c or SysRq-b) to consoles has increased. Is this psychological? -- vmcore-dmesg start -- [ 169.016198] postgres cpuset= [

Re: [PATCH v3] printk: Add console owner and waiter logic to load balance console writes

2017-11-03 Thread Sergey Senozhatsky
On (11/02/17 23:15), Steven Rostedt wrote: > On Thu, 2 Nov 2017 23:16:16 +0100 > Vlastimil Babka wrote: > > > > + if (spin) { > > > + /* We spin waiting for the owner to release us > > > */ > > > +

Re: [PATCH v3] printk: Add console owner and waiter logic to load balance console writes

2017-11-03 Thread Sergey Senozhatsky
On (11/02/17 23:15), Steven Rostedt wrote: > On Thu, 2 Nov 2017 23:16:16 +0100 > Vlastimil Babka wrote: > > > > + if (spin) { > > > + /* We spin waiting for the owner to release us > > > */ > > > + spin_acquire(_owner_dep_map, 0,

Re: [PATCH v3] printk: Add console owner and waiter logic to load balance console writes

2017-11-03 Thread Steven Rostedt
On Fri, 3 Nov 2017 07:54:04 -0400 Steven Rostedt wrote: > The new waiter gets set only if there isn't already a waiter *and* > there is an owner that is not current (and with the printk_safe_enter I > don't think that is even needed). > > + while

Re: [PATCH v3] printk: Add console owner and waiter logic to load balance console writes

2017-11-03 Thread Steven Rostedt
On Fri, 3 Nov 2017 07:54:04 -0400 Steven Rostedt wrote: > The new waiter gets set only if there isn't already a waiter *and* > there is an owner that is not current (and with the printk_safe_enter I > don't think that is even needed). > > + while

Re: [PATCH v3] printk: Add console owner and waiter logic to load balance console writes

2017-11-03 Thread Steven Rostedt
On Fri, 3 Nov 2017 07:21:21 -0400 Steven Rostedt wrote: > On Thu, 2 Nov 2017 21:09:32 -0700 > John Hubbard wrote: > > > > For example, if there are 3 or more threads, you can do the following: > > > > thread A: holds the console lock, is printing,

Re: [PATCH v3] printk: Add console owner and waiter logic to load balance console writes

2017-11-03 Thread Steven Rostedt
On Fri, 3 Nov 2017 07:21:21 -0400 Steven Rostedt wrote: > On Thu, 2 Nov 2017 21:09:32 -0700 > John Hubbard wrote: > > > > For example, if there are 3 or more threads, you can do the following: > > > > thread A: holds the console lock, is printing, then moves into the > > console_unlock > >

Re: [PATCH v3] printk: Add console owner and waiter logic to load balance console writes

2017-11-03 Thread Steven Rostedt
On Thu, 2 Nov 2017 21:09:32 -0700 John Hubbard wrote: > On 11/02/2017 03:16 PM, Vlastimil Babka wrote: > > On 11/02/2017 06:45 PM, Steven Rostedt wrote: > > ...>__DEVKMSG_LOG_BIT_ON = 0, > >>__DEVKMSG_LOG_BIT_OFF, > >> @@ -1753,8 +1760,56 @@ asmlinkage int

Re: [PATCH v3] printk: Add console owner and waiter logic to load balance console writes

2017-11-03 Thread Steven Rostedt
On Thu, 2 Nov 2017 21:09:32 -0700 John Hubbard wrote: > On 11/02/2017 03:16 PM, Vlastimil Babka wrote: > > On 11/02/2017 06:45 PM, Steven Rostedt wrote: > > ...>__DEVKMSG_LOG_BIT_ON = 0, > >>__DEVKMSG_LOG_BIT_OFF, > >> @@ -1753,8 +1760,56 @@ asmlinkage int vprintk_emit(int facility

Re: [PATCH v3] printk: Add console owner and waiter logic to load balance console writes

2017-11-02 Thread Steven Rostedt
On Thu, 2 Nov 2017 23:16:16 +0100 Vlastimil Babka wrote: > > + if (spin) { > > + /* We spin waiting for the owner to release us > > */ > > + spin_acquire(_owner_dep_map, 0, 0, > > _THIS_IP_); > > +

Re: [PATCH v3] printk: Add console owner and waiter logic to load balance console writes

2017-11-02 Thread Steven Rostedt
On Thu, 2 Nov 2017 23:16:16 +0100 Vlastimil Babka wrote: > > + if (spin) { > > + /* We spin waiting for the owner to release us > > */ > > + spin_acquire(_owner_dep_map, 0, 0, > > _THIS_IP_); > > +

Re: [PATCH v3] printk: Add console owner and waiter logic to load balance console writes

2017-11-02 Thread Vlastimil Babka
On 11/02/2017 06:45 PM, Steven Rostedt wrote: ...>__DEVKMSG_LOG_BIT_ON = 0, > __DEVKMSG_LOG_BIT_OFF, > @@ -1753,8 +1760,56 @@ asmlinkage int vprintk_emit(int facility >* semaphore. The release will print out buffers and wake up >* /dev/kmsg and syslog()

Re: [PATCH v3] printk: Add console owner and waiter logic to load balance console writes

2017-11-02 Thread Vlastimil Babka
On 11/02/2017 06:45 PM, Steven Rostedt wrote: ...>__DEVKMSG_LOG_BIT_ON = 0, > __DEVKMSG_LOG_BIT_OFF, > @@ -1753,8 +1760,56 @@ asmlinkage int vprintk_emit(int facility >* semaphore. The release will print out buffers and wake up >* /dev/kmsg and syslog()