Re: [PATCH v2] printk: Relocate wake_klogd check close to the end of console_unlock()

2018-02-25 Thread Sergey Senozhatsky
Hello, Sorry for the delay. Could not reply sooner. On (02/19/18 16:58), Petr Mladek wrote: [..] > > @@ -2417,12 +2413,17 @@ void console_unlock(void) > > up_console_sem(); > > > > /* > > -* Someone could have filled up the buffer again, so re-check if there's > > -* something

Re: [PATCH v2] printk: Relocate wake_klogd check close to the end of console_unlock()

2018-02-19 Thread Petr Mladek
On Thu 2018-02-08 14:04:02, Petr Mladek wrote: > From: Tejun Heo > > We mark for waking up klogd whenever we see a new message sequence in > the main loop. However, the actual wakeup is always at the end of the > function and we can easily test for the wakeup condition when we do > the final sho

Re: [PATCH v2] printk: Relocate wake_klogd check close to the end of console_unlock()

2018-02-09 Thread Sergey Senozhatsky
Hello, On (02/09/18 11:39), Petr Mladek wrote: > On Fri 2018-02-09 12:28:30, Sergey Senozhatsky wrote: > > On (02/08/18 17:48), Petr Mladek wrote: > > By postponing klogd wakeup we don't really address logbuf_lock > > contention. We have no guarantees that no new printk will come > > while klogd i

Re: [PATCH v2] printk: Relocate wake_klogd check close to the end of console_unlock()

2018-02-09 Thread Petr Mladek
On Fri 2018-02-09 12:28:30, Sergey Senozhatsky wrote: > On (02/08/18 17:48), Petr Mladek wrote: > > Note that we need Tejun's patch for-4.16 because it fixes a potential > > race introduced by the console waiter logic. > > I understand it. I think I put my Reviewed-by on v1, maybe not... > Here it

Re: [PATCH v2] printk: Relocate wake_klogd check close to the end of console_unlock()

2018-02-09 Thread Petr Mladek
On Fri 2018-02-09 12:28:30, Sergey Senozhatsky wrote: > On (02/08/18 17:48), Petr Mladek wrote: > By postponing klogd wakeup we don't really address logbuf_lock > contention. We have no guarantees that no new printk will come > while klogd is active. Besides, consoles don't really delay > klogd - I

Re: [PATCH v2] printk: Relocate wake_klogd check close to the end of console_unlock()

2018-02-08 Thread Sergey Senozhatsky
On (02/08/18 17:48), Petr Mladek wrote: [..] > > > > I need to do more "research" on this. I though about it some time ago, > > and I think that waking up klogd _only_ when we don't have any pending > > logbuf messages still can be pretty late. Can't it? We can spin in > > console_unlock() printin

Re: [PATCH v2] printk: Relocate wake_klogd check close to the end of console_unlock()

2018-02-08 Thread Petr Mladek
On Thu 2018-02-08 23:53:07, Sergey Senozhatsky wrote: > On (02/08/18 14:04), Petr Mladek wrote: > > We mark for waking up klogd whenever we see a new message sequence in > > the main loop. However, the actual wakeup is always at the end of the > > function and we can easily test for the wakeup con

Re: [PATCH v2] printk: Relocate wake_klogd check close to the end of console_unlock()

2018-02-08 Thread Sergey Senozhatsky
On (02/08/18 14:04), Petr Mladek wrote: > We mark for waking up klogd whenever we see a new message sequence in > the main loop. However, the actual wakeup is always at the end of the > function and we can easily test for the wakeup condition when we do > the final should-we-repeat check. > > Mov

[PATCH v2] printk: Relocate wake_klogd check close to the end of console_unlock()

2018-02-08 Thread Petr Mladek
From: Tejun Heo We mark for waking up klogd whenever we see a new message sequence in the main loop. However, the actual wakeup is always at the end of the function and we can easily test for the wakeup condition when we do the final should-we-repeat check. Move the wake_klogd condition check o