From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754487AbcJEBhB (ORCPT ); Tue, 4 Oct 2016 21:37:01 -0400 Received: from mail-pa0-f66.google.com ([209.85.220.66]:36059 "EHLO mail-pa0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754392AbcJEBhA (ORCPT ); Tue, 4 Oct 2016 21:37:00 -0400 Date: Wed, 5 Oct 2016 10:36:57 +0900 From: Sergey Senozhatsky To: Petr Mladek Cc: Sergey Senozhatsky , Sergey Senozhatsky , Jan Kara , Andrew Morton , Tejun Heo , Calvin Owens , linux-kernel@vger.kernel.org Subject: Re: [RFC][PATCH 6/7] printk: use alternative printk buffers Message-ID: <20161005013657.GB9539@swordfish> References: <20160927142237.5539-1-sergey.senozhatsky@gmail.com> <20160927142237.5539-7-sergey.senozhatsky@gmail.com> <20160929130000.GE26796@pathway.suse.cz> <20160930011544.GC547@swordfish> <20160930111546.GI26796@pathway.suse.cz> <20161001024829.GB527@swordfish> <20161004122226.GE13369@pathway.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20161004122226.GE13369@pathway.suse.cz> User-Agent: Mutt/1.7.0 (2016-08-17) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On (10/04/16 14:22), Petr Mladek wrote: [..] > if (retry && console_trylock()) > goto again; > > with a safe variant, something like > > if (retry) { > local_irq_save(flags); > alt_printk_enter(); > lock_failed = console_trylock(); > alt_printk_exit(); > local_irq_restore(flags); > > if (!lock_failed) > goto again; > } > > Or do I miss anything? nope, you don't. that's close to what I do in v3. > I am going to look at the second version of the patchset. thanks a lot for your review! I'll refresh the patch set a bit later this week. I think it's more or less in shape now.... well, still under the old name: alt_printk. -ss