Received: by 2002:ac0:950c:0:0:0:0:0 with SMTP id f12csp3873752imc; Thu, 14 Mar 2019 07:13:56 -0700 (PDT) X-Google-Smtp-Source: APXvYqyitLll5E1udJYd1fM6aNQVRlowNR3H8CoV+sJyvdnenB25VdpZIjDwlJEc4e0qLzJwXB/d X-Received: by 2002:a17:902:32b:: with SMTP id 40mr49805884pld.122.1552572836356; Thu, 14 Mar 2019 07:13:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1552572836; cv=none; d=google.com; s=arc-20160816; b=whpb9BIgRstJyslkEG7DHl/YgDTiGHVqC9W6pGq+mYP7fXeuHIjzBEogNdlQ9ZtvvW sBXXpAjPvMY9dgXBvcIUS/NLy+TLJ2mx+rrEhDFk2yio0Gm44LxBwmFA72ENNSO95nQT Jxgw+eNOy9rVv6gDaGWaQGH9xZMH5K65K5KxH3hayP9bASVFYo8Ij6EE4qen7q5kr8MA SibXB9VJI3mN/933Fwx0claQFg5f5UExRLYgDk1W1vTiEiqp2Dpq//V5XaDEKi8XkXDc SELGnuceDMaXdVmFGHKmTX3cdNR8q4+wOVdJYgrh2RdhlBMfR0bDRQtShvpEjG4HpHoN 75Bg== 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:mime-version:user-agent:date:message-id:subject :from:cc:to:in-reply-to; bh=UBBhlMVbn66vohyr5ByaQ1iL38EpxVTvt1R7bNtAtWg=; b=Mh7YO1BjllVmcOFjSyensH6dyrTWKaL+AwJtAxsMKteZAMiy1qth9LUEwk8G8afHyU aZHVVVdHTwG1uuP/0ImDYoMaA/nkpzJF+fNsD0sYyP4J+o/GlRQdbkPpCiZJ9rltRNdF P+UYJVBt9F8X6pns048i5nEO+JMYiwqAaSb4mLaVqs2aEN0lcWhW84DwSQEkpxlm3f7Y aqp2xuH4Wjp384LOExDMhmZZdqnhOgjkWNYYEKmGxGG3qUjUuIE0uAEmqFLPKFbz45P7 9DBAjocPqHJSWp1ljZHHdiH9BwKnEycmIM/elRSQHTgkI7xkiGKyLWVe4s8KxES0loJi 5Jgw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d1si13642361pll.283.2019.03.14.07.13.41; Thu, 14 Mar 2019 07:13:56 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727356AbfCNOMx (ORCPT + 99 others); Thu, 14 Mar 2019 10:12:53 -0400 Received: from www262.sakura.ne.jp ([202.181.97.72]:27348 "EHLO www262.sakura.ne.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727572AbfCNOMv (ORCPT ); Thu, 14 Mar 2019 10:12:51 -0400 Received: from fsav405.sakura.ne.jp (fsav405.sakura.ne.jp [133.242.250.104]) by www262.sakura.ne.jp (8.15.2/8.15.2) with ESMTP id x2EECm0H079546; Thu, 14 Mar 2019 23:12:48 +0900 (JST) (envelope-from penguin-kernel@I-love.SAKURA.ne.jp) Received: from www262.sakura.ne.jp (202.181.97.72) by fsav405.sakura.ne.jp (F-Secure/fsigk_smtp/530/fsav405.sakura.ne.jp); Thu, 14 Mar 2019 23:12:48 +0900 (JST) X-Virus-Status: clean(F-Secure/fsigk_smtp/530/fsav405.sakura.ne.jp) Received: from [192.168.1.8] (softbank126126163036.bbtec.net [126.126.163.36]) (authenticated bits=0) by www262.sakura.ne.jp (8.15.2/8.15.2) with ESMTPSA id x2EECmbv079543 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NO); Thu, 14 Mar 2019 23:12:48 +0900 (JST) (envelope-from penguin-kernel@I-love.SAKURA.ne.jp) X-Mozilla-News-Host: news://news.gmane.org:119 In-Reply-To: <20190308150914.ifqp36en3pyd4ljy@pathway.suse.cz> To: Petr Mladek Cc: Calvin Owens , Sergey Senozhatsky , Steven Rostedt , Greg Kroah-Hartman , Jonathan Corbet , linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org From: Tetsuo Handa Subject: Re: [PATCH 1/4] printk: Introduce per-console loglevel setting Message-ID: Date: Thu, 14 Mar 2019 23:12:49 +0900 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.5.3 MIME-Version: 1.0 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 Petr Mladek wrote: > It might be even more straightforward when the per-console value > defines the effective console level. I mean the following semantic: > > + "console_loglevel" would define the default loglevel used > by consoles at runtime. > > + the per-console loglevel could override the default > console_loglevel. > > + We would need a custom handler for the sysctl "console_loglevel". > It would write the given value to the global console_loglevel > variable and for all already registered consoles (con->loglevel). But some functions change console_loglevel without sysctl (e.g. console_verbose() when reporting hung tasks and panic()). Should con->loglevel be changed (which might result in too much messages to slow consoles) when console_loglevel changes? > > The value will be used also for all newly registered consoles > when they do not have any custom one. > > > + The handler for "loglevel" early param should behave the same > as the sysctl handler. > > > IMHO, there is no perfect solution. The advantage of the above > proposal is that you "see" and "use" exactly what you "set".