From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753970AbcCUIuU (ORCPT ); Mon, 21 Mar 2016 04:50:20 -0400 Received: from mail-pf0-f194.google.com ([209.85.192.194]:35996 "EHLO mail-pf0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753844AbcCUIuL (ORCPT ); Mon, 21 Mar 2016 04:50:11 -0400 Date: Mon, 21 Mar 2016 17:51:34 +0900 From: Sergey Senozhatsky To: Byungchul Park Cc: Sergey Senozhatsky , Sergey Senozhatsky , Andrew Morton , Jan Kara , Petr Mladek , Tejun Heo , Tetsuo Handa , linux-kernel@vger.kernel.org, Jan Kara Subject: Re: [RFC][PATCH v5 1/2] printk: Make printk() completely async Message-ID: <20160321085134.GA504@swordfish> References: <1458483191-3596-1-git-send-email-sergey.senozhatsky@gmail.com> <1458483191-3596-2-git-send-email-sergey.senozhatsky@gmail.com> <20160321000647.GP5220@X58A-UD3R> <20160321004347.GA563@swordfish> <20160321005608.GQ5220@X58A-UD3R> <20160321073507.GA501@swordfish> <20160321080751.GA2279@X58A-UD3R> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160321080751.GA2279@X58A-UD3R> 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 On (03/21/16 17:07), Byungchul Park wrote: [..] > > > > > It will not print the "lockup suspected" message at all, for e.g. rq->lock, > > > > > p->pi_lock and any locks which are used within wake_up_process(). > > > > > > > > this will switch to old SYNC printk() mode should such a lockup ever > > > > happen, which is a giant advantage over any other implementation; doing > > > > wake_up_process() within the 'we can detect recursive printk() here' > > > > gives us better control. > > > > > > > > why > > > > printk()->IRQ->wake_up_process()->spin_dump()->printk()->IRQ->wake_up_process()->spin_dump()->printk()->IRQ... > > > > is better? > > > > > > What is IRQ? > > > > this is how printk() can print the messages in async mode apart from > > direct and wake_up_process() in vprintk_emit(). > > Do you mean IRQ work? yes. > Is there any reason why you don't put the wake_up_process() out of the > critical section I provided reasons already. > with my suggestion, even though it can solve the infinite recuresion you worried about? which is 'a static lock pointer in spin_dump()'? I don't think this will fix recursive printks. /* seems that for some reason my previous reply was not delivered. re-sending. */ -ss