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, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS 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 11022C433E1 for ; Sat, 27 Mar 2021 22:19:06 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id DDB2961995 for ; Sat, 27 Mar 2021 22:19:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231173AbhC0WSh (ORCPT ); Sat, 27 Mar 2021 18:18:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36080 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231149AbhC0WST (ORCPT ); Sat, 27 Mar 2021 18:18:19 -0400 Received: from zeniv-ca.linux.org.uk (zeniv-ca.linux.org.uk [IPv6:2607:5300:60:148a::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 26AA8C0613B1 for ; Sat, 27 Mar 2021 15:18:19 -0700 (PDT) Received: from viro by zeniv-ca.linux.org.uk with local (Exim 4.94 #2 (Red Hat Linux)) id 1lQHFs-000JlC-J3; Sat, 27 Mar 2021 22:18:04 +0000 Date: Sat, 27 Mar 2021 22:18:04 +0000 From: Al Viro To: Andy Shevchenko Cc: linux-kernel@vger.kernel.org, Andrew Morton , Yury Norov , Rasmus Villemoes Subject: Re: [PATCH v1 1/1] kernel.h: Drop inclusion in bitmap.h Message-ID: References: <20210326170347.37441-1-andriy.shevchenko@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210326170347.37441-1-andriy.shevchenko@linux.intel.com> Sender: Al Viro Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Mar 26, 2021 at 07:03:47PM +0200, Andy Shevchenko wrote: > The bitmap.h header is used in a lot of code around the kernel. > Besides that it includes kernel.h which sometimes makes a loop. How much of the kernel does *not* end up pulling kernel.h anyway, making all subsequent includes fast no-ops? Realistically, any C compiler is going to recognize the case when included file has contents of form #ifndef #define #endif where contain no exposed #else, #elif or #endif and remember that subsequent includes of that file should be ignored unless becomes undefined. AFAICS, on e.g. allmodconfig amd64 build it's (at most - there might've been false positives) 131 files out of ~30000; on defconfig it's 55 out of ~2300. How much does your patch change that?