From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753293AbcCNBUg (ORCPT ); Sun, 13 Mar 2016 21:20:36 -0400 Received: from mail-pf0-f196.google.com ([209.85.192.196]:35888 "EHLO mail-pf0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752736AbcCNBUf (ORCPT ); Sun, 13 Mar 2016 21:20:35 -0400 Date: Mon, 14 Mar 2016 10:21:57 +0900 From: Sergey Senozhatsky To: Byungchul Park Cc: akpm@linux-foundation.org, mingo@kernel.org, linux-kernel@vger.kernel.org, akinobu.mita@gmail.com, jack@suse.cz, sergey.senozhatsky.work@gmail.com, peter@hurleysoftware.com, tglx@linutronix.de, peterz@infradead.org, rostedt@goodmis.org Subject: Re: [PATCH v6 1/2] printk: Factor out buffering and irq work queuing in printk_deferred Message-ID: <20160314012157.GA8074@swordfish> References: <1457692627-14076-1-git-send-email-byungchul.park@lge.com> <1457692627-14076-2-git-send-email-byungchul.park@lge.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1457692627-14076-2-git-send-email-byungchul.park@lge.com> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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