From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=3.0 tests=BAYES_00, BUG6152_INVALID_DATE_TZ_ABSURD,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS,INVALID_DATE_TZ_ABSURD,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 42AE4C433FE for ; Sun, 6 Dec 2020 20:46:04 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id E24B922D08 for ; Sun, 6 Dec 2020 20:46:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727703AbgLFUpm (ORCPT ); Sun, 6 Dec 2020 15:45:42 -0500 Received: from Galois.linutronix.de ([193.142.43.55]:60010 "EHLO galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726731AbgLFUpm (ORCPT ); Sun, 6 Dec 2020 15:45:42 -0500 From: John Ogness DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1607287500; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=9VZi8ujgSXh7HIp+A/M1SLGnPCwni73lR3eHRtUwCWY=; b=ofok/O4wUx96kxGzktfjjsXjM0RwhH5BYoBhxBzcZxXhL5QTp+3pQhH/ZKf5DH4AXZVSxm DVTO5lAFQEseZRlV4vrp9mIbySJpf0zj9kUSrTehE1dH2boD7rRMUraJpcGzXo9usxFDCv J2rZBWYHGi+ucY3pxRAxuxqmnUVAWrk9KYLVaOOjFo33Ugtv+5Hib04YRnTDm7g9hTciE1 lJ33iOh8MyJBaA/bReBRhnNhLP7hqVVoi410xeQr8lMQflGsEgVp/tGL7lGtejS26krb9B At85Yd7IAS4lvQAd0exv0pjLSluiZYS4aHkuHB+HBC3i2s5ne77Kh+UblhvGYA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1607287500; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=9VZi8ujgSXh7HIp+A/M1SLGnPCwni73lR3eHRtUwCWY=; b=Q4+e3lr8qNXgBt+cSsykW8rCoe4wJCM2jSDQK3fKxULchtdTVGVIMKAuqyVUCzPOXsvTUM sDSbIKgkm714oNDQ== To: Sergey Senozhatsky Cc: Petr Mladek , Sergey Senozhatsky , Sergey Senozhatsky , Steven Rostedt , Linus Torvalds , Greg Kroah-Hartman , Thomas Gleixner , linux-kernel@vger.kernel.org Subject: Re: [PATCH next v2 3/3] printk: remove logbuf_lock, add syslog_lock In-Reply-To: References: <20201201205341.3871-1-john.ogness@linutronix.de> <20201201205341.3871-4-john.ogness@linutronix.de> Date: Sun, 06 Dec 2020 21:50:59 +0106 Message-ID: <871rg2oe9g.fsf@jogness.linutronix.de> MIME-Version: 1.0 Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2020-12-04, Sergey Senozhatsky wrote: >> +static char *get_printk_count(void) > > A nit: I think get_foo() has some sort of special meaning and one > would expect that there should be put_foo() as well, and that those > have something to do with the ref counting. OK. How about: static char *printk_recursion_counter(void) ? >> +static bool printk_enter(unsigned long *flags) > > This better explicitly state that it disables local IRQs > > printk_enter_irqsave() > > I'm not very certain that printk_enter/printk_exit are best names: > > if (!printk_enter()) > return; > > Maybe it can spell out why we couldn't enter printk so the function > name can contain recursion_limit or something. printk_recurse_irqsave() ? I would prefer printk_enter_irqsave() and just add comments that say it is checking the recursion level. It is only used in one place. >> +static void printk_exit(unsigned long flags) > > This enables local IRQs, so > > printk_exit_irqrestore() Yes, I like that. John Ogness