Re: [PATCH v2 2/3] printk: Create helper function to queue deferred console handling

2018-06-27 Thread Sergey Senozhatsky
On (06/28/18 11:16), Sergey Senozhatsky wrote: > > You can just call vprintk_emit(LOGLEVEL_SCHED) from vprintk_func(), > then you don't need to factor out vprintk_deferred() and vprintk_emit(). > Any reason for that split? My bad, no you can't. I forgot that for direct_nmi vprintk_func()

Re: [PATCH v2 2/3] printk: Create helper function to queue deferred console handling

2018-06-27 Thread Sergey Senozhatsky
On (06/28/18 11:16), Sergey Senozhatsky wrote: > > You can just call vprintk_emit(LOGLEVEL_SCHED) from vprintk_func(), > then you don't need to factor out vprintk_deferred() and vprintk_emit(). > Any reason for that split? My bad, no you can't. I forgot that for direct_nmi vprintk_func()

Re: [PATCH v2 2/3] printk: Create helper function to queue deferred console handling

2018-06-27 Thread Sergey Senozhatsky
On (06/27/18 16:08), Petr Mladek wrote: > -int vprintk_deferred(const char *fmt, va_list args) > +void defer_console(void) > { > - int r; > - > - r = vprintk_emit(0, LOGLEVEL_SCHED, NULL, 0, fmt, args); > - > preempt_disable(); > __this_cpu_or(printk_pending,

Re: [PATCH v2 2/3] printk: Create helper function to queue deferred console handling

2018-06-27 Thread Sergey Senozhatsky
On (06/27/18 16:08), Petr Mladek wrote: > -int vprintk_deferred(const char *fmt, va_list args) > +void defer_console(void) > { > - int r; > - > - r = vprintk_emit(0, LOGLEVEL_SCHED, NULL, 0, fmt, args); > - > preempt_disable(); > __this_cpu_or(printk_pending,

[PATCH v2 2/3] printk: Create helper function to queue deferred console handling

2018-06-27 Thread Petr Mladek
It is just a preparation step. The patch does not change the existing behavior. Signed-off-by: Petr Mladek --- kernel/printk/printk.c | 14 +- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c index

[PATCH v2 2/3] printk: Create helper function to queue deferred console handling

2018-06-27 Thread Petr Mladek
It is just a preparation step. The patch does not change the existing behavior. Signed-off-by: Petr Mladek --- kernel/printk/printk.c | 14 +- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c index