linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC PATCH] kbuild: avoid some unnecessary rebuild
@ 2013-03-17 21:50 Christopher Li
  2013-03-17 21:58 ` Sam Ravnborg
  0 siblings, 1 reply; 6+ messages in thread
From: Christopher Li @ 2013-03-17 21:50 UTC (permalink / raw)
  To: Michal Marek, Sam Ravnborg; +Cc: linux-kernel

[-- Attachment #1: Type: text/plain, Size: 593 bytes --]

In the current tip of git tree. If I do a allmodconfig full build, then follow
by a "make" again without changing any code in the tree.
There are some object will always get rebuild. e.g. eboot.o.
I use "make V=2", it shows that the rebuild is due to some object file
not in $(targets). I did not understand the $(targets) very well, the
Kbuild.include mention that It is likely a bug in the kbuild if that
happen.

I add them in the $(targets) and that seems avoid the unnecessary
rebuild of several objects. The second "make" has fewer output.
The clean rebuild seems works fine too.

Chris

[-- Attachment #2: kbuild-avoid-rebuild-some-object.patch --]
[-- Type: application/octet-stream, Size: 1640 bytes --]

usage: git [--version] [--exec-path[=<path>]] [--html-path] [--man-path] [--info-path]
           [-p|--paginate|--no-pager] [--no-replace-objects] [--bare]
           [--git-dir=<path>] [--work-tree=<path>] [--namespace=<name>]
           [-c name=value] [--help]
           <command> [<args>]

The most commonly used git commands are:
   add        Add file contents to the index
   bisect     Find by binary search the change that introduced a bug
   branch     List, create, or delete branches
   checkout   Checkout a branch or paths to the working tree
   clone      Clone a repository into a new directory
   commit     Record changes to the repository
   diff       Show changes between commits, commit and working tree, etc
   fetch      Download objects and refs from another repository
   grep       Print lines matching a pattern
   init       Create an empty git repository or reinitialize an existing one
   log        Show commit logs
   merge      Join two or more development histories together
   mv         Move or rename a file, a directory, or a symlink
   pull       Fetch from and merge with another repository or a local branch
   push       Update remote refs along with associated objects
   rebase     Forward-port local commits to the updated upstream head
   reset      Reset current HEAD to the specified state
   rm         Remove files from the working tree and from the index
   show       Show various types of objects
   status     Show the working tree status
   tag        Create, list, delete or verify a tag object signed with GPG

See 'git help <command>' for more information on a specific command.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [RFC PATCH] kbuild: avoid some unnecessary rebuild
  2013-03-17 21:50 [RFC PATCH] kbuild: avoid some unnecessary rebuild Christopher Li
@ 2013-03-17 21:58 ` Sam Ravnborg
  2013-03-17 22:08   ` Christopher Li
  0 siblings, 1 reply; 6+ messages in thread
From: Sam Ravnborg @ 2013-03-17 21:58 UTC (permalink / raw)
  To: Christopher Li; +Cc: Michal Marek, linux-kernel

On Sun, Mar 17, 2013 at 02:50:44PM -0700, Christopher Li wrote:
> In the current tip of git tree. If I do a allmodconfig full build, then follow
> by a "make" again without changing any code in the tree.
> There are some object will always get rebuild. e.g. eboot.o.
> I use "make V=2", it shows that the rebuild is due to some object file
> not in $(targets). I did not understand the $(targets) very well, the
> Kbuild.include mention that It is likely a bug in the kbuild if that
> happen.
> 
> I add them in the $(targets) and that seems avoid the unnecessary
> rebuild of several objects. The second "make" has fewer output.
> The clean rebuild seems works fine too.

We got no patch - just some git help stuff.
Seems you mistyped somthing..

	Sam

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [RFC PATCH] kbuild: avoid some unnecessary rebuild
  2013-03-17 21:58 ` Sam Ravnborg
@ 2013-03-17 22:08   ` Christopher Li
  2013-03-20 20:19     ` Sam Ravnborg
  2013-04-10  8:36     ` Michal Marek
  0 siblings, 2 replies; 6+ messages in thread
From: Christopher Li @ 2013-03-17 22:08 UTC (permalink / raw)
  To: Sam Ravnborg; +Cc: Michal Marek, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 213 bytes --]

On Sun, Mar 17, 2013 at 2:58 PM, Sam Ravnborg <sam@ravnborg.org> wrote:
>
> We got no patch - just some git help stuff.
> Seems you mistyped somthing..
>

Oops, sorry about that. I reattach the patch here.

Chris

[-- Attachment #2: kbuild-avoid-rebuild-some-object.patch --]
[-- Type: application/octet-stream, Size: 819 bytes --]

diff --git a/arch/x86/boot/compressed/Makefile b/arch/x86/boot/compressed/Makefile
index 8a84501..1706ee5 100644
--- a/arch/x86/boot/compressed/Makefile
+++ b/arch/x86/boot/compressed/Makefile
@@ -33,6 +33,7 @@ $(obj)/efi_stub_$(BITS).o: KBUILD_CLFAGS += -fshort-wchar -mno-red-zone
 
 ifeq ($(CONFIG_EFI_STUB), y)
 	VMLINUX_OBJS += $(obj)/eboot.o $(obj)/efi_stub_$(BITS).o
+	targets += eboot.o efi_stub_$(BITS).o
 endif
 
 $(obj)/vmlinux: $(VMLINUX_OBJS) FORCE
diff --git a/scripts/mod/Makefile b/scripts/mod/Makefile
index 9415b56..e20d06b 100644
--- a/scripts/mod/Makefile
+++ b/scripts/mod/Makefile
@@ -48,4 +48,4 @@ quiet_cmd_elfconfig = MKELF   $@
 $(obj)/elfconfig.h: $(obj)/empty.o $(obj)/mk_elfconfig FORCE
 	$(call if_changed,elfconfig)
 
-targets += elfconfig.h
+targets += elfconfig.h devicetable-offsets.s

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [RFC PATCH] kbuild: avoid some unnecessary rebuild
  2013-03-17 22:08   ` Christopher Li
@ 2013-03-20 20:19     ` Sam Ravnborg
  2013-03-21 20:05       ` Christopher Li
  2013-04-10  8:36     ` Michal Marek
  1 sibling, 1 reply; 6+ messages in thread
From: Sam Ravnborg @ 2013-03-20 20:19 UTC (permalink / raw)
  To: Christopher Li; +Cc: Michal Marek, linux-kernel

On Sun, Mar 17, 2013 at 03:08:11PM -0700, Christopher Li wrote:
> On Sun, Mar 17, 2013 at 2:58 PM, Sam Ravnborg <sam@ravnborg.org> wrote:
> >
> > We got no patch - just some git help stuff.
> > Seems you mistyped somthing..
> >
> 
> Oops, sorry about that. I reattach the patch here.

I looked at the attached patch:
Acked-by: Sam Ravnborg <sam@ravnborg.org>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [RFC PATCH] kbuild: avoid some unnecessary rebuild
  2013-03-20 20:19     ` Sam Ravnborg
@ 2013-03-21 20:05       ` Christopher Li
  0 siblings, 0 replies; 6+ messages in thread
From: Christopher Li @ 2013-03-21 20:05 UTC (permalink / raw)
  To: Sam Ravnborg; +Cc: Michal Marek, linux-kernel

Let me add a signed off in case some one want to apply it.

Signed-Off-By: Christopher Li <sparse@chrisli.org>

On Wed, Mar 20, 2013 at 1:19 PM, Sam Ravnborg <sam@ravnborg.org> wrote:
> I looked at the attached patch:
> Acked-by: Sam Ravnborg <sam@ravnborg.org>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [RFC PATCH] kbuild: avoid some unnecessary rebuild
  2013-03-17 22:08   ` Christopher Li
  2013-03-20 20:19     ` Sam Ravnborg
@ 2013-04-10  8:36     ` Michal Marek
  1 sibling, 0 replies; 6+ messages in thread
From: Michal Marek @ 2013-04-10  8:36 UTC (permalink / raw)
  To: Christopher Li; +Cc: Sam Ravnborg, linux-kernel

On 17.3.2013 23:08, Christopher Li wrote:
> On Sun, Mar 17, 2013 at 2:58 PM, Sam Ravnborg <sam@ravnborg.org> wrote:
>>
>> We got no patch - just some git help stuff.
>> Seems you mistyped somthing..
>>
> 
> Oops, sorry about that. I reattach the patch here.

Can you send a patch that only fixes scripts/mod? The EFI_STUB rebuild
has been fixed differently in the x86 tree (where such fixes should be
sent anyway).

Thanks,
Michal

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2013-04-10  8:36 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-03-17 21:50 [RFC PATCH] kbuild: avoid some unnecessary rebuild Christopher Li
2013-03-17 21:58 ` Sam Ravnborg
2013-03-17 22:08   ` Christopher Li
2013-03-20 20:19     ` Sam Ravnborg
2013-03-21 20:05       ` Christopher Li
2013-04-10  8:36     ` Michal Marek

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).