Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp453529ybk; Wed, 13 May 2020 04:36:44 -0700 (PDT) X-Google-Smtp-Source: APiQypKCKZHsB/fa/MTTs6NiKRZrI6TpttoHkTscGEKxITbKFgipAA1BS1MZH/c2wjhOPdx8eKiC X-Received: by 2002:aa7:d1c6:: with SMTP id g6mr15740359edp.303.1589369804043; Wed, 13 May 2020 04:36:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589369804; cv=none; d=google.com; s=arc-20160816; b=m6Z/4bxLUMnBJ350RNsrZcvn0PzSSy9Kcsn1B6YqwLtrBxqzlRCFHv1bdfgY+CnYO4 Bk00w5jc5v53azkbzfIRHVJ35R5Jcq4Dn4txFS/YMtFGKMGgTwIWXTCuif/q5iTSW22+ f4+QhgRRTrhnYEn6zSp5qPSjOjqpIS87RNGxqJeSJCBCeFhgG7BYXd1UHuM8XU2+yneF tpWwXpz/sUdHU6aYfMyIBveZ4i2vruQNUpUHPQ+RxAU5IpKsKtVYyjWQeclqvFgjb7vG GP6VxVHK4FiLlWSYN1TPSukeum7e0ZgmmXWrZZJamsaqawkN7Xc+bCfL/y7DQfUzKRh3 pjDg== 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=Y4iBA2cosKya84zybABoxQ4Xx5/hv4h3UcGunJM7DpM=; b=lZE5foaBrbdQWUf0M1Bimhlh9VMC+spZNBxRdM0FUxn+/aN2o31AMwt5hY4ujBXlkH SOgc3VaxO7ensoITZcB5QQRtRYnfAkdx8PhxuYGxWLm/1X+r31DvBbYwG9bQRzxmOWlx wbEk5BbixX9yEegDuo01JjJ7rXnAIlo+Uqa01/t14u5hLyIszITT1bzTfPu0iYwcxnkD 2IoyASUVqDfqJjLOVHe+z0ZqKx4Polcxg0/6uipGaDGePcFCuDJ7D51WUIs8cgYbwDJu /pX1eMSTQf11v0A4emDNpAGCzRK5kaCDTWBASSbAY9KOklXMviLIfokWJkDch4Ftokc5 6/Ow== 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 x22si9320931eju.478.2020.05.13.04.36.20; Wed, 13 May 2020 04:36:44 -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 S1728133AbgEMLZE (ORCPT + 99 others); Wed, 13 May 2020 07:25:04 -0400 Received: from www262.sakura.ne.jp ([202.181.97.72]:57550 "EHLO www262.sakura.ne.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726020AbgEMLZD (ORCPT ); Wed, 13 May 2020 07:25:03 -0400 Received: from fsav105.sakura.ne.jp (fsav105.sakura.ne.jp [27.133.134.232]) by www262.sakura.ne.jp (8.15.2/8.15.2) with ESMTP id 04DBOOjo033442; Wed, 13 May 2020 20:24:24 +0900 (JST) (envelope-from penguin-kernel@i-love.sakura.ne.jp) Received: from www262.sakura.ne.jp (202.181.97.72) by fsav105.sakura.ne.jp (F-Secure/fsigk_smtp/550/fsav105.sakura.ne.jp); Wed, 13 May 2020 20:24:24 +0900 (JST) X-Virus-Status: clean(F-Secure/fsigk_smtp/550/fsav105.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 04DBOOjV033412 (version=TLSv1.2 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 13 May 2020 20:24:24 +0900 (JST) (envelope-from penguin-kernel@i-love.sakura.ne.jp) Subject: Re: [PATCH] printk: Add loglevel for "do not print to consoles". To: Michal Hocko , Petr Mladek Cc: Sergey Senozhatsky , Steven Rostedt , linux-kernel@vger.kernel.org, Dmitry Safonov , Yafang Shao References: <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> <20200513104938.GW29153@dhcp22.suse.cz> From: Tetsuo Handa Message-ID: Date: Wed, 13 May 2020 20:24:24 +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: <20200513104938.GW29153@dhcp22.suse.cz> 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 19:49, Michal Hocko wrote: > On Wed 13-05-20 12:04:13, Petr Mladek wrote: >> What is so special about OOM dump task so that it would deserve such >> complications? > > Nothing really. Except for the potential amount of the output. "echo t > /proc/sysrq-trigger" from userspace program is another example. > But as > you've said there are two ways around that. Disable this output if you > do not need it or make it a lower loglevel. Disable this output for syslog is not acceptable for me, but disable this output for consoles is preferable for me. > I simply cannot tell whether somebody considers > dump_tasks an important information to be printed on consoles. I don't think dump_tasks() is important information to be printed on consoles. But since somebody might think dump_tasks() is important information to be printed on consoles, I suggest switching KERN_NO_CONSOLES using e.g. sysctl. > > If there is any need to control which messages should be routed to which > backend then the proper solution would be to filter messages per log > level per backend. Possible backends will be "zero or more than zero" consoles + "zero or one" syslog, and KERN_NO_CONSOLES is a method for force selecting "zero" console backend. > But I have no idea how feasible this is for the > existing infrastructure - or maybe it already exists... There is per-console loglevel proposal (which allows selecting "some" console backends). But it is based on KERN_$LOGLEVEL which is too rough-grained.