Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp509488ybk; Wed, 13 May 2020 06:03:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyOK37SOzRyNqOoktWs/vmQjxu3nwHZOOHH6NTLg/uV43mUOPjr1LawpMCKCtqZbQ3L+LJZ X-Received: by 2002:a05:6402:a41:: with SMTP id bt1mr1114519edb.151.1589374998010; Wed, 13 May 2020 06:03:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589374998; cv=none; d=google.com; s=arc-20160816; b=IiQnWPP3lmB5HoT2VqaqMFftVDVdTzGx1yAfj0q/8MrJld2tx5SxgTly77vJdotTWd /MYa0AhlT5Q4AFEzOPTnx1fHca33DVGTuDZFh0MXJBu5KleTwsUs2Qc01qYu8j1GDdoh P/CFEJsdSVate8ulW3XOU/vmO6xGQP6LNmvaAJxbM/u7udVw4dyy+KO841ewihgTCiUZ 9H0loUWKM7e7csj3TACC2UPYPQnWNsuCqBUVSGeXalcS+PkrrbkaQG//cw03Q2dwOvZq 1lhgxRZM/PHAZkjaL5K8AwDrZSReiDoC7kUy4JIyJr9TJiHu6LzI01l/3CVRc026ljuN 9z6g== 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=s3N3mcCg6NGDU8+orjgNbHamCP0zsKm7BiR4zY1+vT0=; b=fta3zcF/QnUNFxTXtdaqwaP3WLeUa44KKL73n5mVI9QEe/ndoroa3Yo6SsRqS029tz xZCp56HSRVprKLAoBihQDZYR54eyGYPDXrXknZp1YY97pWsPAhFc+OrNTaxmb+F6OsN3 3GQWNd8rbX6kWGBBMLzHD/8Lhon2/ckKuPuksS3wnEvKgHKf0nL6A6JhTdrne3VdCvAL 8nRZkwwRRoQYRWkF5Mwr1h9c16kCyyfyyEOLI03B3WkbfA7zUH+1rxc5fZHU8xBnWlZN 6OkJ6T/hwyhxl6DgDJxTJuxBaYvNA49L0+766c647nn12ffXnbRwYzH5dhCFLtQMfWk3 Czrg== 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 u14si1098850edd.346.2020.05.13.06.02.22; Wed, 13 May 2020 06:03:17 -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 S1728467AbgEMNAO (ORCPT + 99 others); Wed, 13 May 2020 09:00:14 -0400 Received: from www262.sakura.ne.jp ([202.181.97.72]:61284 "EHLO www262.sakura.ne.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725909AbgEMNAN (ORCPT ); Wed, 13 May 2020 09:00:13 -0400 Received: from fsav402.sakura.ne.jp (fsav402.sakura.ne.jp [133.242.250.101]) by www262.sakura.ne.jp (8.15.2/8.15.2) with ESMTP id 04DCxVYK024851; Wed, 13 May 2020 21:59:31 +0900 (JST) (envelope-from penguin-kernel@i-love.sakura.ne.jp) Received: from www262.sakura.ne.jp (202.181.97.72) by fsav402.sakura.ne.jp (F-Secure/fsigk_smtp/550/fsav402.sakura.ne.jp); Wed, 13 May 2020 21:59:31 +0900 (JST) X-Virus-Status: clean(F-Secure/fsigk_smtp/550/fsav402.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 04DCxQMq024664 (version=TLSv1.2 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 13 May 2020 21:59:31 +0900 (JST) (envelope-from penguin-kernel@i-love.sakura.ne.jp) Subject: Re: [PATCH] printk: Add loglevel for "do not print to consoles". To: Petr Mladek Cc: Michal Hocko , Sergey Senozhatsky , Steven Rostedt , linux-kernel@vger.kernel.org, Dmitry Safonov , Yafang Shao References: <20200428154532.GU28637@dhcp22.suse.cz> <20200429142106.GG28637@dhcp22.suse.cz> <20200513062652.GM413@jagdpanzerIV.localdomain> <20200513100413.GH17734@linux-b0ei> <20200513104938.GW29153@dhcp22.suse.cz> <20200513121942.GK17734@linux-b0ei> From: Tetsuo Handa Message-ID: <2173e3ac-7d5e-24da-0c1e-6472df905767@i-love.sakura.ne.jp> Date: Wed, 13 May 2020 21:59:23 +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: <20200513121942.GK17734@linux-b0ei> 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 21:19, Petr Mladek wrote: > On Wed 2020-05-13 20:24:24, Tetsuo Handa wrote: >> 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? > >> 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. > > You might achieve the same with DEBUG loglevel. Or do I miss anything? Use of KERN_DEBUG affects userspace syslog daemon. We will have to ask administrators to configure syslog daemon not to filter KERN_DEBUG messages. And administrators will be bothered by needless KERN_DEBUG messages. Also, > > [*] It will have no effect when it was disabled by a sysfs knob. we will have to ask people to "don't make pr_debug() no-op" or "use KERN_DEBUG instead of pr_debug()". Your suggestion to change KERN_$LOGLEVEL keeps bothering people. That's bad. > I know that it is meant as a modifier, like LOGLEVEL_SCHED and > KERN_CONT. Right. KERN_NO_CONSOLES is a modifier. > But this is another reason to avoid it. We already have > huge pain with these two modifiers. They both do not work well. KERN_NO_CONSOLES can not cause pains like LOGLEVEL_SCHED because KERN_NO_CONSOLES is to say "no need to call console drivers" while LOGLEVEL_SCHED is to say "don't call console drivers now but have to call console drivers later". On 2020/05/13 21:34, Petr Mladek wrote: > On Wed 2020-05-13 20:03:53, Tetsuo Handa wrote: >> On 2020/05/13 19:04, Petr Mladek wrote: >>>> What is wrong with adding NO_CONSOLES ? >>> >>> How does it differ from KERN_DEBUG? The debug messages: >>> >>> + can be disabled via sysfs >>> + might reach console when this loglevel is enabled >> >> KERN_NO_CONSOLES is different from KERN_DEBUG in that KERN_NO_CONSOLES >> itself does not affect userspace daemon's judgement (whether to filter >> KERN_$LOGLEVEL messages). > > And that is the evil thing about it. It goes around the loglevel > filtering. > > The administrator wants to decide what messages are important for him. Right. > NO_CONSOLES would mess with this decision. Some messages would suddenly > get hidden on console but appear in userspace. Wrong. Console loglevel is already hiding some messages. > Users would need to > investigate what the hell is happening. They would need to find the > new sysfs knob to restore the expected behavior, etc. That's part of deciding what messages are important for him, as well as deciding what KERN_$LOGLEVEL messages are worth printing to consoles.