From: Ingo Molnar <mingo@kernel.org>
To: Mark Rutland <mark.rutland@arm.com>
Cc: linux-kernel@vger.kernel.org,
Andrew Morton <akpm@linux-foundation.org>,
Boqun Feng <boqun.feng@gmail.com>, Borislav Petkov <bp@suse.de>,
Peter Zijlstra <peterz@infradead.org>,
Will Deacon <will.deacon@arm.com>
Subject: Re: [PATCHv2] locking/atomics: build atomic headers as required
Date: Thu, 6 Dec 2018 17:13:44 +0100 [thread overview]
Message-ID: <20181206161344.GA110430@gmail.com> (raw)
In-Reply-To: <20181128085455.1164-1-mark.rutland@arm.com>
* Mark Rutland <mark.rutland@arm.com> wrote:
> Andrew and Ingo report that the check-atomics.sh script is simply too
> slow to run for every kernel build, and it's impractical to make it
> faster without rewriting it in something other than shell.
>
> Rather than committing the generated headers, let's regenerate these
> as-required, if we change the data or scripts used to generate the
> atomic headers, or when building from a pristine tree.
>
> That ensures they're always up-to-date, allows them to be built in
> parallel, and avoid redundant rebuilds, which is a 2-8s saving per
> incremental build. Since the results are not committed, it's very
> obvious that they should not be modified directly. If we need to
> generate more headers in future, it's easy to extend Makefile.genheader
> to permit this.
>
> I've verified that this works in the cases we previously had issues with
> (out-of-tree builds and where scripts have no execute permissions), and
> have tested these cases for both x86_64 and arm64.
>
> The diffstat looks nice, at least...
>
> Signed-off-by: Mark Rutland <mark.rutland@arm.com>
> Cc: Andrew Morton <akpm@linux-foundation.org>
> Cc: Boqun Feng <boqun.feng@gmail.com>
> Cc: Borislav Petkov <bp@suse.de>
> Cc: Ingo Molnar <mingo@kernel.org>
> Cc: Peter Zijlstra <peterz@infradead.org>
> Cc: Will Deacon <will.deacon@arm.com>
> Cc: linux-kernel@vger.kernel.org
> ---
> Kbuild | 18 +-
> Makefile | 8 +-
> arch/arm64/include/asm/atomic.h | 2 +-
> arch/x86/include/asm/atomic.h | 2 +-
> include/asm-generic/atomic-instrumented.h | 1787 ----------------------
> include/asm-generic/atomic-long.h | 1012 -------------
> include/linux/atomic-fallback.h | 2294 -----------------------------
> include/linux/atomic.h | 4 +-
> scripts/Makefile.genheader | 26 +
> scripts/atomic/check-atomics.sh | 19 -
> 10 files changed, 38 insertions(+), 5134 deletions(-)
> delete mode 100644 include/asm-generic/atomic-instrumented.h
> delete mode 100644 include/asm-generic/atomic-long.h
> delete mode 100644 include/linux/atomic-fallback.h
> create mode 100644 scripts/Makefile.genheader
> delete mode 100755 scripts/atomic/check-atomics.sh
So these 'automatically generated' headers are actual and important code,
and I think it's bad practice to remove these from the git grep search
space and history as well.
Really, this whole notion of auto-generating the headers should be
implemented correctly, instead of working around deficiencies in a
short-term fashion that introduces other deficiencies.
I never got any replies to my previous comments about this:
<20181128083057.GA7879@gmail.com>
Did I miss some mails of yours perhaps?
Thanks,
Ingo
next prev parent reply other threads:[~2018-12-06 16:13 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-28 8:54 [PATCHv2] locking/atomics: build atomic headers as required Mark Rutland
2018-11-28 9:24 ` [GIT PULL] atomic regeneration (was "[PATCHv2] locking/atomics: build atomic headers as required") Mark Rutland
2018-12-06 16:13 ` Ingo Molnar [this message]
2018-12-06 17:45 ` [PATCHv2] locking/atomics: build atomic headers as required Mark Rutland
2018-12-10 17:53 ` Mark Rutland
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20181206161344.GA110430@gmail.com \
--to=mingo@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=boqun.feng@gmail.com \
--cc=bp@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=peterz@infradead.org \
--cc=will.deacon@arm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.