Re: [PATCHv2] locking/atomics: build atomic headers as required
From: Mark Rutland
Date: Mon Dec 10 2018 - 12:54:01 EST
On Thu, Dec 06, 2018 at 05:13:44PM +0100, Ingo Molnar wrote:
> * Mark Rutland <mark.rutland@xxxxxxx> 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.
> 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:
As I've just mentioned in another thread, I've sent out a couple of patches
attempting to address this while leaving the headers checked-in: