Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp607420ybk; Wed, 13 May 2020 08:22:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwaj4lgFb9hs5+qK7n5Caa9ujicyYuPrvuc2NdLkH/Z59tbm0q6HzafzOfqqS6Irp5vrjV5 X-Received: by 2002:a17:906:509:: with SMTP id j9mr10076633eja.152.1589383360340; Wed, 13 May 2020 08:22:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589383360; cv=none; d=google.com; s=arc-20160816; b=Hgt+TW9Df4LS3DMVFKj0YEcJDFFEiNgESsL33vL3RIEymHfLLgUFNUjKJ+7DLDrr4b HK9dA3oGw7FtJrqEd0KPJ6basCL22QqZ2e0sp7MB5QbdN+6QXSRCHmCddCarj6gmbJhk CtkNTeoZqykDyCOP0HO7E8aehuJ7PtQT4v+1iPGpHDLIUMM5a/KqRWO69l8OYDEKxj4a cCmfv2kpC8DbozZgVknlg1mTGzJBCeZWskAHNHt6VuWMfMa2ORpAdZbArfQHnUPCPY8V dbFIgbQtzBjqZcPNvDBr6qB9wxe5DzhHpSH1ws+AShmHGftcpBhERYqoKXduHQ1SAtIC J++w== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=XeTgy15D+6ZA4SCNHhHSNi9TcMxUqaqeHyNOuyFZwus=; b=oEPOzIpeaO/q8V/gh6ciUQz0FvKJxBCQj35gGQ0WJZzOY8CLvrISa3JH7KA9SOht45 6u+AfjOSG18DW04pOHU1To9jOz4eIsZrPvoTEv8+tbPSNUAaBYY7pCICS57MI3HBewkU y1BKbNX3Bm9VZ0fc0XT34aupYQX1IDSndYCv9gKV58YwjF1Eu/oAoo/s2Mf/cnNnPJ18 R5IlYRTX7TFz3RFyHcwV/Zv6GcPc8hRnx60ZmlhaKRskyh/QXALkYl1RdUCa+5BRVfRQ g3jbZU+cKo4e/TNIcaXGVh/Z02hT+qkYCkc/+hIn4yShCBkJlDMbQH5dARHMHtmnUT4G RPFw== 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 q3si3023839edc.174.2020.05.13.08.22.16; Wed, 13 May 2020 08:22:40 -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 S2389100AbgEMPUq (ORCPT + 99 others); Wed, 13 May 2020 11:20:46 -0400 Received: from www262.sakura.ne.jp ([202.181.97.72]:52441 "EHLO www262.sakura.ne.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728692AbgEMPUq (ORCPT ); Wed, 13 May 2020 11:20:46 -0400 Received: from fsav109.sakura.ne.jp (fsav109.sakura.ne.jp [27.133.134.236]) by www262.sakura.ne.jp (8.15.2/8.15.2) with ESMTP id 04DFK6RG086103; Thu, 14 May 2020 00:20:06 +0900 (JST) (envelope-from penguin-kernel@i-love.sakura.ne.jp) Received: from www262.sakura.ne.jp (202.181.97.72) by fsav109.sakura.ne.jp (F-Secure/fsigk_smtp/550/fsav109.sakura.ne.jp); Thu, 14 May 2020 00:20:06 +0900 (JST) X-Virus-Status: clean(F-Secure/fsigk_smtp/550/fsav109.sakura.ne.jp) Received: from [192.168.1.9] (M106072142033.v4.enabler.ne.jp [106.72.142.33]) (authenticated bits=0) by www262.sakura.ne.jp (8.15.2/8.15.2) with ESMTPSA id 04DFK6RQ086100 (version=TLSv1.2 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 14 May 2020 00:20:06 +0900 (JST) (envelope-from penguin-kernel@i-love.sakura.ne.jp) Subject: Re: [PATCH] printk: Add loglevel for "do not print to consoles". To: Steven Rostedt Cc: Petr Mladek , Sergey Senozhatsky , Michal Hocko , linux-kernel@vger.kernel.org, Dmitry Safonov , Yafang Shao References: <20200427062117.GC486@jagdpanzerIV.localdomain> <4dae86af-1d9a-f5a8-cff6-aa91ec038a79@i-love.sakura.ne.jp> <20200428121828.GP28637@dhcp22.suse.cz> <20200428154532.GU28637@dhcp22.suse.cz> <20200429142106.GG28637@dhcp22.suse.cz> <20200513062652.GM413@jagdpanzerIV.localdomain> <20200513100413.GH17734@linux-b0ei> <20564555-7b84-f716-5dcd-978f76ad459a@i-love.sakura.ne.jp> <20200513095503.7488b0d6@gandalf.local.home> From: Tetsuo Handa Message-ID: <5f272afb-2d74-c051-ce0a-4332ff080ef3@i-love.sakura.ne.jp> Date: Thu, 14 May 2020 00:20:04 +0900 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 MIME-Version: 1.0 In-Reply-To: <20200513095503.7488b0d6@gandalf.local.home> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2020/05/13 22:55, Steven Rostedt wrote: > On Wed, 13 May 2020 20:03:53 +0900 > Tetsuo Handa wrote: > >> I think that basically only oops (e.g. WARN()/BUG()/panic()) messages worth >> printing to consoles and the rest messages do not worth printing to consoles. >> Existing KERN_$LOGLEVEL is too rough-grained. > > Why don't you look into having a "noconsole" command line option that will > not print anything to the consoles but oops messages. Well, such global option can be as harmful as "ignore_loglevel" command line option in that we have to worry about how per-console loglevel can co-exist. The idea of per-console loglevel is to allow specifying different threshold based on characteristics of each console while the effect of ignore_loglevel is to disallow specifying different threshold. (I'm wondering whether ignore_loglevel should be valid under CONSOLE_LOGLEVEL_SILENT, for CONSOLE_LOGLEVEL_SILENT says "don't print to consoles" while ignore_loglevel says "always print to consoles".) If we want to implement per-console loglevel in the future, shouldn't we first deprecate the conflicting "ignore_loglevel" command line option (and get rid of it by asking users to use LOGLEVEL_DEBUG as console loglevel)? The idea of "noconsole" command line option is to disallow printing almost all messages regardless of KERN_$LOGLEVEL while the idea of per-console loglevel is to allow printing some messages based on KERN_$LOGLEVEL. > > Sounds more like what you would like, and something that perhaps would be > acceptable by the larger community. More we introduce global switches, more difficult to introduce fine-grained switches (e.g. per-console loglevel).