Messages in this thread | | | From | John Ogness <> | Subject | Re: recursion handling: Re: [PATCH next v2 3/3] printk: remove logbuf_lock, add syslog_lock | Date | Sun, 06 Dec 2020 23:23:22 +0106 |
| |
On 2020-12-05, Sergey Senozhatsky <sergey.senozhatsky@gmail.com> wrote: >> One reason is the use of per-cpu variables. Alternative solution would >> be to store printk_context into task_struct. > > We can keep per-CPU, disable preemption and have counters for > every context (task, soft/hard irq, NMI). Shouldn't be a problem
These contexts are difficult to track correctly for all the preemption models (especially when PREEMPT_RT is included). But I will look into this idea. It would be nice to keep interrupts enabled for that first vsnprintf() in vprintk_store().
John Ogness
| |