From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 88D6EC48BE5 for ; Thu, 17 Jun 2021 10:02:40 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 6D03561185 for ; Thu, 17 Jun 2021 10:02:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231768AbhFQKEq (ORCPT ); Thu, 17 Jun 2021 06:04:46 -0400 Received: from smtp-out1.suse.de ([195.135.220.28]:35576 "EHLO smtp-out1.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230039AbhFQKEk (ORCPT ); Thu, 17 Jun 2021 06:04:40 -0400 Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out1.suse.de (Postfix) with ESMTP id 22B0E21AF5; Thu, 17 Jun 2021 10:02:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1623924152; 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=ojBtLjKaTiNoUvukSQBDvFG3kZgKSaHUvdZcj5mHzg8=; b=uzBXPGkpANMx7FCZGcH7yhpcFgcg19TErgQRmmrML3CURvcDsTbAOR3bxVeQ1k1qL3Gppo jVfGwJ3RKBxyi6EgIEIGYXp5VmqAjudMPZY2P5fto7CP78X1lMiz4UyXudURkPqpV+Gqt2 rh7RnykaYPDPGSysIyEHMdjCiapjD58= 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 DD0EEA3BB7; Thu, 17 Jun 2021 10:02:31 +0000 (UTC) Date: Thu, 17 Jun 2021 12:02:31 +0200 From: Petr Mladek To: Chris Down Cc: linux-kernel@vger.kernel.org, Jessica Yu , Sergey Senozhatsky , John Ogness , Steven Rostedt , Greg Kroah-Hartman , Johannes Weiner , Kees Cook , Andy Shevchenko , Rasmus Villemoes , kernel-team@fb.com Subject: Re: [PATCH v7 5/5] printk: index: Add indexing support to dev_printk Message-ID: References: <959c7aed1017cb2c9de922e0a820d397e29c6a5a.1623775748.git.chris@chrisdown.name> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <959c7aed1017cb2c9de922e0a820d397e29c6a5a.1623775748.git.chris@chrisdown.name> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue 2021-06-15 17:52:56, Chris Down wrote: > While for most kinds of issues we have counters, tracepoints, or metrics > with a stable interface which can reliably be used to indicate issues, > in order to react to production issues quickly we sometimes need to work > with the interface which most kernel developers naturally use when > developing: printk, and printk-esques like dev_printk. > > dev_printk is by far the most likely custom subsystem printk to benefit > from the printk indexing infrastructure, since niche device issues > brought about by production changes, firmware upgrades, and the like are > one of the most common things that we need printk infrastructure's > assistance to monitor. > > Often these errors were never expected to practically manifest in > reality, and exhibit in code without extensive (or any) metrics present. > As such, there are typically very few options for issue detection > available to those with large fleets at the time the incident happens, > and we thus benefit strongly from monitoring netconsole in these > instances. > > As such, add the infrastructure for dev_printk to be indexed in the > printk index. Even on a minimal kernel config, the coverage of the base > kernel's printk index is significantly improved: > > Before: > > [root@ktst ~]# wc -l /sys/kernel/debug/printk/index/vmlinux > 4497 /sys/kernel/debug/printk/index/vmlinux > > After: > > [root@ktst ~]# wc -l /sys/kernel/debug/printk/index/vmlinux > 5573 /sys/kernel/debug/printk/index/vmlinux > > In terms of implementation, in order to trivially disambiguate them, > dev_printk is now a macro which wraps _dev_printk. > > Signed-off-by: Chris Down Reviewed-by: Petr Mladek Tested-by: Petr Mladek Best Regards, Petr