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


Groups > linux.kernel > #1356803

Re: [PATCH v6 1/2] printk: Factor out buffering and irq work queuing in printk_deferred

From Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>
Newsgroups linux.kernel
Subject Re: [PATCH v6 1/2] printk: Factor out buffering and irq work queuing in printk_deferred
Date 2016-03-14 02:30 +0100
Message-ID <rcpuy-58k-3@gated-at.bofh.it> (permalink)
References <rbsE9-4Ih-13@gated-at.bofh.it> <rbsE9-4Ih-15@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Hello Byungchul,

Sorry, I'll make sure I Cc you next time. Jan Kara's updated patch set

http://marc.info/?l=linux-kernel&m=145787625506342

it's quite close to what you have done in this patch, but Jan's
patch also solves a number of more likely to happen cases.

have time to take a look?

the lock debug patch in your series is different. can we settle
down async printk first and then return to it? it's not so simple...


On (03/11/16 19:37), Byungchul Park wrote:
[..]
>  int printk_deferred(const char *fmt, ...)
>  {
>  	va_list args;
>  	int r;
>  
>  	preempt_disable();
> +
>  	va_start(args, fmt);
> -	r = vprintk_emit(0, LOGLEVEL_SCHED, NULL, 0, fmt, args);
> +	r = vprintk_deferred(fmt, args);
>  	va_end(args);
> +	printk_pending_output();
>  
> -	__this_cpu_or(printk_pending, PRINTK_PENDING_OUTPUT);
> -	irq_work_queue(this_cpu_ptr(&wake_up_klogd_work));
>  	preempt_enable();
>  
>  	return r;

vprintk_deferred() does vprintk_emit()->{spin_lock()} again? cosole_lock() is
moved out of sight, but logbug_lock is still there. wouldn't this (in the worst
case) result in endless loop after all? sorry if I'm missing something.

	-ss

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


Thread

[PATCH v6 0/2] Make printing of spin_dump() deferred to avoid a deadlock Byungchul Park <byungchul.park@lge.com> - 2016-03-11 11:40 +0100
  [PATCH v6 2/2] printk: Make printing of spin_dump() deferred to avoid a deadlock Byungchul Park <byungchul.park@lge.com> - 2016-03-11 11:40 +0100
    Re: [PATCH v6 2/2] printk: Make printing of spin_dump() deferred to  avoid a deadlock Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com> - 2016-03-14 02:40 +0100
      Re: [PATCH v6 2/2] printk: Make printing of spin_dump() deferred to  avoid a deadlock Byungchul Park <byungchul.park@lge.com> - 2016-03-14 03:40 +0100
        Re: [PATCH v6 2/2] printk: Make printing of spin_dump() deferred to  avoid a deadlock Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com> - 2016-03-14 03:40 +0100
          Re: [PATCH v6 2/2] printk: Make printing of spin_dump() deferred to  avoid a deadlock Byungchul Park <byungchul.park@lge.com> - 2016-03-14 05:20 +0100
            Re: [PATCH v6 2/2] printk: Make printing of spin_dump() deferred to  avoid a deadlock Byungchul Park <byungchul.park@lge.com> - 2016-03-16 03:10 +0100
  [PATCH v6 1/2] printk: Factor out buffering and irq work queuing in printk_deferred Byungchul Park <byungchul.park@lge.com> - 2016-03-11 11:40 +0100
    Re: [PATCH v6 1/2] printk: Factor out buffering and irq work queuing  in printk_deferred Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com> - 2016-03-14 02:30 +0100
      Re: [PATCH v6 1/2] printk: Factor out buffering and irq work queuing  in printk_deferred Byungchul Park <byungchul.park@lge.com> - 2016-03-14 05:50 +0100

csiph-web