Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp1944634pxu; Sun, 6 Dec 2020 12:54:56 -0800 (PST) X-Google-Smtp-Source: ABdhPJzZp2ikR4mB9ax8tV5g0Fhc6sVEDyQoJYHhpuKrj+7xbrWqi4rcbRe0n24iaOkdM9MNUq9c X-Received: by 2002:a05:6402:13d1:: with SMTP id a17mr13815593edx.202.1607288096720; Sun, 06 Dec 2020 12:54:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607288096; cv=none; d=google.com; s=arc-20160816; b=yjlTADX6fM2lo1t8HE7TOlXRd9dwrG2zgdGdbfMzYT+yl2/XboQAdrJaiRVBPqxsrn UTasuJON/dZN5GboCl73JeMdfHmY858L44H+hxuJG540xdM1qLotwPP8k1q++29WYe6R MzMVoDJCksJW+rm14cvrF792QwxF7/n9aCuv/TIzITfxCKWuRC9GFzYxjdwocYPdx7S3 ApfflTDtIzWb4KhigbC0rG/m2tXuN9afeB5TvuSn80arN4HwSdN+SgAvPEmNvKWYaLST sQk74UZqQVOuvB+7JXQiYfSnOURumglTuz/YPmQBQ1MXEVGibw8xUzGU+IV3ZYbfHijU +AkA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:references :in-reply-to:subject:cc:to:dkim-signature:dkim-signature:from; bh=9VZi8ujgSXh7HIp+A/M1SLGnPCwni73lR3eHRtUwCWY=; b=aDt0uxRQ6mSAWnOdpn3sTs6aoXttKOEkuQZLbAiYgrXLbDwfs9bK4O5L6lmzu2OAoy 5xY3G3dti8Wt3NXWiGcyyJB2p1a+v44hji6dcwylhYwlGnWTGogkEzzyfsNFZTo5WWjX S/WGbiPj1VSXqp78X0SuCE9/lUzZxPAmlpJxtBgqC91oVAtRVgGKMB5qOVTJqFBYVlA+ 1c1mgrTIRyFB52DEbWtZ0kig8BRiArEZy3hL7uLXU5K48m1AcIPuRNb6HCtpEJewI0NI 6KK/C4LqKbBqPZZCv4tEg0Xbxgr5hFjfZW77CigWk1JPqaZvIa1hSD004YK36o8uy/Mh OqTQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b="ofok/O4w"; dkim=neutral (no key) header.i=@linutronix.de header.b=Q4+e3lr8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g10si7109967edy.201.2020.12.06.12.53.58; Sun, 06 Dec 2020 12:54:56 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b="ofok/O4w"; dkim=neutral (no key) header.i=@linutronix.de header.b=Q4+e3lr8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727605AbgLFUpm (ORCPT + 99 others); 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