==Name: parallel-make.patch Depends: INSTALL.patch, proper-depends.patch Description: support parallellism better Using shell for loops doesn''t allow make to run it the most parallel modes. Use patsubst/addsuffix tricks to make this work. DiffStat: Makefile | 60 +++++++++++++++++++++++------------------------------------ xen/Makefile | 9 +++----- 2 files changed, 28 insertions(+), 41 deletions(-) ==Depends: INSTALL.patch, proper-depends.patch Description: support parallellism better Using shell for loops doesn''t allow make to run it the most parallel modes. Use patsubst/addsuffix tricks to make this work. --- xen-2.0.3.orig/xen/Makefile +++ xen-2.0.3/xen/Makefile @@ -32,13 +32,12 @@ dist: $(TARGET) $(MAKE) prefix=`pwd`/../dist/install dist=yes install -clean: - $(MAKE) -C tools clean - $(MAKE) -C common clean - $(MAKE) -C drivers clean - $(MAKE) -C arch/$(TARGET_ARCH) clean +clean: tools.clean common.clean drivers.clean arch/$(TARGET_ARCH).clean rm -f include/asm *.o $(TARGET)* *~ core include/xen/compile.h rm -f include/asm-*/asm-offsets.h + +tools.clean common.clean drivers.clean arch/$(TARGET_ARCH).clean : %.clean: + $(MAKE) -C $* clean $(TARGET): delete-unfresh-files [ -e include/asm ] || ln -sf asm-$(TARGET_ARCH) include/asm --- xen-2.0.3.orig/Makefile +++ xen-2.0.3/Makefile @@ -30,25 +31,25 @@ # install everything into the standard system directories # NB: install explicitly does not check that everything is up to date! -install: install-tools install-xen install-kernels install-docs - -install-xen: - $(MAKE) -C xen install +install: xen.install tools.install kernels docs.install -install-tools: - $(MAKE) -C tools install - -install-kernels: +kernels.install: cp -a $(INSTALL_DIR)/boot/* /boot/ cp -a $(INSTALL_DIR)/lib/modules/* /lib/modules/ cp -dR $(INSTALL_DIR)/boot/*$(LINUX_VER)* $(prefix)/boot/ cp -dR $(INSTALL_DIR)/lib/modules/* $(prefix)/lib/modules/ -install-docs: - sh ./docs/check_pkgs && $(MAKE) -C docs install || true +docs.install: + sh ./docs/check_pkgs && $(MAKE) -C docs install || true + +xen.install tools.install: %.install: + $(MAKE) -C $* install + +xen.dist tools.dist: %.dist: + $(MAKE) -C $* dist # build and install everything into local dist directory -dist: xen tools kernels docs +dist: xen.dist tools.dist kernels docs.install $(INSTALL_DIR) $(DIST_DIR)/check $(INSTALL_DATA) ./COPYING $(DIST_DIR) $(INSTALL_DATA) ./README $(DIST_DIR) @@ -61,28 +63,23 @@ tools: $(MAKE) prefix=$(INSTALL_DIR) dist=yes -C tools install -kernels: - for i in $(XKERNELS) ; do $(MAKE) $$i-build ; done +kernels: $(addsuffix -build,$(XKERNELS)) docs: sh ./docs/check_pkgs && \ $(MAKE) prefix=$(INSTALL_DIR) dist=yes -C docs install || true # Build all the various kernels and modules kbuild: kernels # Delete the kernel build trees entirely -kdelete: - for i in $(XKERNELS) ; do $(MAKE) $$i-delete ; done +kdelete: $(addsuffix -clean,$(XKERNELS)) # Clean the kernel build trees -kclean: - for i in $(XKERNELS) ; do $(MAKE) $$i-clean ; done +kclean: $(addsuffix -clean,$(XKERNELS)) # Make patches from kernel sparse trees -mkpatches: - for i in $(ALLSPARSETREES) ; do $(MAKE) $$i-xen.patch ; done - +mkpatches: $(addsuffix -xen.patch,$(ALLSPARSETREES)) # build xen, the tools, and a domain 0 plus unprivileged linux-xen images, # and place them in the install directory. ''make install'' should then @@ -93,16 +90,14 @@ $(MAKE) dist # clean doesn''t do a kclean -clean: - $(MAKE) -C xen clean - $(MAKE) -C tools clean - $(MAKE) -C docs clean +clean: xen.clean tools.clean docs.clean + +xen.clean tools.clean docs.clean: %.clean: + $(MAKE) -C $* clean # clean, but blow away kernel build tree plus tar balls -mrproper: clean +mrproper: clean $(addsuffix -delete,$(ALLKERNELS)) $(addsuffix -mrproper,$(ALLSPARSETREES)) rm -rf dist patches/tmp - for i in $(ALLKERNELS) ; do $(MAKE) $$i-delete ; done - for i in $(ALLSPARSETREES) ; do $(MAKE) $$i-mrproper ; done install-twisted: wget http://www.twistedmatrix.com/products/get-current.epy @@ -165,13 +159,8 @@ rm -rf "/usr/lib/python2.?/site-packages/xen* /usr/lib/libxc* /usr/lib/python2.?/site-packages/Xc*" # Legacy targets for compatibility -linux24: - $(MAKE) linux-2.4-xen0-build - $(MAKE) linux-2.4-xenU-build - -linux26: - $(MAKE) linux-2.6-xen0-build - $(MAKE) linux-2.6-xenU-build +linux24: linux-2.4-xen0-build linux-2.4-xenU-build + +linux26: linux-2.6-xen0-build linux-2.6-xenU-build -netbsd20: - $(MAKE) netbsd-2.0-xenU-build +netbsd20: netbsd-2.0-xenU-build == ------------------------------------------------------- This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting Tool for open source databases. Create drag-&-drop reports. Save time by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc. Download a FREE copy at http://www.intelliview.com/go/osdn_nl _______________________________________________ Xen-devel mailing list Xen-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/xen-devel
This hunk seems to cause ''make world'' to break for me during the ''clean'' step: it fails because it tries to enter the linux-2.6.10-xen0 directory before its been created. Ian> --- xen-2.0.3.orig/Makefile > +++ xen-2.0.3/Makefile > @@ -30,25 +31,25 @@ > > # install everything into the standard system directories > # NB: install explicitly does not check that everything is up to date! > -install: install-tools install-xen install-kernels install-docs > - > -install-xen: > - $(MAKE) -C xen install > +install: xen.install tools.install kernels docs.install > > -install-tools: > - $(MAKE) -C tools install > - > -install-kernels: > +kernels.install: > cp -a $(INSTALL_DIR)/boot/* /boot/ > cp -a $(INSTALL_DIR)/lib/modules/* /lib/modules/ > cp -dR $(INSTALL_DIR)/boot/*$(LINUX_VER)* $(prefix)/boot/ > cp -dR $(INSTALL_DIR)/lib/modules/* $(prefix)/lib/modules/ > > -install-docs: > - sh ./docs/check_pkgs && $(MAKE) -C docs install || true > +docs.install: > + sh ./docs/check_pkgs && $(MAKE) -C docs install || true > + > +xen.install tools.install: %.install: > + $(MAKE) -C $* install > + > +xen.dist tools.dist: %.dist: > + $(MAKE) -C $* dist > > # build and install everything into local dist directory > -dist: xen tools kernels docs > +dist: xen.dist tools.dist kernels docs.install > $(INSTALL_DIR) $(DIST_DIR)/check > $(INSTALL_DATA) ./COPYING $(DIST_DIR) > $(INSTALL_DATA) ./README $(DIST_DIR) > @@ -61,28 +63,23 @@ > tools: > $(MAKE) prefix=$(INSTALL_DIR) dist=yes -C tools install > > -kernels: > - for i in $(XKERNELS) ; do $(MAKE) $$i-build ; done > +kernels: $(addsuffix -build,$(XKERNELS)) > > docs: > sh ./docs/check_pkgs && \ > $(MAKE) prefix=$(INSTALL_DIR) dist=yes -C docs install || true > > # Build all the various kernels and modules > kbuild: kernels > > # Delete the kernel build trees entirely > -kdelete: > - for i in $(XKERNELS) ; do $(MAKE) $$i-delete ; done > +kdelete: $(addsuffix -clean,$(XKERNELS)) > > # Clean the kernel build trees > -kclean: > - for i in $(XKERNELS) ; do $(MAKE) $$i-clean ; done > +kclean: $(addsuffix -clean,$(XKERNELS)) > > # Make patches from kernel sparse trees > -mkpatches: > - for i in $(ALLSPARSETREES) ; do $(MAKE) $$i-xen.patch ; done > - > +mkpatches: $(addsuffix -xen.patch,$(ALLSPARSETREES)) > > # build xen, the tools, and a domain 0 plus unprivileged linux-xen images, > # and place them in the install directory. ''make install'' should then > @@ -93,16 +90,14 @@ > $(MAKE) dist > > # clean doesn''t do a kclean > -clean: > - $(MAKE) -C xen clean > - $(MAKE) -C tools clean > - $(MAKE) -C docs clean > +clean: xen.clean tools.clean docs.clean > + > +xen.clean tools.clean docs.clean: %.clean: > + $(MAKE) -C $* clean > > # clean, but blow away kernel build tree plus tar balls > -mrproper: clean > +mrproper: clean $(addsuffix -delete,$(ALLKERNELS)) $(addsuffix -mrproper,$(ALLSPARSETREES)) > rm -rf dist patches/tmp > - for i in $(ALLKERNELS) ; do $(MAKE) $$i-delete ; done > - for i in $(ALLSPARSETREES) ; do $(MAKE) $$i-mrproper ; done > > install-twisted: > wget http://www.twistedmatrix.com/products/get-current.epy > @@ -165,13 +159,8 @@ > rm -rf "/usr/lib/python2.?/site-packages/xen* /usr/lib/libxc* /usr/lib/python2.?/site-packages/Xc*" > > # Legacy targets for compatibility > -linux24: > - $(MAKE) linux-2.4-xen0-build > - $(MAKE) linux-2.4-xenU-build > - > -linux26: > - $(MAKE) linux-2.6-xen0-build > - $(MAKE) linux-2.6-xenU-build > +linux24: linux-2.4-xen0-build linux-2.4-xenU-build > + > +linux26: linux-2.6-xen0-build linux-2.6-xenU-build > > -netbsd20: > - $(MAKE) netbsd-2.0-xenU-build > +netbsd20: netbsd-2.0-xenU-build > ==>make[1]: Entering directory `/auto/anfs/scratch/labyrinth/iap10/xeno-clone/xen-2.0-testing.bk'' make -f buildconfigs/mk.linux-2.6-xen0 clean make[2]: Entering directory `/auto/anfs/scratch/labyrinth/iap10/xeno-clone/xen-2.0-testing.bk'' make -C linux-2.6.10-xen0 ARCH=xen clean make: *** linux-2.6.10-xen0: No such file or directory. Stop. make: Entering an unknown directorymake: Leaving an unknown directorymake[2]: *** [clean] Error 2 make[2]: Leaving directory `/auto/anfs/scratch/labyrinth/iap10/xeno-clone/xen-2.0-testing.bk'' make[1]: *** [linux-2.6-xen0-clean] Error 2 make[1]: Leaving directory `/auto/anfs/scratch/labyrinth/iap10/xeno-clone/xen-2.0-testing.bk'' make: *** [world] Error 2 xen-2.0-testing.bk > ------------------------------------------------------- This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting Tool for open source databases. Create drag-&-drop reports. Save time by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc. Download a FREE copy at http://www.intelliview.com/go/osdn_nl _______________________________________________ Xen-devel mailing list Xen-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/xen-devel
On Sat, 22 Jan 2005, Ian Pratt wrote:> > This hunk seems to cause ''make world'' to break for me during the > ''clean'' step: it fails because it tries to enter > the linux-2.6.10-xen0 directory before its been created.Hmm, don''t use make world here. I''ll look into it(using the Depends line, you can figure out which patches to not apply). ------------------------------------------------------- This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting Tool for open source databases. Create drag-&-drop reports. Save time by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc. Download a FREE copy at http://www.intelliview.com/go/osdn_nl _______________________________________________ Xen-devel mailing list Xen-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/xen-devel
> Hmm, don''t use make world here.''make world'' is probably the most widely used target, so we definitely need to support it. There''s also a couple of other problems: * changing all the install targets from install-* to *.install will break Rick''s rpm package. * I''m not sure the extra parallelism will work: We need to stop the pristine tree being extracted twice concurrently. Ian> -----Original Message----- > From: Adam Heath [mailto:doogie@brainfood.com] > Sent: 22 January 2005 22:43 > To: Ian Pratt > Cc: xen-devel@lists.sourceforge.net > Subject: Re: [Xen-devel] 05: parallel-make.patch > > On Sat, 22 Jan 2005, Ian Pratt wrote: > > > > > This hunk seems to cause ''make world'' to break for me during the > > ''clean'' step: it fails because it tries to enter > > the linux-2.6.10-xen0 directory before its been created. > > Hmm, don''t use make world here. I''ll look into it(using the > Depends line, you > can figure out which patches to not apply). >------------------------------------------------------- This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting Tool for open source databases. Create drag-&-drop reports. Save time by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc. Download a FREE copy at http://www.intelliview.com/go/osdn_nl _______________________________________________ Xen-devel mailing list Xen-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/xen-devel
> > Hmm, don''t use make world here. > > ''make world'' is probably the most widely used target, so we definitely > need to support it. > > There''s also a couple of other problems: > > * changing all the install targets from install-* to *.install will > break Rick''s rpm package.I didn''t really understyand the point of this. Is *.foo a more conventional naming scheme, or is it just that you get to use pattern rules (not a big win IMO)?> * I''m not sure the extra parallelism will work: We need to stop the > pristine tree being extracted twice concurrently.The existing parallelism within each sub-target seems enough to keep a bunch of CPUs busy. Aggressively parallelising further in the root Makefile is simply going to make the build system fragile. -- Keir ------------------------------------------------------- This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting Tool for open source databases. Create drag-&-drop reports. Save time by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc. Download a FREE copy at http://www.intelliview.com/go/osdn_nl _______________________________________________ Xen-devel mailing list Xen-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/xen-devel
On Sun, 23 Jan 2005, Ian Pratt wrote:> > Hmm, don''t use make world here. > > ''make world'' is probably the most widely used target, so we definitely > need to support it. > > There''s also a couple of other problems: > > * changing all the install targets from install-* to *.install will > break Rick''s rpm package.I wasn''t aware that any external system required the install-* stuff. It''s easy to change that pattern, tho.> * I''m not sure the extra parallelism will work: We need to stop the > pristine tree being extracted twice concurrently.It doesn''t get extracted twice for me. ------------------------------------------------------- This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting Tool for open source databases. Create drag-&-drop reports. Save time by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc. Download a FREE copy at http://www.intelliview.com/go/osdn_nl _______________________________________________ Xen-devel mailing list Xen-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/xen-devel