Re: [PATCH 4.19 regression fix] printk: For early boot messages check loglevel when flushing the buffer

2018-09-12 Thread Sergey Senozhatsky
On (09/12/18 15:33), Petr Mladek wrote: > > console_trylock(); > > console_may_schedule = 0; > > + if (exclusive_console) { > > + exclusive_console = NULL; > > + console_seq = rollback_console_seq; > > This might be controversial. Yes, it might help in some

Re: [PATCH 4.19 regression fix] printk: For early boot messages check loglevel when flushing the buffer

2018-09-12 Thread Sergey Senozhatsky
On (09/12/18 15:33), Petr Mladek wrote: > > console_trylock(); > > console_may_schedule = 0; > > + if (exclusive_console) { > > + exclusive_console = NULL; > > + console_seq = rollback_console_seq; > > This might be controversial. Yes, it might help in some

Re: [PATCH 4.19 regression fix] printk: For early boot messages check loglevel when flushing the buffer

2018-09-12 Thread Petr Mladek
On Wed 2018-09-12 16:49:30, Sergey Senozhatsky wrote: > On (09/11/18 10:47), Petr Mladek wrote: > > > > Most problems should probably be solved when we store console_seq > > > > before setting exclusive_console. Then we could clear > > > > exclusive_console when reaching the stored sequence

Re: [PATCH 4.19 regression fix] printk: For early boot messages check loglevel when flushing the buffer

2018-09-12 Thread Petr Mladek
On Wed 2018-09-12 16:49:30, Sergey Senozhatsky wrote: > On (09/11/18 10:47), Petr Mladek wrote: > > > > Most problems should probably be solved when we store console_seq > > > > before setting exclusive_console. Then we could clear > > > > exclusive_console when reaching the stored sequence

Re: [PATCH 4.19 regression fix] printk: For early boot messages check loglevel when flushing the buffer

2018-09-12 Thread Sergey Senozhatsky
On (09/11/18 10:47), Petr Mladek wrote: > > Oh, that was intentional. I consider repeated messages to be less > > problematic than the missing ones. > > It makes some sense. But it might be problematic with slow consoles. Right. And this is why I brought up Jan's patch. And I agree that we

Re: [PATCH 4.19 regression fix] printk: For early boot messages check loglevel when flushing the buffer

2018-09-12 Thread Sergey Senozhatsky
On (09/11/18 10:47), Petr Mladek wrote: > > Oh, that was intentional. I consider repeated messages to be less > > problematic than the missing ones. > > It makes some sense. But it might be problematic with slow consoles. Right. And this is why I brought up Jan's patch. And I agree that we

Re: [PATCH 4.19 regression fix] printk: For early boot messages check loglevel when flushing the buffer

2018-09-11 Thread Petr Mladek
On Tue 2018-09-11 11:30:39, Sergey Senozhatsky wrote: > On (09/10/18 16:57), Petr Mladek wrote: > > > > Good catch. > > > > > --- > > > > > > diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c > > > index c036f128cdc3..ede29a7ba6db 100644 > > > --- a/kernel/printk/printk.c > > > +++

Re: [PATCH 4.19 regression fix] printk: For early boot messages check loglevel when flushing the buffer

2018-09-11 Thread Petr Mladek
On Tue 2018-09-11 11:30:39, Sergey Senozhatsky wrote: > On (09/10/18 16:57), Petr Mladek wrote: > > > > Good catch. > > > > > --- > > > > > > diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c > > > index c036f128cdc3..ede29a7ba6db 100644 > > > --- a/kernel/printk/printk.c > > > +++

Re: [PATCH 4.19 regression fix] printk: For early boot messages check loglevel when flushing the buffer

2018-09-10 Thread Sergey Senozhatsky
On (09/10/18 16:57), Petr Mladek wrote: > > Good catch. > > > --- > > > > diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c > > index c036f128cdc3..ede29a7ba6db 100644 > > --- a/kernel/printk/printk.c > > +++ b/kernel/printk/printk.c > > @@ -2545,6 +2545,7 @@ void

Re: [PATCH 4.19 regression fix] printk: For early boot messages check loglevel when flushing the buffer

2018-09-10 Thread Sergey Senozhatsky
On (09/10/18 16:57), Petr Mladek wrote: > > Good catch. > > > --- > > > > diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c > > index c036f128cdc3..ede29a7ba6db 100644 > > --- a/kernel/printk/printk.c > > +++ b/kernel/printk/printk.c > > @@ -2545,6 +2545,7 @@ void

Re: [PATCH 4.19 regression fix] printk: For early boot messages check loglevel when flushing the buffer

2018-09-10 Thread Hans de Goede
Hi, On 10-09-18 16:57, Petr Mladek wrote: On Fri 2018-09-07 13:21:32, Sergey Senozhatsky wrote: On (09/06/18 16:28), Petr Mladek wrote: On Thu 2018-09-06 16:29:40, Sergey Senozhatsky wrote: On (09/05/18 13:02), Petr Mladek wrote: Note that the first registered console prints all messages

Re: [PATCH 4.19 regression fix] printk: For early boot messages check loglevel when flushing the buffer

2018-09-10 Thread Hans de Goede
Hi, On 10-09-18 16:57, Petr Mladek wrote: On Fri 2018-09-07 13:21:32, Sergey Senozhatsky wrote: On (09/06/18 16:28), Petr Mladek wrote: On Thu 2018-09-06 16:29:40, Sergey Senozhatsky wrote: On (09/05/18 13:02), Petr Mladek wrote: Note that the first registered console prints all messages

Re: [PATCH 4.19 regression fix] printk: For early boot messages check loglevel when flushing the buffer

2018-09-10 Thread Petr Mladek
On Fri 2018-09-07 13:21:32, Sergey Senozhatsky wrote: > On (09/06/18 16:28), Petr Mladek wrote: > > On Thu 2018-09-06 16:29:40, Sergey Senozhatsky wrote: > > > On (09/05/18 13:02), Petr Mladek wrote: > > > > Note that the first registered console prints all messages > > > > even without this flag.

Re: [PATCH 4.19 regression fix] printk: For early boot messages check loglevel when flushing the buffer

2018-09-10 Thread Petr Mladek
On Fri 2018-09-07 13:21:32, Sergey Senozhatsky wrote: > On (09/06/18 16:28), Petr Mladek wrote: > > On Thu 2018-09-06 16:29:40, Sergey Senozhatsky wrote: > > > On (09/05/18 13:02), Petr Mladek wrote: > > > > Note that the first registered console prints all messages > > > > even without this flag.

Re: [PATCH 4.19 regression fix] printk: For early boot messages check loglevel when flushing the buffer

2018-09-06 Thread Sergey Senozhatsky
On (09/06/18 16:28), Petr Mladek wrote: > On Thu 2018-09-06 16:29:40, Sergey Senozhatsky wrote: > > On (09/05/18 13:02), Petr Mladek wrote: > > > Note that the first registered console prints all messages > > > even without this flag. > > > > Hmm, OK, interesting point. > > > > I assumed that

Re: [PATCH 4.19 regression fix] printk: For early boot messages check loglevel when flushing the buffer

2018-09-06 Thread Sergey Senozhatsky
On (09/06/18 16:28), Petr Mladek wrote: > On Thu 2018-09-06 16:29:40, Sergey Senozhatsky wrote: > > On (09/05/18 13:02), Petr Mladek wrote: > > > Note that the first registered console prints all messages > > > even without this flag. > > > > Hmm, OK, interesting point. > > > > I assumed that

Re: [PATCH 4.19 regression fix] printk: For early boot messages check loglevel when flushing the buffer

2018-09-06 Thread kbuild test robot
Hi Hans, I love your patch! Yet something to improve: [auto build test ERROR on linus/master] [also build test ERROR on v4.19-rc2 next-20180906] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url:

Re: [PATCH 4.19 regression fix] printk: For early boot messages check loglevel when flushing the buffer

2018-09-06 Thread kbuild test robot
Hi Hans, I love your patch! Yet something to improve: [auto build test ERROR on linus/master] [also build test ERROR on v4.19-rc2 next-20180906] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url:

Re: [PATCH 4.19 regression fix] printk: For early boot messages check loglevel when flushing the buffer

2018-09-06 Thread Petr Mladek
On Wed 2018-09-05 17:20:53, Hans de Goede wrote: > HI, > > On 05-09-18 13:02, Petr Mladek wrote: > > On Wed 2018-09-05 17:33:26, Sergey Senozhatsky wrote: > > > On (09/05/18 14:36), Sergey Senozhatsky wrote: > > > > > > > > Just a demonstration of the idea. It does not look very good, tho. > > >

Re: [PATCH 4.19 regression fix] printk: For early boot messages check loglevel when flushing the buffer

2018-09-06 Thread Petr Mladek
On Wed 2018-09-05 17:20:53, Hans de Goede wrote: > HI, > > On 05-09-18 13:02, Petr Mladek wrote: > > On Wed 2018-09-05 17:33:26, Sergey Senozhatsky wrote: > > > On (09/05/18 14:36), Sergey Senozhatsky wrote: > > > > > > > > Just a demonstration of the idea. It does not look very good, tho. > > >

Re: [PATCH 4.19 regression fix] printk: For early boot messages check loglevel when flushing the buffer

2018-09-06 Thread Petr Mladek
On Thu 2018-09-06 16:29:40, Sergey Senozhatsky wrote: > On (09/05/18 13:02), Petr Mladek wrote: > > Note that the first registered console prints all messages > > even without this flag. > > Hmm, OK, interesting point. > > I assumed that the first console usually has CON_PRINTBUFFER bit set. >

Re: [PATCH 4.19 regression fix] printk: For early boot messages check loglevel when flushing the buffer

2018-09-06 Thread Petr Mladek
On Thu 2018-09-06 16:29:40, Sergey Senozhatsky wrote: > On (09/05/18 13:02), Petr Mladek wrote: > > Note that the first registered console prints all messages > > even without this flag. > > Hmm, OK, interesting point. > > I assumed that the first console usually has CON_PRINTBUFFER bit set. >

Re: [PATCH 4.19 regression fix] printk: For early boot messages check loglevel when flushing the buffer

2018-09-06 Thread Sergey Senozhatsky
On (09/05/18 13:02), Petr Mladek wrote: > Note that the first registered console prints all messages > even without this flag. Hmm, OK, interesting point. I assumed that the first console usually has CON_PRINTBUFFER bit set. Or even a CON_PRINTBUFFER | CON_ANYTIME combo. E.g. 8250. It sort of

Re: [PATCH 4.19 regression fix] printk: For early boot messages check loglevel when flushing the buffer

2018-09-06 Thread Sergey Senozhatsky
On (09/05/18 13:02), Petr Mladek wrote: > Note that the first registered console prints all messages > even without this flag. Hmm, OK, interesting point. I assumed that the first console usually has CON_PRINTBUFFER bit set. Or even a CON_PRINTBUFFER | CON_ANYTIME combo. E.g. 8250. It sort of

Re: [PATCH 4.19 regression fix] printk: For early boot messages check loglevel when flushing the buffer

2018-09-05 Thread Hans de Goede
HI, On 05-09-18 13:02, Petr Mladek wrote: On Wed 2018-09-05 17:33:26, Sergey Senozhatsky wrote: On (09/05/18 14:36), Sergey Senozhatsky wrote: Just a demonstration of the idea. It does not look very good, tho. I'd rather have just one suppress_message_printing() in printk code. // This is

Re: [PATCH 4.19 regression fix] printk: For early boot messages check loglevel when flushing the buffer

2018-09-05 Thread Hans de Goede
HI, On 05-09-18 13:02, Petr Mladek wrote: On Wed 2018-09-05 17:33:26, Sergey Senozhatsky wrote: On (09/05/18 14:36), Sergey Senozhatsky wrote: Just a demonstration of the idea. It does not look very good, tho. I'd rather have just one suppress_message_printing() in printk code. // This is

Re: [PATCH 4.19 regression fix] printk: For early boot messages check loglevel when flushing the buffer

2018-09-05 Thread Petr Mladek
On Wed 2018-09-05 17:33:26, Sergey Senozhatsky wrote: > On (09/05/18 14:36), Sergey Senozhatsky wrote: > > > > Just a demonstration of the idea. It does not look very good, tho. > > I'd rather have just one suppress_message_printing() in printk code. > > > > // This is not a proposed patch,

Re: [PATCH 4.19 regression fix] printk: For early boot messages check loglevel when flushing the buffer

2018-09-05 Thread Petr Mladek
On Wed 2018-09-05 17:33:26, Sergey Senozhatsky wrote: > On (09/05/18 14:36), Sergey Senozhatsky wrote: > > > > Just a demonstration of the idea. It does not look very good, tho. > > I'd rather have just one suppress_message_printing() in printk code. > > > > // This is not a proposed patch,

Re: [PATCH 4.19 regression fix] printk: For early boot messages check loglevel when flushing the buffer

2018-09-05 Thread Sergey Senozhatsky
On (09/05/18 14:36), Sergey Senozhatsky wrote: > > Just a demonstration of the idea. It does not look very good, tho. > I'd rather have just one suppress_message_printing() in printk code. > > // This is not a proposed patch, hence the 80-cols violation. > > --- > > diff --git

Re: [PATCH 4.19 regression fix] printk: For early boot messages check loglevel when flushing the buffer

2018-09-05 Thread Sergey Senozhatsky
On (09/05/18 14:36), Sergey Senozhatsky wrote: > > Just a demonstration of the idea. It does not look very good, tho. > I'd rather have just one suppress_message_printing() in printk code. > > // This is not a proposed patch, hence the 80-cols violation. > > --- > > diff --git

Re: [PATCH 4.19 regression fix] printk: For early boot messages check loglevel when flushing the buffer

2018-09-04 Thread Sergey Senozhatsky
On (09/05/18 14:36), Sergey Senozhatsky wrote: > > OK, thanks for the report! > So I think that your case is CON_PRINTBUFFER related as well. We have > a number of logbuf messages before we parse quiet and console_loglevel. > Those messages pass the suppress_message() test. Then when we finally >

Re: [PATCH 4.19 regression fix] printk: For early boot messages check loglevel when flushing the buffer

2018-09-04 Thread Sergey Senozhatsky
On (09/05/18 14:36), Sergey Senozhatsky wrote: > > OK, thanks for the report! > So I think that your case is CON_PRINTBUFFER related as well. We have > a number of logbuf messages before we parse quiet and console_loglevel. > Those messages pass the suppress_message() test. Then when we finally >

Re: [PATCH 4.19 regression fix] printk: For early boot messages check loglevel when flushing the buffer

2018-09-04 Thread Sergey Senozhatsky
On (09/05/18 06:53), Hans de Goede wrote: > > > > Do you use earlycon? > > No, I'm seeing this with the regular/normal console stuff. OK, thanks for the report! So I think that your case is CON_PRINTBUFFER related as well. We have a number of logbuf messages before we parse quiet and

Re: [PATCH 4.19 regression fix] printk: For early boot messages check loglevel when flushing the buffer

2018-09-04 Thread Sergey Senozhatsky
On (09/05/18 06:53), Hans de Goede wrote: > > > > Do you use earlycon? > > No, I'm seeing this with the regular/normal console stuff. OK, thanks for the report! So I think that your case is CON_PRINTBUFFER related as well. We have a number of logbuf messages before we parse quiet and

Re: [PATCH 4.19 regression fix] printk: For early boot messages check loglevel when flushing the buffer

2018-09-04 Thread Hans de Goede
Hi, On 05-09-18 04:35, Sergey Senozhatsky wrote: Hi, On (09/04/18 20:01), Hans de Goede wrote: Commit 375899cddcbb ("printk: make sure to print log on console."), moved the checking of the loglevel of messages from flush time to the actual log time. This introduces one problem, some early

Re: [PATCH 4.19 regression fix] printk: For early boot messages check loglevel when flushing the buffer

2018-09-04 Thread Hans de Goede
Hi, On 05-09-18 04:35, Sergey Senozhatsky wrote: Hi, On (09/04/18 20:01), Hans de Goede wrote: Commit 375899cddcbb ("printk: make sure to print log on console."), moved the checking of the loglevel of messages from flush time to the actual log time. This introduces one problem, some early

Re: [PATCH 4.19 regression fix] printk: For early boot messages check loglevel when flushing the buffer

2018-09-04 Thread Sergey Senozhatsky
Hi, On (09/04/18 20:01), Hans de Goede wrote: > Commit 375899cddcbb ("printk: make sure to print log on console."), moved > the checking of the loglevel of messages from flush time to the actual > log time. > > This introduces one problem, some early boot messages are printed before >

Re: [PATCH 4.19 regression fix] printk: For early boot messages check loglevel when flushing the buffer

2018-09-04 Thread Sergey Senozhatsky
Hi, On (09/04/18 20:01), Hans de Goede wrote: > Commit 375899cddcbb ("printk: make sure to print log on console."), moved > the checking of the loglevel of messages from flush time to the actual > log time. > > This introduces one problem, some early boot messages are printed before >

[PATCH 4.19 regression fix] printk: For early boot messages check loglevel when flushing the buffer

2018-09-04 Thread Hans de Goede
Commit 375899cddcbb ("printk: make sure to print log on console."), moved the checking of the loglevel of messages from flush time to the actual log time. This introduces one problem, some early boot messages are printed before parse_early_param() gets called and thus before kernel commandline

[PATCH 4.19 regression fix] printk: For early boot messages check loglevel when flushing the buffer

2018-09-04 Thread Hans de Goede
Commit 375899cddcbb ("printk: make sure to print log on console."), moved the checking of the loglevel of messages from flush time to the actual log time. This introduces one problem, some early boot messages are printed before parse_early_param() gets called and thus before kernel commandline