Received: by 2002:a25:23cc:0:0:0:0:0 with SMTP id j195csp298446ybj; Wed, 6 May 2020 18:04:56 -0700 (PDT) X-Google-Smtp-Source: APiQypIcQcQKWSNGDFCz9XEDwICzLYDbWIu/30q9wpRSaIiea1L+byD3pDiKrQHSi7HyLho/gviO X-Received: by 2002:a05:6402:17e3:: with SMTP id t3mr9585242edy.203.1588813496124; Wed, 06 May 2020 18:04:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588813496; cv=none; d=google.com; s=arc-20160816; b=rkdFeVBtHL8mCqxJuqUUjyZtS3Gcmqw4h+/fv+pjFP0h0vqz274tVBQzWJcQBN6WEC vEES8h0BPr30U78bL0jZpwBv+aJaYIMM5ibH6/Ae1LX8H6G4tCFLrH1CrOC6QWXh15VH RDv3oRAYxZu9E2Y3701l8yVxPmVoVPWuOanaukgR1VXTv8Dw5ZYlX73mhlIFMJsDnAeA xUMDYuXMgnr7basyueBjzbq0yv2iNKC6svSovMigRliEGqeJtejKCS7mA+mOMfUqrsqu tF0F9nXqd6sM5+PjcH/ZOidv9XYB1HD6CFvwGusV1TPrHqtaJ2RGVJoRPH1eAi7tg5Q+ IOUw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:date:cc:to:from:subject :message-id; bh=/AZ6FOYmkSMkWBwEaLDusQao5dULmkslMr56KKrpqaM=; b=KcJU4lj8O2qW6u2TjmX5ALpE4hGPyrx/bV+vCPVlJUbYQL93BMcjS0oGQEK9YlAFr3 5fVJqM49SD8+cGhmFr5lewld9vQylHK9PSk4r7ucqAI6cb2i+v3jMlIABq+JUpugSc1L Y2rnR+lE9NyC1MAlWaQMF6+DJAK7WbUboYxC1Pt3EoZHHBogdiiHOVdVVIxj51T0TCoj YFHXSwUAdYuxtvb5fYZq6JbT0iSFOjUCR4wZIN2JrdQXHCbSLg2MT9Dv/+HQNzxtGVHE eohM0xhFj4V4Z+tSE+h8KoOSOVOwGGBozVMCur7gYUOOSOWdH7+GW7BBJUpQ5Up6soBK o/yQ== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d6si2123774edy.66.2020.05.06.18.04.33; Wed, 06 May 2020 18:04:56 -0700 (PDT) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728261AbgEGBCk (ORCPT + 99 others); Wed, 6 May 2020 21:02:40 -0400 Received: from smtprelay0245.hostedemail.com ([216.40.44.245]:44924 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726129AbgEGBCk (ORCPT ); Wed, 6 May 2020 21:02:40 -0400 Received: from filter.hostedemail.com (clb03-v110.bra.tucows.net [216.40.38.60]) by smtprelay04.hostedemail.com (Postfix) with ESMTP id 8377E180A7339; Thu, 7 May 2020 01:02:39 +0000 (UTC) X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,joe@perches.com,,RULES_HIT:41:355:379:599:973:988:989:1260:1277:1311:1313:1314:1345:1359:1437:1515:1516:1518:1534:1541:1593:1594:1711:1730:1747:1777:1792:2393:2559:2562:2693:2828:2910:3138:3139:3140:3141:3142:3353:3622:3865:3866:3867:3868:3870:3871:3872:3873:3874:4250:4321:5007:6691:8603:10004:10400:10848:11026:11232:11473:11658:11914:12297:12533:12740:12760:12895:13069:13146:13230:13311:13357:13439:14093:14096:14097:14659:14721:21080:21433:21627:21795:21939:21990:30012:30051:30054:30091,0,RBL:none,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:,MSBL:0,DNSBL:none,Custom_rules:0:0:0,LFtime:1,LUA_SUMMARY:none X-HE-Tag: fear98_341a2ebcbb61a X-Filterd-Recvd-Size: 2824 Received: from XPS-9350.home (unknown [47.151.136.130]) (Authenticated sender: joe@perches.com) by omf11.hostedemail.com (Postfix) with ESMTPA; Thu, 7 May 2020 01:02:37 +0000 (UTC) Message-ID: <63f58a1c334d8d44ddf1788091be9b2232054b03.camel@perches.com> Subject: Re: [PATCH] printk: Add loglevel for "do not print to consoles". From: Joe Perches To: Tetsuo Handa Cc: Sergey Senozhatsky , Petr Mladek , Steven Rostedt , linux-kernel@vger.kernel.org, Dmitry Safonov , Michal Hocko , Yafang Shao Date: Wed, 06 May 2020 18:02:36 -0700 In-Reply-To: <0d513c80-8c8e-17b6-5b9c-73c7bca77252@i-love.sakura.ne.jp> References: <20200424024239.63607-1-penguin-kernel@I-love.SAKURA.ne.jp> <20200425004609.GE8982@jagdpanzerIV.localdomain> <842ff40b-a232-6098-4333-996a3033b30a@i-love.sakura.ne.jp> <20200427062117.GC486@jagdpanzerIV.localdomain> <4dae86af-1d9a-f5a8-cff6-aa91ec038a79@i-love.sakura.ne.jp> <344199f1-639b-ee93-2388-57b0549641f9@i-love.sakura.ne.jp> <0d513c80-8c8e-17b6-5b9c-73c7bca77252@i-love.sakura.ne.jp> Content-Type: text/plain; charset="ISO-8859-1" User-Agent: Evolution 3.36.1-2 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 2020-05-07 at 09:50 +0900, Tetsuo Handa wrote: > On 2020/05/07 0:26, Joe Perches wrote: > > On Wed, 2020-05-06 at 18:45 +0900, Tetsuo Handa wrote: > > > On 2020/04/28 20:33, Tetsuo Handa wrote: > > > > On 2020/04/27 15:21, Sergey Senozhatsky wrote: > > > > > > KERN_NO_CONSOLES is for type of messages where "saved for later analysis" is > > > > > > important but "printed for immediate notification" is not important. > > > > > > In other words, KERN_NO_CONSOLES is NOT for dying messages where "printed for > > > > > > immediate notification" is important. > > > > > > > > > > per-console loglevel is a user configurable parameter. > > > > > KERN_NO_CONSOLES is a hard-coded policy. > > > > > > > > But given that whether to use KERN_NO_CONSOLES is configurable via e.g. sysctl, > > > > KERN_NO_CONSOLES will become a user configurable parameter. What's still wrong? > > > > > > > > > > Any problems remaining? > > > > printk_get_level / printk_skip_level and the various > > uses of %pV using printk_get_level > > > > Excuse me, but what do you mean? > > I wish printk() accepts "loglevel" argument detached from "fmt" argument (e.g. I think that's a bad idea as it would expand _every_ use of printk with another argument and overall code size would increase for very little value. And do look at the code and uses of printk_get_level.