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=-3.8 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no 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 9D855C433DB for ; Tue, 2 Feb 2021 23:05:06 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 41BA964E41 for ; Tue, 2 Feb 2021 23:05:06 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 41BA964E41 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 623A76E12E; Tue, 2 Feb 2021 23:05:05 +0000 (UTC) X-Greylist: delayed 57583 seconds by postgrey-1.36 at gabe; Tue, 02 Feb 2021 23:05:03 UTC Received: from conssluserg-03.nifty.com (conssluserg-03.nifty.com [210.131.2.82]) by gabe.freedesktop.org (Postfix) with ESMTPS id 989516E9BA for ; Tue, 2 Feb 2021 23:05:03 +0000 (UTC) Received: from mail-pl1-f173.google.com (mail-pl1-f173.google.com [209.85.214.173]) (authenticated) by conssluserg-03.nifty.com with ESMTP id 112N4kjv000730 for ; Wed, 3 Feb 2021 08:04:46 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conssluserg-03.nifty.com 112N4kjv000730 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1612307086; bh=UGA0Rplim8ZfC6e4whP20xTht9RzqhbWWxLaXhzWRUA=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=tOBe0hEHHf9tvmT3rHNnjBL9ugZuudIECWVtYvCik/AC2pP1I4bqBET4RIJ/vBKSB 0aRw/i7F91TD/PzkclnU2rVRXFMEw6JAzCx93I17/rKXeFG7l0py1WRGJG2fQCZQLj q99jD6spPDWOLAzyv0+yHJdvetuJ0mv8N9l2T+24C2KTXwMzAOnAFXBCq1xn8EfdZh EqvYL29bZ/OMZE6jEBXdHTulk62/GRSs0uLVCRks7bcTqFsH9kUUbnniWFdepR5nay nVRHIn7crbFdyzki6dQc69GxxIU1dobMhHCeavZav8fqc5flWT+QiFEmuYa9o3WH3Q 4bzZRX2Ms/k9g== X-Nifty-SrcIP: [209.85.214.173] Received: by mail-pl1-f173.google.com with SMTP id j11so10764499plt.11 for ; Tue, 02 Feb 2021 15:04:46 -0800 (PST) X-Gm-Message-State: AOAM530bVLyWqrmZaMWcB0sWlHVf2pOQ1b4Vc+AfYDjLoJA8OK0FW4Qv bUTz3fiJBgU7yJCSthgmOL4PrCnwZlPuORYjjTA= X-Google-Smtp-Source: ABdhPJxvtHfeu+crGL+CyXAo0FUYVHkXnleiaiv+dMA4n8+oso6WU2K79gP3aD12VFT56j8XRv47GWHWmTyr4FAXNxk= X-Received: by 2002:a17:90b:1b50:: with SMTP id nv16mr88481pjb.153.1612307085830; Tue, 02 Feb 2021 15:04:45 -0800 (PST) MIME-Version: 1.0 References: <20210202070218.856847-1-masahiroy@kernel.org> In-Reply-To: From: Masahiro Yamada Date: Wed, 3 Feb 2021 08:04:08 +0900 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 1/3] printk: use CONFIG_CONSOLE_LOGLEVEL_* directly To: Sergey Senozhatsky X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Linux Fbdev development list , linux-efi , Russ Anderson , Steve Wahl , dri-devel , platform-driver-x86@vger.kernel.org, Peter Jones , "H. Peter Anvin" , Jiri Slaby , Ard Biesheuvel , X86 ML , Ingo Molnar , Darren Hart , Petr Mladek , John Ogness , Mike Travis , Steven Rostedt , Borislav Petkov , Thomas Gleixner , Dimitri Sivanich , Greg Kroah-Hartman , Linux Kernel Mailing List , Andy Shevchenko Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" On Tue, Feb 2, 2021 at 7:09 PM Sergey Senozhatsky wrote: > > On (21/02/02 16:02), Masahiro Yamada wrote: > > > > CONSOLE_LOGLEVEL_DEFAULT is nothing more than a shorthand of > > CONFIG_CONSOLE_LOGLEVEL_DEFAULT. > > > > When you change CONFIG_CONSOLE_LOGLEVEL_DEFAULT from Kconfig, almost > > all objects are rebuilt because CONFIG_CONSOLE_LOGLEVEL_DEFAULT is > > used in , which is included from most of source files. > > > > In fact, there are only 4 users of CONSOLE_LOGLEVEL_DEFAULT: > > > > arch/x86/platform/uv/uv_nmi.c > > drivers/firmware/efi/libstub/efi-stub-helper.c > > drivers/tty/sysrq.c > > kernel/printk/printk.c > > > > So, when you change CONFIG_CONSOLE_LOGLEVEL_DEFAULT and rebuild the > > kernel, it is enough to recompile those 4 files. > > Do you change CONFIG_CONSOLE_LOGLEVEL_DEFAULT so often that it becomes a > problem? > > -ss is one of most included headers, so it is worth downsizing. CONSOLE_LOGLEVEL_DEFAULT is not such a parameter that printk() users need to know. Changing CONFIG_CONSOLE_LOGLEVEL_DEFAULT results in the rebuilds of the entire tree, which is a flag of bad code structure. So, this is not only CONSOLE_LOGLEVEL_DEFAULT. contains parameters and func declarations that printk() users do not need to know. Examples: CONSOLE_LOGLEVEL_DEFAULT log_buf_addr_get() log_buf_len_get() oops_in_progress ... They are only needed for those who want to more closely get access to the printk internals. Ideally, such parameters and func declarations can go to the subsystems' local header (kernel/printk/internal.h) but when it is not possible, they can be separated out to a different header. I can see a similar idea in the consumer/provider model in several subsystems. Consumers and providers are often orthogonal, and de-coupling them clarifies who needs what. See other subsystems, for example, - clk consumer - clk provider -- Best Regards Masahiro Yamada _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel