Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp42809pxb; Tue, 23 Feb 2021 17:26:54 -0800 (PST) X-Google-Smtp-Source: ABdhPJx5uRc3JK+w1OBt3TEwHEtpJGyz6/v4Nb+B8iNHsMbac9cohwLqN1/npBN8DCvsICcEtRHQ X-Received: by 2002:a17:906:510:: with SMTP id j16mr28544932eja.277.1614130014207; Tue, 23 Feb 2021 17:26:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614130014; cv=none; d=google.com; s=arc-20160816; b=E2//NVinK5DkNl9yd3MSMsIDAvNFk3cSNE3O9s5a6pwI7MMT++ClTEsvWHwF3XQvV7 ISx4fgK5NWRzqSygQIHgJCVSdOIuQAKE4QY/OjkmGTqhHtc2aEiCALHTxiH6pIiQhMgu Kl9tE05Xi7r5YGVavQBeLHEGC93crDZn4Cwev7CL1BAgvXt+lfEUdVxWSMoQvBTf0jBc UARU2HLnPT/NU3/tvDBjhIbnm9UDxHzJIqI2rT3Ltk9VDcNf4b0Rn9rSHfh7tKGJoqth 4Yta6Q9LvokowLbuPGQyB0zHJPl6RBZom9fTz4+mnO4EX9rMRryCsQOBJCJW8k0Gk8bd A2iA== 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:dkim-filter; bh=58nlSjH7ev/k6UNl8tD5zDkVjNz+kCtEoOrBQkkT2jc=; b=qW0vy3scM9croPDVK5upZrhf6sniRht68dVKv5HCIKitGo56FFRtv133HjbLR5ecaD bazfMn6nZBQdOQLYhg5RWCYgEP7e1PhWF8D1vQ22Jy3FbpdZXQ5wkNa0GaOG79O1EW0O t1N7TOuymFsPQzmpEVWipmnrjqrAfk1mj99WkcgKxl9lt9bOgHaI6xfUbuskfFQPEJs8 0VcNZo5XrzT4bU1557jTPIu1uL6aQECbC3kamFxbyz6CX75pMTzxfc2HmU1upT3LC5nQ 0DxkzuZpYWjuHUt/9hRh9W5GLxKbRPtlMNbYLEiIH59Mim6/F2A4BqitE1sIelA/BWXi JZew== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=Ak0UhE5y; 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 c5si159561edk.64.2021.02.23.17.26.25; Tue, 23 Feb 2021 17:26:54 -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=@nifty.com header.s=dec2015msa header.b=Ak0UhE5y; 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 S234236AbhBXBX3 (ORCPT + 99 others); Tue, 23 Feb 2021 20:23:29 -0500 Received: from conssluserg-04.nifty.com ([210.131.2.83]:46437 "EHLO conssluserg-04.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232818AbhBXBP5 (ORCPT ); Tue, 23 Feb 2021 20:15:57 -0500 Received: from mail-pg1-f171.google.com (mail-pg1-f171.google.com [209.85.215.171]) (authenticated) by conssluserg-04.nifty.com with ESMTP id 11O1EmEG018923; Wed, 24 Feb 2021 10:14:48 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conssluserg-04.nifty.com 11O1EmEG018923 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1614129288; bh=58nlSjH7ev/k6UNl8tD5zDkVjNz+kCtEoOrBQkkT2jc=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=Ak0UhE5ywgPW9X1rvOYl2P7Rfjm2i7yKP6bnzqIcreuqGV4xqVGq3yy+w+iKtwbN6 fHEihePzSPb4RxuVHFupJL9/3MdCW1GBasiDOTIK9wRkIEg4vYN3MrBToSaRpW6Rac gsp3KkIx8gwauhAv7kSnNT/VPgA6hHrnZYqzpDM2M7//r8rjiNfHX+dk1csNSxoRNa 26j1n4Vyy6saTgWczjhrHcN5dgeOLTMlvg7PlfHgaDRn4V05zcKojH/dRDoU9GrjAk s9ozr697fy/ap2HSTWhhqZIUWe9U185xGozmPE3pPd97y4zVVP8f8ZkkRnQ4Evbcfv zv3a2WoF5xnhw== X-Nifty-SrcIP: [209.85.215.171] Received: by mail-pg1-f171.google.com with SMTP id g4so379004pgj.0; Tue, 23 Feb 2021 17:14:48 -0800 (PST) X-Gm-Message-State: AOAM533a25NOh4+M9bZ/utIh+sQpvlUyPQeujX4TYkng94sX/qmJtUAl LD9ULKE30xlCMPzWddaHVdCACbt5qvinx828lNc= X-Received: by 2002:a62:b416:0:b029:1e4:fb5a:55bb with SMTP id h22-20020a62b4160000b02901e4fb5a55bbmr28292875pfn.80.1614129287543; Tue, 23 Feb 2021 17:14:47 -0800 (PST) MIME-Version: 1.0 References: <20210223181425.4010665-1-robh@kernel.org> <20210223181425.4010665-4-robh@kernel.org> In-Reply-To: From: Masahiro Yamada Date: Wed, 24 Feb 2021 10:14:10 +0900 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 3/3] kbuild: Add a build check for missing gitignore entries To: Rob Herring Cc: Linus Torvalds , 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 Wed, Feb 24, 2021 at 8:59 AM Rob Herring wrote: > > 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 run "git status" in my usual development flow, and my eyes eventually catch non-tracked files, if any. As a fact, Linus noticed the untracked fdtoverlay soon (but not soon enough to push back the pull request). So, I am not convinced with doing this in the build time. This is ugly and expensive. Maybe we can ask Intel's 0day bot team to run "git status" after the build test. (Or, we can ask Stephen Rothwell to do this.) As it turns out, this detects more than just missed .gitignore addition, but looking at 1/3 and 2/3, people cannot fix the issues properly, rather just try to blindly suppress the warnings to make the code even worse. > 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 -- Best Regards Masahiro Yamada