Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1363251

Re: [RFC][PATCH v6 1/2] printk: Make printk() completely async

From Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>
Newsgroups linux.kernel
Subject Re: [RFC][PATCH v6 1/2] printk: Make printk() completely async
Date 2016-03-23 09:50 +0100
Message-ID <rfMEi-Or-5@gated-at.bofh.it> (permalink)
References <rfbOq-qS-11@gated-at.bofh.it> <rfbOq-qS-9@gated-at.bofh.it> <rfuo2-4SV-11@gated-at.bofh.it> <rfF07-3MW-41@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On (03/23/16 09:37), Sergey Senozhatsky wrote:
[..]
> ok, I'll take a look.
> 
> eventually (after 0003) vprintk_emit() is
> 
> 	if (in_sched) {
> 		__this_cpu_or(printk_pending,
> 				PRINTK_PENDING_OUTPUT);
> 		irq_work_queue(this_cpu_ptr(&wake_up_klogd_work));
> 	}
> 	local_irq_restore(flags);
> 	if (!in_sched) {
> 		lockdep_off();
> 		if (console_trylock())
> 			console_unlock();
> 		lockdep_on();
> 	}
> 
> > I do not say that it is a "dream-of-like" code. One important thing for
> > me is that it does not use "sync_printk" variable.
> >
> > You original code modified "sync_printk" according to "in_sched" and
> > "in_panic" variables earlier in vprintk_emit. Then it again checked
> > all three variables here which produced strange twists in my head ;-)
> 

hm... may be we can do even better.
move printk_pending and irq_work_queue() back to printk_deferred() and
do the preemption magic there. so vprintk_emit() can be lighter. will
take a look later today.

	-ss

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[RFC][PATCH v6 1/2] printk: Make printk() completely async Sergey Senozhatsky <sergey.senozhatsky@gmail.com> - 2016-03-21 18:30 +0100
  Re: [RFC][PATCH v6 1/2] printk: Make printk() completely async Petr Mladek <pmladek@suse.com> - 2016-03-22 14:20 +0100
    Re: [RFC][PATCH v6 1/2] printk: Make printk() completely async Petr Mladek <pmladek@suse.com> - 2016-03-22 15:10 +0100
    Re: [RFC][PATCH v6 1/2] printk: Make printk() completely async Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com> - 2016-03-23 01:40 +0100
      Re: [RFC][PATCH v6 1/2] printk: Make printk() completely async Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com> - 2016-03-23 09:50 +0100
      Re: [RFC][PATCH v6 1/2] printk: Make printk() completely async Petr Mladek <pmladek@suse.com> - 2016-03-23 11:10 +0100
        Re: [RFC][PATCH v6 1/2] printk: Make printk() completely async Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com> - 2016-03-24 03:30 +0100
  Re: [RFC][PATCH v6 1/2] printk: Make printk() completely async Petr Mladek <pmladek@suse.com> - 2016-03-22 17:40 +0100
    Re: [RFC][PATCH v6 1/2] printk: Make printk() completely async Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com> - 2016-03-23 02:30 +0100
      Re: [RFC][PATCH v6 1/2] printk: Make printk() completely async Petr Mladek <pmladek@suse.com> - 2016-03-23 10:30 +0100
        Re: [RFC][PATCH v6 1/2] printk: Make printk() completely async Jan Kara <jack@suse.cz> - 2016-03-23 14:20 +0100
          Re: [RFC][PATCH v6 1/2] printk: Make printk() completely async Sergey Senozhatsky <sergey.senozhatsky@gmail.com> - 2016-03-23 15:40 +0100
            Re: [RFC][PATCH v6 1/2] printk: Make printk() completely async Jan Kara <jack@suse.cz> - 2016-03-23 15:50 +0100

csiph-web