From: Greg KH <gregkh@linuxfoundation.org>
To: John Garry <john.g.garry@oracle.com>
Cc: mcgrof@kernel.org, russ.weight@linux.dev, rafael@kernel.org,
rostedt@goodmis.org, mhiramat@kernel.org,
mathieu.desnoyers@efficios.com, davem@davemloft.net,
edumazet@google.com, kuba@kernel.org, pabeni@redhat.com,
keescook@chromium.org, masahiroy@kernel.org, nathan@kernel.org,
nicolas@fjasle.eu, linux-kernel@vger.kernel.org,
linux-trace-kernel@vger.kernel.org, netdev@vger.kernel.org,
linux-kbuild@vger.kernel.org
Subject: Re: [PATCH RFC 0/4] Introduce uts_release
Date: Wed, 31 Jan 2024 08:22:48 -0800 [thread overview]
Message-ID: <2024013158-dipper-mural-424b@gregkh> (raw)
In-Reply-To: <20240131104851.2311358-1-john.g.garry@oracle.com>
On Wed, Jan 31, 2024 at 10:48:47AM +0000, John Garry wrote:
> When hacking it is a waste of time and compute energy that we need to
> rebuild much kernel code just for changing the head git commit, like this:
>
> > touch include/generated/utsrelease.h
> > time make -j3
> mkdir -p /home/john/mnt_sda4/john/kernel-dev2/tools/objtool && make O=/home/john/mnt_sda4/john/kernel-dev2 subdir=tools/objtool --no-print-directory -C objtool
> INSTALL libsubcmd_headers
> CALL scripts/checksyscalls.sh
> CC init/version.o
> AR init/built-in.a
> CC kernel/sys.o
> CC kernel/module/main.o
> AR kernel/module/built-in.a
> CC drivers/base/firmware_loader/main.o
> CC kernel/trace/trace.o
> AR drivers/base/firmware_loader/built-in.a
> AR drivers/base/built-in.a
> CC net/ethtool/ioctl.o
> AR kernel/trace/built-in.a
> AR kernel/built-in.a
> AR net/ethtool/built-in.a
> AR net/built-in.a
> AR drivers/built-in.a
> AR built-in.a
> ...
>
> Files like drivers/base/firmware_loader/main.c needs to be recompiled as
> it includes generated/utsrelease.h for UTS_RELEASE macro, and utsrelease.h
> is regenerated when the head commit changes.
>
> Introduce global char uts_release[] in init/version.c, which this
> mentioned code can use instead of UTS_RELEASE, meaning that we don't need
> to rebuild for changing the head commit - only init/version.c needs to be
> rebuilt. Whether all the references to UTS_RELEASE in the codebase are
> proper is a different matter.
>
> For an x86_64 defconfig build for this series on my old laptop, here is
> before and after rebuild time:
>
> before:
> real 0m53.591s
> user 1m1.842s
> sys 0m9.161s
>
> after:
> real 0m37.481s
> user 0m46.461s
> sys 0m7.199s
>
> Sending as an RFC as I need to test more of the conversions and I would
> like to also convert more UTS_RELEASE users to prove this is proper
> approach.
I like it, I also think that v4l2 includes this as well as all of those
drivers seem to rebuild when this changes, does that not happen for you
too?
Anyway, if the firmware changes work, I'm all for this, thanks for
taking it on!
thanks,
greg k-h
next prev parent reply other threads:[~2024-01-31 16:22 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-31 10:48 [PATCH RFC 0/4] Introduce uts_release John Garry
2024-01-31 10:48 ` [PATCH RFC 1/4] init: Add uts_release John Garry
2024-01-31 10:48 ` [PATCH RFC 2/4] tracing: Use uts_release John Garry
2024-01-31 19:27 ` Steven Rostedt
2024-01-31 10:48 ` [PATCH RFC 3/4] net: ethtool: " John Garry
2024-01-31 19:24 ` Jakub Kicinski
2024-02-01 12:57 ` John Garry
2024-02-01 13:20 ` Jiri Pirko
2024-02-01 16:09 ` Jakub Kicinski
2024-02-01 16:20 ` John Garry
2024-01-31 10:48 ` [PATCH RFC 4/4] firmware_loader: " John Garry
2024-01-31 16:22 ` Greg KH [this message]
2024-01-31 17:16 ` [PATCH RFC 0/4] Introduce uts_release John Garry
2024-01-31 21:26 ` Greg KH
2024-02-02 15:01 ` Masahiro Yamada
2024-02-02 18:29 ` Jakub Kicinski
2024-02-05 8:25 ` John Garry
2024-02-05 23:10 ` Masahiro Yamada
2024-02-08 10:08 ` John Garry
2024-02-21 9:00 ` John Garry
2024-02-21 11:50 ` Masahiro Yamada
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=2024013158-dipper-mural-424b@gregkh \
--to=gregkh@linuxfoundation.org \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=john.g.garry@oracle.com \
--cc=keescook@chromium.org \
--cc=kuba@kernel.org \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-trace-kernel@vger.kernel.org \
--cc=masahiroy@kernel.org \
--cc=mathieu.desnoyers@efficios.com \
--cc=mcgrof@kernel.org \
--cc=mhiramat@kernel.org \
--cc=nathan@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=nicolas@fjasle.eu \
--cc=pabeni@redhat.com \
--cc=rafael@kernel.org \
--cc=rostedt@goodmis.org \
--cc=russ.weight@linux.dev \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).