Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp1459352ybk; Thu, 14 May 2020 09:28:57 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzsTB3iqPbly7AUqYwr1LSciN8uqtBjnmKh8fxwDl+ztoniRRDTd2rhmYJ6Iuuv8PKwzhSO X-Received: by 2002:a50:bb6b:: with SMTP id y98mr4593570ede.296.1589473737630; Thu, 14 May 2020 09:28:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589473737; cv=none; d=google.com; s=arc-20160816; b=n7wofFCUI9d50T2DrYTJsiW5NWaw6NpcRFBvG6TZzDPf8wejQrNrkwJrjASnHqR0fP 11JGz1K78HR4QDL1p/kFmnorhlZH0wuXU5F39aVM9Wf+SoPkG+zoXK8CPENPMmN8LR2k Bb3RQqHx4RiTEONSAAllwaXKi9eKjJwVt7AjpvYS4CTj2Y/uhLK11SvSD7YqD+BZIa0O DghvdlDdRCPxzvMsf0YCfsNoKtHNV0blGOeH4qgezBiDfMicig3RMyWKEnjxajZ2QFGP tY72gpbrwVBOgfTxv7HLcnkBhN46dArI5rzqNOeafKJcu2Q7WujqEDwk2yC3Wyy4PP6z yI1A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=iv1ExmdeBoLM30cr4K5oOv1BZzN2WJHDlj8AYveHC+s=; b=FPaMXxTXpIb5d8c9+2Tf+kz7O8BM+MJqPmqnvQniZuc+uvz5nAsPsp4KWdqwjAYiVD BQ89VPxD+c8YyW+up0cck4S9EZTnftlKRQK2FcKAFPmZKVUG1TLfTaXMKE8VXmySlSoO nta32N/aklBrnlHO2OGPlQ5NqaJK7GgoVP31Na3Hw17mTha67lCA7KhTts+n3nYudc3H khfUgOpvS3oUD9Cl9Y7ydLRz+KeOy+8PTI50ynL16iEq44yxTmBNmGw6xVN13ugmLlpT JPT9tnOAY8RUWsQITZgnEvsrSh3rGKSX9OhDlIv1eTaK9GgHex0FjUNxB0dbOTD3cITR uKCQ== 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 x23si1846344edq.363.2020.05.14.09.28.34; Thu, 14 May 2020 09:28:57 -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 S1726132AbgENQ0Q (ORCPT + 99 others); Thu, 14 May 2020 12:26:16 -0400 Received: from mx2.suse.de ([195.135.220.15]:59880 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726117AbgENQ0P (ORCPT ); Thu, 14 May 2020 12:26:15 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 7FF9CACB1; Thu, 14 May 2020 16:26:16 +0000 (UTC) Date: Thu, 14 May 2020 18:26:12 +0200 From: Petr Mladek To: Tetsuo Handa Cc: Michal Hocko , Sergey Senozhatsky , Steven Rostedt , linux-kernel@vger.kernel.org, Dmitry Safonov , Yafang Shao Subject: Re: [PATCH] printk: Add loglevel for "do not print to consoles". Message-ID: <20200514162612.GR17734@linux-b0ei> References: <20200513062652.GM413@jagdpanzerIV.localdomain> <20200513100413.GH17734@linux-b0ei> <20200513104938.GW29153@dhcp22.suse.cz> <20200513121942.GK17734@linux-b0ei> <2173e3ac-7d5e-24da-0c1e-6472df905767@i-love.sakura.ne.jp> <20200514080053.GN17734@linux-b0ei> <7af6fc77-986a-8a6a-ea93-b807db44413c@i-love.sakura.ne.jp> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <7af6fc77-986a-8a6a-ea93-b807db44413c@i-love.sakura.ne.jp> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu 2020-05-14 20:23:55, Tetsuo Handa wrote: > On 2020/05/14 17:00, Petr Mladek wrote: > > On Wed 2020-05-13 21:59:23, Tetsuo Handa wrote: > >> 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, > > > > What about using KERN_INFO then? Is there still the same problem? > > dump_tasks() is already using KERN_INFO, and the same problem remains. KERN_INFO cannot > prevent printk() from printing to consoles unless console loglevel is tuned. And tuning > console loglevel can prevent all KERN_INFO from printing to consoles. What I want is a > method for allowing administrators to control whether to print each message to consoles. > Such method will be by definition controlled via "+ loglevel assigned to each message". This does not make much sense to me. KERN_NO_CONSOLES would be another global flag. If you enable/disable its functionality, it would affect all strings with this flag (not only the ones used by OOM killer). I am not going to comment the rest. We are going in circles and I do not know how to better explain my concerns. > Given that said, if KERN_NO_CONSOLES is not acceptable, I have to again > battle against Michal Hocko regarding how to offload OOM-related messages, > like Sergey Senozhatsky estimated > > "I'd say that lockless logbuf probably will land sometime around 5.8+. > Async printk() - unknown." One problem there is a lack of reviewers. Best Regards Petr