Skip to contentSkip to conversation

stubdom: correct dependency for ioemu linkfarm

PATCH In review Juergen Gross 2 participants 5 messages Nov 8, 2016 – Dec 12, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 stubdom: correct dependency for ioemu linkfarm

The dependency for setting up the links for ioemu is wrong: it is depending on tools/qemu-xen-traditional-dir which is being modified by each "make tools" call. This leads to rebuilds of several stubdom libraries for each call of "make stubdom" as those depend on the ioemu linkfarm stamp file.

Modify the dependency to the qemu Makefile instead which is a better indicator whether we need to create the qemu directory before setting up the links.

---
 stubdom/Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
stubdom/Makefile +2 -2
index 2921f30..0b33e23 100644
@@ -281,10 +281,10 @@ IOEMU_LINKFARM_TARGET := ioemu/linkfarm.stamp
 endif
 
 ifeq ($(QEMU_ROOT),.)
-$(XEN_ROOT)/tools/qemu-xen-traditional-dir:
+$(XEN_ROOT)/tools/qemu-xen-traditional-dir/Makefile:
 	$(MAKE) DESTDIR= -C $(XEN_ROOT)/tools qemu-xen-traditional-dir-find
 
-ioemu/linkfarm.stamp: $(XEN_ROOT)/tools/qemu-xen-traditional-dir
+ioemu/linkfarm.stamp: $(XEN_ROOT)/tools/qemu-xen-traditional-dir/Makefile
 	mkdir -p ioemu
 	set -e;									\
 	$(buildmakevars2shellvars);						\
Signature · 7 lines
2.6.6


_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
#1 lore raw
Quoted 20 lines · Juergen Gross

The dependency for setting up the links for ioemu is wrong: it is depending on tools/qemu-xen-traditional-dir which is being modified by each "make tools" call. This leads to rebuilds of several stubdom libraries for each call of "make stubdom" as those depend on the ioemu linkfarm stamp file.

Modify the dependency to the qemu Makefile instead which is a better indicator whether we need to create the qemu directory before setting up the links.

---
 stubdom/Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
stubdom/Makefile +0 -0
index 2921f30..0b33e23 100644

stubdom/Makefile IOEMU_LINKFARM_TARGET := ioemu/linkfarm.stamp · line 286

Quoted 7 lines
stubdom/Makefile +1 -1
@@ -281,10 +281,10 @@ IOEMU_LINKFARM_TARGET := ioemu/linkfarm.stamp
 endif
 
 ifeq ($(QEMU_ROOT),.)
-$(XEN_ROOT)/tools/qemu-xen-traditional-dir:
+$(XEN_ROOT)/tools/qemu-xen-traditional-dir/Makefile:
 	$(MAKE) DESTDIR= -C $(XEN_ROOT)/tools qemu-xen-traditional-dir-find
 

What happens if you modify qemu-trad source file(s) and then rebuild stubdom? Will that work correctly after this patch is applied?

Quoted 8 lines
stubdom/Makefile +1 -1
-ioemu/linkfarm.stamp: $(XEN_ROOT)/tools/qemu-xen-traditional-dir
+ioemu/linkfarm.stamp: $(XEN_ROOT)/tools/qemu-xen-traditional-dir/Makefile
 	mkdir -p ioemu
 	set -e;									\
 	$(buildmakevars2shellvars);						\
Signature · 1 line
2.6.6

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel

#2 lore raw
Quoted 23 lines · Wei Liu
Quoted 22 lines · Juergen Gross

The dependency for setting up the links for ioemu is wrong: it is depending on tools/qemu-xen-traditional-dir which is being modified by each "make tools" call. This leads to rebuilds of several stubdom libraries for each call of "make stubdom" as those depend on the ioemu linkfarm stamp file.

Modify the dependency to the qemu Makefile instead which is a better indicator whether we need to create the qemu directory before setting up the links.

---
 stubdom/Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
stubdom/Makefile +0 -0
index 2921f30..0b33e23 100644
@@ -281,10 +281,10 @@ IOEMU_LINKFARM_TARGET := ioemu/linkfarm.stamp
 endif
 
Quoted 8 lines

stubdom/Makefile IOEMU_LINKFARM_TARGET := ioemu/linkfarm.stamp · line 286

Quoted 5 lines
stubdom/Makefile +1 -1
 ifeq ($(QEMU_ROOT),.)
