From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752458AbcJJLEC (ORCPT ); Mon, 10 Oct 2016 07:04:02 -0400 Received: from mx2.suse.de ([195.135.220.15]:33037 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752026AbcJJLEB (ORCPT ); Mon, 10 Oct 2016 07:04:01 -0400 Date: Mon, 10 Oct 2016 13:03:58 +0200 From: Petr Mladek To: Sergey Senozhatsky Cc: Jan Kara , Andrew Morton , Tejun Heo , Calvin Owens , Thomas Gleixner , Mel Gorman , Steven Rostedt , linux-kernel@vger.kernel.org, Sergey Senozhatsky Subject: Re: [RFC][PATCHv2 3/7] printk: introduce per-cpu alt_print seq buffer Message-ID: <20161010110358.GI23809@pathway.suse.cz> References: <20160930151758.8965-1-sergey.senozhatsky@gmail.com> <20160930151758.8965-4-sergey.senozhatsky@gmail.com> <20161001022415.GA527@swordfish> <20161006145656.GH13369@pathway.suse.cz> <20161007194015.GB3496@swordfish> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20161007194015.GB3496@swordfish> 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 Sat 2016-10-08 04:40:15, Sergey Senozhatsky wrote: > On (10/06/16 16:56), Petr Mladek wrote: > > The question is whether we need to store the flags in > > a per-CPU variable. We might also store it on the stack > > of the enter()/exit() function caller. I mean something like > > yes, let's keep it on the stack. this particular implementation > was just an experiment, and I hate it. what I currently have in > my tree: > > #define alt_printk_enter(flags) \ > do { \ > local_irq_save(flags); \ > __alt_printk_enter(); \ > } while (0) > > #define alt_printk_exit(flags) \ > do { \ > __alt_printk_exit(); \ > local_irq_restore(flags); \ > } while (0) Looks fine to me. Best Regards, Petr