Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp699912rwr; Thu, 27 Apr 2023 07:08:12 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6CdBoQynTI9nsK7NiP0wQqTsO4Boo7A0vf2R6Oe2wWEJ6RA73KoiORkwpywORpOKh7hYjs X-Received: by 2002:a17:902:ea0e:b0:1a6:b196:619d with SMTP id s14-20020a170902ea0e00b001a6b196619dmr1988602plg.6.1682604492605; Thu, 27 Apr 2023 07:08:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682604492; cv=none; d=google.com; s=arc-20160816; b=D7jsTmBIm25xAzG+p422ZNicYhoa+YDzvF5xtljmZqV3rpOggebvQ8cKktb1rpIB0E HbCm7wXM0FjgiWNBXAL1YUfY4QckG+hvYZLeAwwEXRv2+WgPbw92SwPMpr93trvdNHN8 BKy2YSbWWfSaTxmw7uAJE5/l3RwV5P9vB8vgIIebbudTm6as5kLMG5+w9F/4CM5fYGW+ DJ5eauPeoTE4HrejlNSbUJNQ2xgCMRFZYI4S3QTJdEzYkHw3eA9GMEJMQ83nHzCzTWDh lSyEHoFiute749DWwZyfQjqoY63JGPJC1/iIxib8tvh75z7ASrQFQpdgqfoDA9YIa03r EmoQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=vt5Z9S2a+6XAPzuBQkUeOkFMmI6jTnVYd7rxV9vyLz4=; b=AhBVbs0fO51/J2xejIiP8RyXlunpv6mFiSztR6AZ0llsgPxoFrpPd4iswmq8whXBes zBTOmRUL8VAt06RL9JXdDSkOAHDoKrNuu/rwAPPmz6dj9mYd+46ioAYkiFSR7tW4xT1G TBA37Xhhc3LqnknbU9zvCQ0BoP/VFQmb9pKToda4ykPlhkpwVgJ+AFqWJhuecxSz0Vgc nEYvdv6ZDP9D37FWlRkzLUKGB+FU+fua0Ugfr5Y8r2lxF/MQNHi98aYDu4iOi98UpInG 88CGboYsKMwHkz2KUOhi+5IKqwQG2mjwyasqH+5yxmwRQA3DTbVlBYeN1QytS81n7KUD gNtQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=AWmhNAh4; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=suse.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i15-20020a17090a64cf00b0024b84926fe4si14352815pjm.117.2023.04.27.07.07.26; Thu, 27 Apr 2023 07:08:12 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=AWmhNAh4; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=suse.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243577AbjD0Nxb (ORCPT + 99 others); Thu, 27 Apr 2023 09:53:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54166 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243218AbjD0Nxa (ORCPT ); Thu, 27 Apr 2023 09:53:30 -0400 Received: from smtp-out2.suse.de (smtp-out2.suse.de [IPv6:2001:67c:2178:6::1d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 070002103 for ; Thu, 27 Apr 2023 06:53:29 -0700 (PDT) Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out2.suse.de (Postfix) with ESMTP id B267B1FE35; Thu, 27 Apr 2023 13:53:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1682603607; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=vt5Z9S2a+6XAPzuBQkUeOkFMmI6jTnVYd7rxV9vyLz4=; b=AWmhNAh4/Q1GpW3UvwqI4ALa5kiqhgH7+9GFyGiTga8DyErL7rb/uwLaK9wVi58+tbxbY4 mzfDwbplmX/GQUdd6URJ0hsnu2W5I+buueGXFrMvDVLJEqZxle6KRptyuG3h4Rn7ktp58P UtemgsN47N4wYQ5oxuwMu2IukIwzSAw= Received: from suse.cz (unknown [10.100.201.202]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by relay2.suse.de (Postfix) with ESMTPS id 806DB2C141; Thu, 27 Apr 2023 13:53:27 +0000 (UTC) Date: Thu, 27 Apr 2023 15:53:27 +0200 From: Petr Mladek To: Chris Down Cc: linux-kernel@vger.kernel.org, Greg Kroah-Hartman , Sergey Senozhatsky , Steven Rostedt , John Ogness , Geert Uytterhoeven , kernel-team@fb.com Subject: Re: [PATCH v4 2/2] printk: console: Support console-specific loglevels Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue 2023-04-25 16:57:49, Petr Mladek wrote: > On Thu 2023-04-20 13:39:32, Chris Down wrote: > > Consoles can have vastly different latencies and throughputs. For > > example, writing a message to the serial console can take on the order > > of tens of milliseconds to get the UART to successfully write a message. > > While this might be fine for a single, one-off message, this can cause > > significant application-level stalls in situations where the kernel > > writes large amounts of information to the console. > > > > --- /dev/null > > +++ b/Documentation/admin-guide/per-console-loglevel.rst > > +Console attributes > > +~~~~~~~~~~~~~~~~~~ > > + > > +Registered consoles are exposed at ``/sys/class/console``. For example, if you > > +are using ``ttyS0``, the console backing it can be viewed at > > +``/sys/class/console/ttyS0/``. The following files are available: > > + > > +* ``effective_loglevel`` (r): The effective loglevel after considering all > > + loglevel authorities. For example, if the console-specific loglevel is 3, but > > + the global minimum console loglevel [*]_ is 5, then the value will be 5. > > I would rather avoid this example. It confused me ;-) > > I thought that it was talking about the "global console loglevel" > instead of "global minimum console loglevel". I was surprised > that the global value was used when a console-specific one > was defined. > > > The console loglevel defines a maximal message loglevel. > The important thing is that it defines a "limit". Most people, > including me, do not remember if the numbers go up or down. > So I ignored the word "minimum". I though that it described > the effect of the value and not a limit for the value. > > Also the global minimum loglevel is a really weird setting. > I do not see much practical use for it. I guess that most > people are not aware of this limit. I think that it creates > more harm than good. > > > My proposal. I would replace the "confusing" paragraph with > something like: > > * ``effective_loglevel`` (r): The effective loglevel after considering all > loglevel authorities. For example, it would show the value of > the console-specific loglevel when it is defined or the global > console loglevel value when the console-specific one is not defined. > > > +* ``effective_loglevel_source`` (r): The loglevel authority which resulted in > > + the effective loglevel being set. The following values can be present: > > + Please, ignore this mail. It was a draft that I sent by mistake. Let's follow the discussion in my proper review against v5, see https://lore.kernel.org/r/ZEp9dXwHCYNPidjC@alley Best Regards, Petr