From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758974AbcCVOEa (ORCPT ); Tue, 22 Mar 2016 10:04:30 -0400 Received: from mx2.suse.de ([195.135.220.15]:37859 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758766AbcCVOE3 (ORCPT ); Tue, 22 Mar 2016 10:04:29 -0400 Date: Tue, 22 Mar 2016 15:04:27 +0100 From: Petr Mladek To: Sergey Senozhatsky Cc: Andrew Morton , Jan Kara , Tejun Heo , Tetsuo Handa , linux-kernel@vger.kernel.org, Byungchul Park , Sergey Senozhatsky , Jan Kara Subject: Re: [RFC][PATCH v6 1/2] printk: Make printk() completely async Message-ID: <20160322140427.GS22171@pathway.suse.cz> References: <1458581130-8677-1-git-send-email-sergey.senozhatsky@gmail.com> <1458581130-8677-2-git-send-email-sergey.senozhatsky@gmail.com> <20160322131106.GA5522@pathway.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160322131106.GA5522@pathway.suse.cz> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue 2016-03-22 14:11:06, Petr Mladek wrote: > On Tue 2016-03-22 02:25:29, Sergey Senozhatsky wrote: > > +static void wake_up_klogd_work_func(struct irq_work *irq_work) > > +{ > > + int pending = __this_cpu_xchg(printk_pending, 0); > > + > > + if (pending & PRINTK_PENDING_OUTPUT) { > > + /* If trylock fails, someone else is doing the printing */ > > + if (console_trylock()) > > + console_unlock(); > > This is called from IRQ context and thus keeps the original problem > for printk_deferred(). We should try to > wake_up_process(printk_kthread) when allowed. > > if (pending & PRINTK_PENDING_OUTPUT) { > if (printk_sync || !printk_kthread) { > /* If trylock fails, someone else is printing. */ > if (console_trylock()) > console_unlock(); > } else { > wake_up_process(printk_kthread); > } > } Ah, this is in the 2nd patch. I am sorry for the noise. Best Regards, Petr