Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp679835img; Wed, 20 Mar 2019 08:38:55 -0700 (PDT) X-Google-Smtp-Source: APXvYqyLzVNMCajndRiBcqH/X5nDMiCFo/6BZ6kcFwiTe4mAXfoCCMTcgP9IRhxJpE7+f+DHfrXL X-Received: by 2002:a63:450f:: with SMTP id s15mr7868559pga.157.1553096335665; Wed, 20 Mar 2019 08:38:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553096335; cv=none; d=google.com; s=arc-20160816; b=Gq47yX0PCGVn83e8BocF816fTkEO9EFRbvboYKZDP9yzHyjRgYbdBax67uSe0iv7I0 Xhft4bCxn4BMJu7nj0z/QZyDv9ZNbD6S6tfZigk47bFhdZZHPqyuyBLZ4zH28lzPF28B Vz9rY9F1BWUsAR76dT2WbE676YlSqq07JuK24ZNMDz8PnwOGsP/OpTd8yOs0umfQB+Fy cO6uwM6Ei63L8POkAW/RoVTjTb3+oS7R3xTkFc2xJir9babMf/ynmKiZFUctIh3QjlXW gd/bIoavDN96XAFap23ohezLwKmBYjXGiLOlJ//o6XbgPWBjsOgAYMtEUAPabmbJ7c4e r8YQ== 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=Wm+C6ejnqlm1HjViShQUfR84vpqmktVNIAjW0i/bCUk=; b=iH8oB2SrgpkSyWQkjyHc4djDTKVIjLkecyrinWYmzdj7dvNq3HyShoOnlAyiMyXtmr 0AnaY7/6mqK+WA/tEuBN/Lhp3+/hkudlCB3U5TuT30MZZgNTOE1Xc40tCiPb3qSXCiJ1 nq8FSvlcDueZeBj0ihy2maKUVPcMj5GRU6a9Jie7tlDoCX0sBH3KNr0zA2VxnkpvNMus pmzBerxtEt/J2VtpQhCCxFkPh9LBWHxZRNzorapqA26afWVXim9kL3gbuRei3SNe7741 byCdGhunLTMgEFudH8YiIsoJrx45GzaFyZzwnz+9nvcx24V0uifqIZVXFCzcddFBH102 8sTg== 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 h128si1856343pgc.397.2019.03.20.08.38.39; Wed, 20 Mar 2019 08:38:55 -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 S1727093AbfCTPhb (ORCPT + 99 others); Wed, 20 Mar 2019 11:37:31 -0400 Received: from mx2.suse.de ([195.135.220.15]:46412 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725988AbfCTPhb (ORCPT ); Wed, 20 Mar 2019 11:37:31 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id D6455AEEE; Wed, 20 Mar 2019 15:37:29 +0000 (UTC) Date: Wed, 20 Mar 2019 16:37:29 +0100 From: Petr Mladek To: Tetsuo Handa Cc: Calvin Owens , Sergey Senozhatsky , Steven Rostedt , Greg Kroah-Hartman , Jonathan Corbet , linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org Subject: Re: [PATCH 1/4] printk: Introduce per-console loglevel setting Message-ID: <20190320153729.6cl77kdck22vc4rv@pathway.suse.cz> References: <20190308150914.ifqp36en3pyd4ljy@pathway.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20170912 (1.9.0) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu 2019-03-14 23:12:49, Tetsuo Handa wrote: > 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? It is about the semantic. We either want to set a hard limit for each console or we want to set per-console loglevel that will get used in normal situations. I prefer the 2nd semantic. IMHO, console_verbose() should be used only in situations when people really want to see all lines, for example, panic, sysrq output when the machine looks deadlocked, ignore_loglevel is set. I believe that they want to see them even on the slow consoles that are there exactly for debugging these critical situations. Best Regards, Petr