Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp34812pxb; Tue, 23 Feb 2021 17:11:27 -0800 (PST) X-Google-Smtp-Source: ABdhPJzbtYPRCp3x3x2qtiVAFKGdSR38ot4AeHShu7GmzfgiskLlR+nHgEXnlv1bDBlVBt9RpZaY X-Received: by 2002:a05:6402:899:: with SMTP id e25mr19867380edy.212.1614129087774; Tue, 23 Feb 2021 17:11:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614129087; cv=none; d=google.com; s=arc-20160816; b=A+KX/Xzy+/7fi4WBh1CAEeFe161Mtod/2fhljSAaPrLgWZ2Clj8k5IB8N1Rv3GyPHp 8Lw0PDBhmygrKBMtdhML80TwFQaRRd86SnV5zRds7LPYSoy78zBIvMVVR8I1ciAVBcZ8 OkvcRvrDU3mFwt+wQ5TX4ueO/gTRca7c6N760hyi/hJS51PP9s7WUKLPr58uRFfUceu0 uPluolPKFSlUAPfIvbdTZ2V1vvR1azSn9G6ZX6nFbNH7mqdVyDlvFfb/osM2084fiBSC Zinb0hEI4yL9mPLaePwvz/XCnH4Jfs2Hk/e+H54SsqX1BPJ4rtW1STkWouDPSjTIvh+Z 4O4w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=d8bhfTDGI9W39QzlxnPPLrP0VWvKUzQ7BK1mYKgo9bA=; b=xUqp1nppKGZ46Ft2CAu+cWT6C8cB6CgDCRfC1N5MNmehJQZs1W+rApFP9rqekHhJZe 7G6PWTlQdjlMXm6ES15FJ9KXvTZ01othXFK6Xfa76vPzq8nWRAQJRkqii20L0xrCf67N wKVT7K0c7AxfPaGVndPvb2cCGzG09vai9eGEs3HubyDYkH6kEwmo01/BemyenHdE4mbG Q3IVBY0NSwW9Z6uuKk11lXHoyaGGA5bJnvFPepdupCjWw40qhlgNT3P1zYiZ/lmafxiq TGrs8XFa/EbKmpaxWB4wR80Qf12mEZgI3lCnFFV7wSAUjrdneZHaO/cdfTCcAzZ/p8m9 5+MQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=tyPZC6Rj; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id js1si274274ejc.662.2021.02.23.17.11.00; Tue, 23 Feb 2021 17:11:27 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=tyPZC6Rj; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233805AbhBXBAj (ORCPT + 99 others); Tue, 23 Feb 2021 20:00:39 -0500 Received: from mail.kernel.org ([198.145.29.99]:58444 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234843AbhBXAVS (ORCPT ); Tue, 23 Feb 2021 19:21:18 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id CD45964EBA; Tue, 23 Feb 2021 23:59:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1614124771; bh=d8bhfTDGI9W39QzlxnPPLrP0VWvKUzQ7BK1mYKgo9bA=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=tyPZC6RjnjTj5pSU0VB5e1epmkPcWqFelbhkY5W/hh2lFen0FTZzCmFc5u17S2UCk IUSj3R471D3GfQF/drgrtOjwe7spQ1LnOgtgOzfnMDBUQ2OGFkyfHqVYvrKXQZCiSB eRxQSOkQP17CrQDHw7ddHEbq2DSmVh6i/dhiZFVf3otifw20icBRYDmZep5ju9LM2u euuj2/2vGT/CBWoMf2XS1HiYHF9GO9uZirW5lFTyg2VyilW+BT9i6qDnYgiN/1uYMD LNj0mMEZa+V0yE4oEd7A+yGNHhVoDIWWj8Ur2EBsMn3sjpWwuA83Ccp+0fj7cm7z8i PkV5hwELppe5Q== Received: by mail-ed1-f42.google.com with SMTP id j9so475807edp.1; Tue, 23 Feb 2021 15:59:30 -0800 (PST) X-Gm-Message-State: AOAM5301dM/ZRoxwJI9xTVMMbuO9CwTQ5ZyIFMKPaBWLIITLSpc2tbhz hfrKqogjlmxpgbOGPP0h+V6/NvgubxiJJInyuw== X-Received: by 2002:a05:6402:164e:: with SMTP id s14mr17830402edx.62.1614124769468; Tue, 23 Feb 2021 15:59:29 -0800 (PST) MIME-Version: 1.0 References: <20210223181425.4010665-1-robh@kernel.org> <20210223181425.4010665-4-robh@kernel.org> In-Reply-To: From: Rob Herring Date: Tue, 23 Feb 2021 17:59:17 -0600 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 3/3] kbuild: Add a build check for missing gitignore entries To: Linus Torvalds Cc: Masahiro Yamada , Michal Marek , Linux Kbuild mailing list , Andy Lutomirski , Thomas Gleixner , Ingo Molnar , Borislav Petkov , "the arch/x86 maintainers" , "H. Peter Anvin" , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Feb 23, 2021 at 5:20 PM Linus Torvalds wrote: > > On Tue, Feb 23, 2021 at 10:14 AM Rob Herring wrote: > > > > Any non-phony targets need to be in gitignore. The normal way to check > > this is doing an in-tree build and running git-status which is easy to > > miss. Git provides an easy way to check whether a file is ignored with > > git-check-ignore. Let's add a build time check using it. > > This looks ridiculously expensive with a shell and git invocation for > every single target just for this check. I was a bit worried too initially, but casually didn't notice any difference so I didn't do any measurements. Now I have, and it looks like it adds about 2 sec on a rebuild with no changes. I probably can rework it to a single shell and git call per invocation of Makefile.lib. What I really need is git-check-ignore to take '-n' without '-v', but grep can solve that. Here's the raw data: clean x86 defconfig: 1805.08user 165.87system 5:05.15elapsed 645%CPU (0avgtext+0avgdata 260180maxresident)k 110536inputs+1390704outputs (11major+52491225minor)pagefaults 0swaps rebuild with no changes: 12.61user 3.56system 0:04.32elapsed 374%CPU (0avgtext+0avgdata 38876maxresident)k 0inputs+1984outputs (0major+755708minor)pagefaults 0swaps adding this commit and rebuild: 14.90user 4.80system 0:06.50elapsed 303%CPU (0avgtext+0avgdata 39160maxresident)k 80inputs+1992outputs (0major+1402830minor)pagefaults 0swaps clean x86 defconfig with this commit: 1799.10user 165.84system 5:06.19elapsed 641%CPU (0avgtext+0avgdata 259932maxresident)k 8inputs+1390712outputs (0major+53146757minor)pagefaults 0swaps another rebuild with this commit: 14.55user 4.85system 0:06.14elapsed 315%CPU (0avgtext+0avgdata 38664maxresident)k 0inputs+1992outputs (0major+1402878minor)pagefaults 0swaps Rob