-$(XEN_ROOT)/tools/qemu-xen-traditional-dir:
+$(XEN_ROOT)/tools/qemu-xen-traditional-dir/Makefile:
 	$(MAKE) DESTDIR= -C $(XEN_ROOT)/tools qemu-xen-traditional-dir-find
 

What happens if you modify qemu-trad source file(s) and then rebuild stubdom? Will that work correctly after this patch is applied?

I think so, yes. Make is using the file modification times of the link targets to figure out what to rebuild.

The only problem which could occur is that adding a file to qemu would lead to a link missing. This could be caught by always creating the links. Question is whether this rare case is to be handled properly or not. Especially when taking the status of qemu-trad into account: I wouldn't expect new source files to show up very often.

Juergen

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel

#4 lore raw
In reply to Juergen Gross
Quoted 11 lines · Juergen Gross

The dependency for setting up the links for ioemu is wrong: it is depending on tools/qemu-xen-traditional-dir which is being modified by each "make tools" call. This leads to rebuilds of several stubdom libraries for each call of "make stubdom" as those depend on the ioemu linkfarm stamp file.

Modify the dependency to the qemu Makefile instead which is a better indicator whether we need to create the qemu directory before setting up the links.

Ping?

Juergen

Quoted 12 lines
---
 stubdom/Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
stubdom/Makefile +0 -0
index 2921f30..0b33e23 100644
@@ -281,10 +281,10 @@ IOEMU_LINKFARM_TARGET := ioemu/linkfarm.stamp
 endif
 

stubdom/Makefile IOEMU_LINKFARM_TARGET := ioemu/linkfarm.stamp · line 290

Quoted 10 lines
stubdom/Makefile +2 -2
 ifeq ($(QEMU_ROOT),.)
-$(XEN_ROOT)/tools/qemu-xen-traditional-dir:
+$(XEN_ROOT)/tools/qemu-xen-traditional-dir/Makefile:
 	$(MAKE) DESTDIR= -C $(XEN_ROOT)/tools qemu-xen-traditional-dir-find
 
-ioemu/linkfarm.stamp: $(XEN_ROOT)/tools/qemu-xen-traditional-dir
+ioemu/linkfarm.stamp: $(XEN_ROOT)/tools/qemu-xen-traditional-dir/Makefile
 	mkdir -p ioemu
 	set -e;									\
 	$(buildmakevars2shellvars);						\

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel

#3 lore raw
In reply to Juergen Gross
Quoted 33 lines · Juergen Gross
Quoted 23 lines · Wei Liu
Quoted 22 lines · Juergen Gross

The dependency for setting up the links for ioemu is wrong: it is depending on tools/qemu-xen-traditional-dir which is being modified by each "make tools" call. This leads to rebuilds of several stubdom libraries for each call of "make stubdom" as those depend on the ioemu linkfarm stamp file.

Modify the dependency to the qemu Makefile instead which is a better indicator whether we need to create the qemu directory before setting up the links.

---
 stubdom/Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
stubdom/Makefile +0 -0
index 2921f30..0b33e23 100644
@@ -281,10 +281,10 @@ IOEMU_LINKFARM_TARGET := ioemu/linkfarm.stamp
 endif
 
Quoted 8 lines

stubdom/Makefile IOEMU_LINKFARM_TARGET := ioemu/linkfarm.stamp · line 286

Quoted 5 lines
stubdom/Makefile +1 -1
 ifeq ($(QEMU_ROOT),.)
-$(XEN_ROOT)/tools/qemu-xen-traditional-dir:
+$(XEN_ROOT)/tools/qemu-xen-traditional-dir/Makefile:
 	$(MAKE) DESTDIR= -C $(XEN_ROOT)/tools qemu-xen-traditional-dir-find
 

What happens if you modify qemu-trad source file(s) and then rebuild stubdom? Will that work correctly after this patch is applied?

Quoted 3 lines

I think so, yes. Make is using the file modification times of the link targets to figure out what to rebuild.

I'm afraid I'm still not convinced this patch is the right approach.

The original approach is slower but it always produce the correct result. The approach in this patch makes things faster but it is not always correct.

I think I value correctness over speed.

Quoted 3 lines

The only problem which could occur is that adding a file to qemu would lead to a link missing. This could be caught by always creating the links.

Maybe this is the right approach?

Wei.

Quoted 7 lines

Question is whether this rare case is to be handled properly or not. Especially when taking the status of qemu-trad into account: I wouldn't expect new source files to show up very often.

Juergen

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel