From: Jiri Pirko <jiri@resnulli.us>
To: Jakub Kicinski <kuba@kernel.org>
Cc: davem@davemloft.net, netdev@vger.kernel.org, edumazet@google.com,
pabeni@redhat.com
Subject: Re: [PATCH net-next] tools: ynl-gen: don't touch the output file if content is the same
Date: Sat, 28 Oct 2023 10:26:30 +0200 [thread overview]
Message-ID: <ZTzFtiReRQUSKdoq@nanopsycho> (raw)
In-Reply-To: <20231027223408.1865704-1-kuba@kernel.org>
Sat, Oct 28, 2023 at 12:34:08AM CEST, kuba@kernel.org wrote:
>I often regenerate all YNL files in the tree to make sure they
>are in sync with the codegen and specs. Generator rewrites
>the files unconditionally, so since make looks at file modification
>time to decide what to rebuild - my next build takes longer.
>
>We already generate the code to a tempfile most of the time,
>only overwrite the target when we have to.
>
>Before:
>
> $ stat include/uapi/linux/netdev.h
> File: include/uapi/linux/netdev.h
> Size: 2307 Blocks: 8 IO Block: 4096 regular file
> Access: 2023-10-27 15:19:56.347071940 -0700
> Modify: 2023-10-27 15:19:45.089000900 -0700
> Change: 2023-10-27 15:19:45.089000900 -0700
> Birth: 2023-10-27 15:19:45.088000894 -0700
>
> $ ./tools/net/ynl/ynl-regen.sh -f
> [...]
>
> $ stat include/uapi/linux/netdev.h
> File: include/uapi/linux/netdev.h
> Size: 2307 Blocks: 8 IO Block: 4096 regular file
> Access: 2023-10-27 15:19:56.347071940 -0700
> Modify: 2023-10-27 15:22:18.417968446 -0700
> Change: 2023-10-27 15:22:18.417968446 -0700
> Birth: 2023-10-27 15:19:45.088000894 -0700
>
>After:
>
> $ stat include/uapi/linux/netdev.h
> File: include/uapi/linux/netdev.h
> Size: 2307 Blocks: 8 IO Block: 4096 regular file
> Access: 2023-10-27 15:22:41.520114221 -0700
> Modify: 2023-10-27 15:22:18.417968446 -0700
> Change: 2023-10-27 15:22:18.417968446 -0700
> Birth: 2023-10-27 15:19:45.088000894 -0700
>
> $ ./tools/net/ynl/ynl-regen.sh -f
> [...]
>
> $ stat include/uapi/linux/netdev.h
> File: include/uapi/linux/netdev.h
> Size: 2307 Blocks: 8 IO Block: 4096 regular file
> Access: 2023-10-27 15:22:41.520114221 -0700
> Modify: 2023-10-27 15:22:18.417968446 -0700
> Change: 2023-10-27 15:22:18.417968446 -0700
> Birth: 2023-10-27 15:19:45.088000894 -0700
>
>Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Reviewed-by: Jiri Pirko <jiri@nvidia.com>
next prev parent reply other threads:[~2023-10-28 8:26 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-27 22:34 [PATCH net-next] tools: ynl-gen: don't touch the output file if content is the same Jakub Kicinski
2023-10-28 8:26 ` Jiri Pirko [this message]
2023-11-02 5:20 ` patchwork-bot+netdevbpf
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=ZTzFtiReRQUSKdoq@nanopsycho \
--to=jiri@resnulli.us \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.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.