Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp1503666pxb; Thu, 14 Apr 2022 07:34:20 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxfcKx1EgdqVKXGss5IeRSSDcZcHFD755nUXYYU4TJN0YVHSc+zhK/7XwcQVryX4JoRCMia X-Received: by 2002:a17:906:3a04:b0:6d0:8d78:2758 with SMTP id z4-20020a1709063a0400b006d08d782758mr2610089eje.685.1649946860523; Thu, 14 Apr 2022 07:34:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649946860; cv=none; d=google.com; s=arc-20160816; b=knAOf3rCiHtvHK1KqU6KhJ1i1LfXdPgc+PPr/rH0mDdIXoNI8mUI/ObTOkiITrQUav Yz5WLMNTSlzc76pzy8D6/lYsAVLv33SvR96cNhKaLLbn9UmSCZhYGRyzMUCUgN3qhs4n xItT/azAPFZWedzWqgz8CehuZ09dAPb88TyoLvPRdlyqnOckm8qCg1ur4Z7Q6kNIlfJ0 GhYENZpU+KDje32+URTJoFcBMnd+nYHktLFPsYk38IcZfrWFfFsv5Vn4vDdDZLPSKa2F 7QQEGtav8hiYknuzxJVZqrRga+fPrPMfhW6waDV5xT+Qp2FILC8UU4Is0B5I2am6kQNK aRMA== 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=oHveYnTR4O71wsHS4RHblj+dtZiwY1YycG/UmcBzgWE=; b=et1xqAqyv7xCvfgyPnVAYkxn9oFBo/ydrR914W1gZGRm1mMKEkFBqwBTDyClZ/QXEY oikOc6uzcB/u6Jeou/WW3p7ms0UzzCUlMTW9B/b0xqqEG7GYAzzpGziF6JzfhOL+/J8m 6VHhj4CVbLMtjY8PUlr8HnKdZg5pJp5Z8wRJs18/kqFM7rkIkbfEx1p587EC9vHUix6y roJbTXl6kyNZs9zVdSKTXYKaJ8pMxZYCD6cQFvimd5NXvHKVDH4UPl7oDmhL3Bi5jgNW iunp7hOh5fXu3xFO5GArpLdfroanBLkBubzBVbUWcNzFQyiTtcXF36aKjz02h5ZaGPXv /Xvg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=d9PRZucw; 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 hr34-20020a1709073fa200b006e894ed1a28si2865116ejc.593.2022.04.14.07.33.44; Thu, 14 Apr 2022 07:34:20 -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=d9PRZucw; 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 S235526AbiDMMmU (ORCPT + 99 others); Wed, 13 Apr 2022 08:42:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46242 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232981AbiDMMmT (ORCPT ); Wed, 13 Apr 2022 08:42:19 -0400 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C79775FD7 for ; Wed, 13 Apr 2022 05:39:57 -0700 (PDT) Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out2.suse.de (Postfix) with ESMTP id 7EE451F856; Wed, 13 Apr 2022 12:39:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1649853596; 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=oHveYnTR4O71wsHS4RHblj+dtZiwY1YycG/UmcBzgWE=; b=d9PRZucw/+GHfElRTeUb3qeZKy/B31oTOTTEXb92DW6lBJhCaMoUjJuCrY5bCeVxbM1cMT v7IgJRdKfqaeJ++OZm/EGFLxFt6cZqQbpFcyXterl0ehs2bU8qDQXMY3y94H6RF0sqoJRM CE8zoniFt2ivu5mqxCSaFv3PPLJEs9A= Received: from suse.cz (unknown [10.100.224.162]) (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 207F0A3B88; Wed, 13 Apr 2022 12:39:56 +0000 (UTC) Date: Wed, 13 Apr 2022 14:39:53 +0200 From: Petr Mladek To: Chris Down Cc: John Ogness , Sergey Senozhatsky , Steven Rostedt , Dave Chinner , "Darrick J . Wong" , linux-kernel@vger.kernel.org Subject: Re: [PATCH] printk/index: Printk index feature documentation Message-ID: References: <20220405114829.31837-1-pmladek@suse.com> 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 2022-04-05 13:22:49, Chris Down wrote: > Petr Mladek writes: > > Document the printk index feature. The primary motivation is to > > explain that it is not creating KABI from particular printk() calls. > > > > Signed-off-by: Petr Mladek > > Acked-by: Sergey Senozhatsky > > This looks great, thanks a lot for spending the time to write this up. Just > some very minor comments. Ah, I forgot to do the small fixup when pushing. So, I did it now are rebased. > > --- /dev/null > > +++ b/Documentation/core-api/printk-index.rst > > +User Interface > > +============== > > + > > +The index of printk formats are split in into separate files. The files are > > +named according to the binaries where the printk formats are built-in. There > > +is always "vmlinux" and optionally also modules, for example:: > > + > > + /sys/kernel/debug/printk/index/vmlinux > > + /sys/kernel/debug/printk/index/ext4 > > + /sys/kernel/debug/printk/index/scsi_mod > > + > > +Note that only loaded modules are shown. Also printk formats from a module > > +might appear in "vmlinux" when the module is built-in. > > + > > +The content is inspired by the dynamic debug interface and looks like:: > > s/::/:/ The double double dots '::' cause that the following paragraph will be block quoting. There is only single ':' in the generated html. > > + $> head -1 /sys/kernel/debug/printk/index/vmlinux; shuf -n 5 vmlinux > > + # filename:line function "format" > > + <5> block/blk-settings.c:661 disk_stack_limits "%s: Warning: Device %s is misaligned\n" > > + <4> kernel/trace/trace.c:8296 trace_create_file "Could not create tracefs '%s' entry\n" > > + <6> arch/x86/kernel/hpet.c:144 _hpet_print_config "hpet: %s(%d):\n" > > + <6> init/do_mounts.c:605 prepare_namespace "Waiting for root device %s...\n" > > + <6> drivers/acpi/osl.c:1410 acpi_no_auto_serialize_setup "ACPI: auto-serialization disabled\n" > > + > > +, where the meaning is:: I uses only single double dot here. > > + - level: log level > > Maybe worth noting that level may not be there if we have a KERN_CONT. I added: - :level: log level value: 0-7 for particular severity, -1 as default, 'c' as continuous line without an explicit log level > > + - flags: optional flags: currently only 'c' for KERN_CONT > + - filename:line: source filename and line number of the related > > + printk() call. Note that there are many wrappers, for example, > > + pr_warn(), pr_warn_once(), dev_warn(). > > + - function: function name where the printk() call is used. > > + - format: format string I added few more double dots to generate bold: 'level', 'flags', 'filename:line', etc. See the updated commit at https://git.kernel.org/pub/scm/linux/kernel/git/printk/linux.git/commit/?h=for-5.19&id=a5c7a39f508ae1fd3288493b96dd26079bae41bf Best Regards, Petr