Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1477109
| From | Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v10 1/2] printk: Make printk() completely async |
| Date | 2016-09-06 09:20 +0200 |
| Message-ID | <seiPL-7bK-1@gated-at.bofh.it> (permalink) |
| References | (5 earlier) <sca9X-E9-7@gated-at.bofh.it> <scdhw-2vG-17@gated-at.bofh.it> <scw0N-7nt-23@gated-at.bofh.it> <scRyh-51C-1@gated-at.bofh.it> <scYq5-16w-23@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Hello,
On (09/02/16 17:15), Petr Mladek wrote:
[..]
> > I meant that this thing
> >
> > local_irq_save() // or preempt_disable()
> > ...
> > if (console_trylock())
> > console_unlock();
> > ...
> > local_irq_restore() // or preempt_enable()
>
> I see.
>
> > can easily lockup the system if console_trylock() was successful and there
> > are enough messages to print. printk_kthread can't help, because here we
> > basically enforce the `old' behavior. we have async printk, but not async
> > console output. tweaking console_unlock() to offload the actual printing loop
> > to printk_kthread would make the entire console output async:
> >
> > static void console_sync_flush_and_unlock(void)
> > {
> > for (;;) {
> > ...
> > call_console_drivers();
> > ...
> > }
> > }
> >
> > void console_unlock(void)
> > {
> > if (!MOTORMOUTH && can_printk_async()) {
> > up();
> > wake_up_process(printk_kthread);
> > return;
> > }
> > console_sync_flush_and_unlock();
> > }
>
> Something like this would make sense. But I would do it in a separate
> patch(set). We need to go through all console_unlock() callers and
> make sure that they are fine with the potential async behavior.
> I would not complicate the async printk patchset by this.
sure. just added one more item to the list.
-ss
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
Re: [PATCH v10 1/2] printk: Make printk() completely async Petr Mladek <pmladek@suse.com> - 2016-08-25 23:30 +0200
Re: [PATCH v10 1/2] printk: Make printk() completely async Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com> - 2016-08-26 04:00 +0200
Re: [PATCH v10 1/2] printk: Make printk() completely async Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com> - 2016-08-26 10:30 +0200
Re: [PATCH v10 1/2] printk: Make printk() completely async Petr Mladek <pmladek@suse.com> - 2016-08-30 11:30 +0200
Re: [PATCH v10 1/2] printk: Make printk() completely async Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com> - 2016-08-31 04:40 +0200
Re: [PATCH v10 1/2] printk: Make printk() completely async Petr Mladek <pmladek@suse.com> - 2016-08-31 11:40 +0200
Re: [PATCH v10 1/2] printk: Make printk() completely async Sergey Senozhatsky <sergey.senozhatsky@gmail.com> - 2016-08-31 15:00 +0200
Re: [PATCH v10 1/2] printk: Make printk() completely async Petr Mladek <pmladek@suse.com> - 2016-09-01 11:00 +0200
Re: [PATCH v10 1/2] printk: Make printk() completely async Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com> - 2016-09-02 10:00 +0200
Re: [PATCH v10 1/2] printk: Make printk() completely async Petr Mladek <pmladek@suse.com> - 2016-09-02 17:20 +0200
Re: [PATCH v10 1/2] printk: Make printk() completely async Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com> - 2016-09-06 09:20 +0200
csiph-web