lkml.org 
[lkml]   [2016]   [Oct]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC][PATCHv2 3/7] printk: introduce per-cpu alt_print seq buffer
On Sat 2016-10-08 04:40:15, Sergey Senozhatsky wrote:
> On (10/06/16 16:56), Petr Mladek wrote:
> > The question is whether we need to store the flags in
> > a per-CPU variable. We might also store it on the stack
> > of the enter()/exit() function caller. I mean something like
>
> yes, let's keep it on the stack. this particular implementation
> was just an experiment, and I hate it. what I currently have in
> my tree:
>
> #define alt_printk_enter(flags) \
> do { \
> local_irq_save(flags); \
> __alt_printk_enter(); \
> } while (0)
>
> #define alt_printk_exit(flags) \
> do { \
> __alt_printk_exit(); \
> local_irq_restore(flags); \
> } while (0)

Looks fine to me.

Best Regards,
Petr

\
 
 \ /
  Last update: 2016-10-10 13:04    [W:0.093 / U:0.008 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site