From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752335AbdF3Mup (ORCPT ); Fri, 30 Jun 2017 08:50:45 -0400 Received: from mail-pg0-f67.google.com ([74.125.83.67]:34545 "EHLO mail-pg0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751912AbdF3Mun (ORCPT ); Fri, 30 Jun 2017 08:50:43 -0400 Date: Fri, 30 Jun 2017 21:50:44 +0900 From: Sergey Senozhatsky To: Tetsuo Handa Cc: sergey.senozhatsky.work@gmail.com, pmladek@suse.com, sergey.senozhatsky@gmail.com, rostedt@goodmis.org, jack@suse.cz, akpm@linux-foundation.org, peterz@infradead.org, rjw@rjwysocki.net, ebiederm@xmission.com, gregkh@linuxfoundation.org, jslaby@suse.com, pavel@ucw.cz, andi@lisas.de, linux-kernel@vger.kernel.org Subject: Re: [RFC][PATCHv3 2/5] printk: introduce printing kernel thread Message-ID: <20170630125044.GC792@jagdpanzerIV.localdomain> References: <20170628121925.GN1538@pathway.suse.cz> <20170629073321.GA475@jagdpanzerIV.localdomain> <20170630070131.GA474@jagdpanzerIV.localdomain> <201706301918.HFI17946.JtOFLOFQSHOMFV@I-love.SAKURA.ne.jp> <20170630115710.GB474@jagdpanzerIV.localdomain> <201706302135.ABB57326.OMOSFVHLJOFtFQ@I-love.SAKURA.ne.jp> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201706302135.ABB57326.OMOSFVHLJOFtFQ@I-love.SAKURA.ne.jp> User-Agent: Mutt/1.8.3 (2017-05-23) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On (06/30/17 21:35), Tetsuo Handa wrote: > Date: Fri, 30 Jun 2017 21:35:28 +0900 > From: Tetsuo Handa > To: sergey.senozhatsky.work@gmail.com > Cc: pmladek@suse.com, sergey.senozhatsky@gmail.com, rostedt@goodmis.org, > jack@suse.cz, akpm@linux-foundation.org, peterz@infradead.org, > rjw@rjwysocki.net, ebiederm@xmission.com, gregkh@linuxfoundation.org, > jslaby@suse.com, pavel@ucw.cz, andi@lisas.de, linux-kernel@vger.kernel.org > Subject: Re: [RFC][PATCHv3 2/5] printk: introduce printing kernel thread > X-Mailer: Winbiff [Version 2.51 PL2] > > Sergey Senozhatsky wrote: > > On (06/30/17 19:18), Tetsuo Handa wrote: > > > > I'm still thinking about Steven's proposals; but we will need offloading > > > > anyways, so the bits we are talking about here are important regardless > > > > the direction printk design will take, I think. > > > > > > Is there a chance that printk() waits for only data queued by that printk() > > > call (exception will be printk() from NMI). > > > > hm, I don't think this can be done easily... consider > > > > console_lock(); > > printk(); > > printk(); > > ... -> this guys will wait forever. nothing > > flushes the logbuf. > > printk(); > > console_unlock(); > > Can't we remove console_lock()/console_unlock() from printk() ? we can't... well, we can... and there are some ideas but we are years away from all it becoming reality. console_sem is the giant and major lock that fbcon, drm, tty and so on are using. please see a sub-thread starting from here: https://lists.linuxfoundation.org/pipermail/ksummit-discuss/2017-June/004389.html > I think that printk() depends on console_unlock() is complicating. it absolutely is. -ss