Re: [PATCH][RFC] printk: make pr_cont buffer per-cpu

2016-08-25 Thread Petr Mladek
On Wed 2016-08-24 23:27:29, Sergey Senozhatsky wrote: > On (08/24/16 10:19), Petr Mladek wrote: > > > On (08/23/16 13:47), Petr Mladek wrote: > > > [..] > > > > > if (!(lflags & LOG_NEWLINE)) { > > > > > + if (!this_cpu_read(cont_printing)) { > > > > > + if

Re: [PATCH][RFC] printk: make pr_cont buffer per-cpu

2016-08-25 Thread Petr Mladek
On Wed 2016-08-24 23:27:29, Sergey Senozhatsky wrote: > On (08/24/16 10:19), Petr Mladek wrote: > > > On (08/23/16 13:47), Petr Mladek wrote: > > > [..] > > > > > if (!(lflags & LOG_NEWLINE)) { > > > > > + if (!this_cpu_read(cont_printing)) { > > > > > + if

Re: [PATCH][RFC] printk: make pr_cont buffer per-cpu

2016-08-25 Thread Petr Mladek
On Thu 2016-08-25 23:27:40, Petr Mladek wrote: > On Wed 2016-08-24 23:27:29, Sergey Senozhatsky wrote: > > On (08/24/16 10:19), Petr Mladek wrote: > > > > On (08/23/16 13:47), Petr Mladek wrote: > > > > [..] > > > > > > if (!(lflags & LOG_NEWLINE)) { > > > > > > + if

Re: [PATCH][RFC] printk: make pr_cont buffer per-cpu

2016-08-25 Thread Petr Mladek
On Thu 2016-08-25 23:27:40, Petr Mladek wrote: > On Wed 2016-08-24 23:27:29, Sergey Senozhatsky wrote: > > On (08/24/16 10:19), Petr Mladek wrote: > > > > On (08/23/16 13:47), Petr Mladek wrote: > > > > [..] > > > > > > if (!(lflags & LOG_NEWLINE)) { > > > > > > + if

Re: [PATCH][RFC] printk: make pr_cont buffer per-cpu

2016-08-24 Thread Sergey Senozhatsky
On (08/24/16 10:19), Petr Mladek wrote: > > On (08/23/16 13:47), Petr Mladek wrote: > > [..] > > > > if (!(lflags & LOG_NEWLINE)) { > > > > + if (!this_cpu_read(cont_printing)) { > > > > + if (system_state == SYSTEM_RUNNING) { > > > > +

Re: [PATCH][RFC] printk: make pr_cont buffer per-cpu

2016-08-24 Thread Sergey Senozhatsky
On (08/24/16 10:19), Petr Mladek wrote: > > On (08/23/16 13:47), Petr Mladek wrote: > > [..] > > > > if (!(lflags & LOG_NEWLINE)) { > > > > + if (!this_cpu_read(cont_printing)) { > > > > + if (system_state == SYSTEM_RUNNING) { > > > > +

Re: [PATCH][RFC] printk: make pr_cont buffer per-cpu

2016-08-24 Thread Petr Mladek
On Wed 2016-08-24 10:14:20, Sergey Senozhatsky wrote: > Hello, > > On (08/23/16 13:47), Petr Mladek wrote: > [..] > > > if (!(lflags & LOG_NEWLINE)) { > > > + if (!this_cpu_read(cont_printing)) { > > > + if (system_state == SYSTEM_RUNNING) { > > > +

Re: [PATCH][RFC] printk: make pr_cont buffer per-cpu

2016-08-24 Thread Petr Mladek
On Wed 2016-08-24 10:14:20, Sergey Senozhatsky wrote: > Hello, > > On (08/23/16 13:47), Petr Mladek wrote: > [..] > > > if (!(lflags & LOG_NEWLINE)) { > > > + if (!this_cpu_read(cont_printing)) { > > > + if (system_state == SYSTEM_RUNNING) { > > > +

Re: [PATCH][RFC] printk: make pr_cont buffer per-cpu

2016-08-23 Thread Sergey Senozhatsky
Hello, On (08/23/16 13:47), Petr Mladek wrote: [..] > > if (!(lflags & LOG_NEWLINE)) { > > + if (!this_cpu_read(cont_printing)) { > > + if (system_state == SYSTEM_RUNNING) { > > + this_cpu_write(cont_printing, true); > > +

Re: [PATCH][RFC] printk: make pr_cont buffer per-cpu

2016-08-23 Thread Sergey Senozhatsky
Hello, On (08/23/16 13:47), Petr Mladek wrote: [..] > > if (!(lflags & LOG_NEWLINE)) { > > + if (!this_cpu_read(cont_printing)) { > > + if (system_state == SYSTEM_RUNNING) { > > + this_cpu_write(cont_printing, true); > > +

Re: [PATCH][RFC] printk: make pr_cont buffer per-cpu

2016-08-23 Thread Petr Mladek
On Tue 2016-08-23 14:18:31, Sergey Senozhatsky wrote: > On (08/23/16 00:40), Sergey Senozhatsky wrote: > > RFC and POC > [..] > > if (!(lflags & LOG_NEWLINE)) { > > + if (!this_cpu_read(cont_printing)) { > > + bool unsafe_pr_cont = preemptible() && > > +

Re: [PATCH][RFC] printk: make pr_cont buffer per-cpu

2016-08-23 Thread Petr Mladek
On Tue 2016-08-23 14:18:31, Sergey Senozhatsky wrote: > On (08/23/16 00:40), Sergey Senozhatsky wrote: > > RFC and POC > [..] > > if (!(lflags & LOG_NEWLINE)) { > > + if (!this_cpu_read(cont_printing)) { > > + bool unsafe_pr_cont = preemptible() && > > +

Re: [PATCH][RFC] printk: make pr_cont buffer per-cpu

2016-08-22 Thread Sergey Senozhatsky
On (08/23/16 00:40), Sergey Senozhatsky wrote: > RFC and POC [..] > if (!(lflags & LOG_NEWLINE)) { > + if (!this_cpu_read(cont_printing)) { > + bool unsafe_pr_cont = preemptible() && > + !rcu_preempt_depth(); d'oh, how did it

Re: [PATCH][RFC] printk: make pr_cont buffer per-cpu

2016-08-22 Thread Sergey Senozhatsky
On (08/23/16 00:40), Sergey Senozhatsky wrote: > RFC and POC [..] > if (!(lflags & LOG_NEWLINE)) { > + if (!this_cpu_read(cont_printing)) { > + bool unsafe_pr_cont = preemptible() && > + !rcu_preempt_depth(); d'oh, how did it

Re: [PATCH][RFC] printk: make pr_cont buffer per-cpu

2016-08-22 Thread Sergey Senozhatsky
On (08/22/16 09:10), Joe Perches wrote: > > (adding Kay Sievers who wrote most of this) ok, thanks. then I'll add http://marc.info/?l=linux-kernel=146717692431893 for more information. -ss

Re: [PATCH][RFC] printk: make pr_cont buffer per-cpu

2016-08-22 Thread Sergey Senozhatsky
On (08/22/16 09:10), Joe Perches wrote: > > (adding Kay Sievers who wrote most of this) ok, thanks. then I'll add http://marc.info/?l=linux-kernel=146717692431893 for more information. -ss

Re: [PATCH][RFC] printk: make pr_cont buffer per-cpu

2016-08-22 Thread Joe Perches
(adding Kay Sievers who wrote most of this) On Tue, 2016-08-23 at 00:40 +0900, Sergey Senozhatsky wrote: > Hello, > > RFC and POC > > Petr, I took a very quick look at your series [1]. I think it > won't work on some of the setups I'm toying with, where multiple CPUs > can do a

Re: [PATCH][RFC] printk: make pr_cont buffer per-cpu

2016-08-22 Thread Joe Perches
(adding Kay Sievers who wrote most of this) On Tue, 2016-08-23 at 00:40 +0900, Sergey Senozhatsky wrote: > Hello, > > RFC and POC > > Petr, I took a very quick look at your series [1]. I think it > won't work on some of the setups I'm toying with, where multiple CPUs > can do a

[PATCH][RFC] printk: make pr_cont buffer per-cpu

2016-08-22 Thread Sergey Senozhatsky
Hello, RFC and POC Petr, I took a very quick look at your series [1]. I think it won't work on some of the setups I'm toying with, where multiple CPUs can do a simultaneous pr_cont() output. What do you about the following approach? (it's not really tested, I just finished

[PATCH][RFC] printk: make pr_cont buffer per-cpu

2016-08-22 Thread Sergey Senozhatsky
Hello, RFC and POC Petr, I took a very quick look at your series [1]. I think it won't work on some of the setups I'm toying with, where multiple CPUs can do a simultaneous pr_cont() output. What do you about the following approach? (it's not really tested, I just finished