xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] stubdom: correct dependency for ioemu linkfarm
@ 2016-11-08  6:29 Juergen Gross
  2016-11-08 10:41 ` Wei Liu
  2016-12-05 16:36 ` Juergen Gross
  0 siblings, 2 replies; 5+ messages in thread
From: Juergen Gross @ 2016-11-08  6:29 UTC (permalink / raw)
  To: xen-devel; +Cc: Juergen Gross, samuel.thibault, wei.liu2

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.

Signed-off-by: Juergen Gross <jgross@suse.com>
---
 stubdom/Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/stubdom/Makefile b/stubdom/Makefile
index 2921f30..0b33e23 100644
--- a/stubdom/Makefile
+++ b/stubdom/Makefile
@@ -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);						\
-- 
2.6.6


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

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

* Re: [PATCH] stubdom: correct dependency for ioemu linkfarm
  2016-11-08  6:29 [PATCH] stubdom: correct dependency for ioemu linkfarm Juergen Gross
@ 2016-11-08 10:41 ` Wei Liu
  2016-11-08 11:18   ` Juergen Gross
  2016-12-05 16:36 ` Juergen Gross
  1 sibling, 1 reply; 5+ messages in thread
From: Wei Liu @ 2016-11-08 10:41 UTC (permalink / raw)
  To: Juergen Gross; +Cc: samuel.thibault, wei.liu2, xen-devel

On Tue, Nov 08, 2016 at 07:29:01AM +0100, Juergen Gross wrote:
> 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.
> 
> Signed-off-by: Juergen Gross <jgross@suse.com>
> ---
>  stubdom/Makefile | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/stubdom/Makefile b/stubdom/Makefile
> index 2921f30..0b33e23 100644
> --- a/stubdom/Makefile
> +++ b/stubdom/Makefile
> @@ -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?

> -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);						\
> -- 
> 2.6.6
> 

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

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

* Re: [PATCH] stubdom: correct dependency for ioemu linkfarm
  2016-11-08 10:41 ` Wei Liu
@ 2016-11-08 11:18   ` Juergen Gross
  2016-12-12 16:08     ` Wei Liu
  0 siblings, 1 reply; 5+ messages in thread
From: Juergen Gross @ 2016-11-08 11:18 UTC (permalink / raw)
  To: Wei Liu; +Cc: samuel.thibault, xen-devel

On 08/11/16 11:41, Wei Liu wrote:
> On Tue, Nov 08, 2016 at 07:29:01AM +0100, Juergen Gross wrote:
>> 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.
>>
>> Signed-off-by: Juergen Gross <jgross@suse.com>
>> ---
>>  stubdom/Makefile | 4 ++--
>>  1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/stubdom/Makefile b/stubdom/Makefile
>> index 2921f30..0b33e23 100644
>> --- a/stubdom/Makefile
>> +++ b/stubdom/Makefile
>> @@ -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?

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
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

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

* Re: [PATCH] stubdom: correct dependency for ioemu linkfarm
  2016-11-08  6:29 [PATCH] stubdom: correct dependency for ioemu linkfarm Juergen Gross
  2016-11-08 10:41 ` Wei Liu
@ 2016-12-05 16:36 ` Juergen Gross
  1 sibling, 0 replies; 5+ messages in thread
From: Juergen Gross @ 2016-12-05 16:36 UTC (permalink / raw)
  To: xen-devel; +Cc: samuel.thibault, wei.liu2

On 08/11/16 07:29, Juergen Gross wrote:
> 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.
> 
> Signed-off-by: Juergen Gross <jgross@suse.com>

Ping?


Juergen

> ---
>  stubdom/Makefile | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/stubdom/Makefile b/stubdom/Makefile
> index 2921f30..0b33e23 100644
> --- a/stubdom/Makefile
> +++ b/stubdom/Makefile
> @@ -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);						\
> 


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

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

* Re: [PATCH] stubdom: correct dependency for ioemu linkfarm
  2016-11-08 11:18   ` Juergen Gross
@ 2016-12-12 16:08     ` Wei Liu
  0 siblings, 0 replies; 5+ messages in thread
From: Wei Liu @ 2016-12-12 16:08 UTC (permalink / raw)
  To: Juergen Gross; +Cc: samuel.thibault, Wei Liu, xen-devel

On Tue, Nov 08, 2016 at 12:18:05PM +0100, Juergen Gross wrote:
> On 08/11/16 11:41, Wei Liu wrote:
> > On Tue, Nov 08, 2016 at 07:29:01AM +0100, Juergen Gross wrote:
> >> 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.
> >>
> >> Signed-off-by: Juergen Gross <jgross@suse.com>
> >> ---
> >>  stubdom/Makefile | 4 ++--
> >>  1 file changed, 2 insertions(+), 2 deletions(-)
> >>
> >> diff --git a/stubdom/Makefile b/stubdom/Makefile
> >> index 2921f30..0b33e23 100644
> >> --- a/stubdom/Makefile
> >> +++ b/stubdom/Makefile
> >> @@ -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?
> 
> 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.

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

> 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
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

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

end of thread, other threads:[~2016-12-12 16:08 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-11-08  6:29 [PATCH] stubdom: correct dependency for ioemu linkfarm Juergen Gross
2016-11-08 10:41 ` Wei Liu
2016-11-08 11:18   ` Juergen Gross
2016-12-12 16:08     ` Wei Liu
2016-12-05 16:36 ` Juergen Gross

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