[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH 1/2] tools: OVMF parallel build



On Mon, Mar 02, 2015 at 02:18:58PM +0000, Ian Campbell wrote:
> On Mon, 2015-03-02 at 10:52 +0000, Wei Liu wrote:
> > Though it doesn't work with make's "-j" option, the build system of OVMF
> > has an option to specify parallel threads used to run the build.
> > 
> > Using 4 threads to build OVMF looks like a sensible default.
> 
> It's a bit arbitrary, but it'll do, I suppose.
> 
> It's worth noting that this won't interact with gnu makes token handling
> which is used to make sure there are only N processes across the
> recursive build. So this will consume 1 token but launch 4 threads. So
> if -j4 is used you'll actually get 7 things happening.
> 
> I think we can live with that.
> 
> So I'm happy with the patch, but I'd like to give others a chance to
> disagree before applying.
> 
> > Signed-off-by: Wei Liu <wei.liu2@xxxxxxxxxx>
> > Cc: Anthony Perard <anthony.perard@xxxxxxxxxx>
> 
> Acked-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
> 
> > Cc: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
> > ---
> >  tools/firmware/ovmf-makefile | 6 ++----
> >  1 file changed, 2 insertions(+), 4 deletions(-)
> > 
> > diff --git a/tools/firmware/ovmf-makefile b/tools/firmware/ovmf-makefile
> > index 1ad041f..2838744 100644
> > --- a/tools/firmware/ovmf-makefile
> > +++ b/tools/firmware/ovmf-makefile
> > @@ -1,6 +1,3 @@
> > -# OVMF building system is not ready yet to run in parallel.
> > -# Force it to be serial in order to exploit parallelism for neighbors.
> > -
> >  XEN_ROOT=$(CURDIR)/../../..
> >  include $(XEN_ROOT)/tools/Rules.mk
> >  
> > @@ -10,6 +7,7 @@ else
> >  TARGET=RELEASE
> >  endif
> >  
> > +# OVMF build system has its own parallel building support.
> >  .NOTPARALLEL:
> >  MAKEFLAGS  += -j1
> 
> TBH I'm not sure what if anything these actually do...
> 

Without this OVMF won't build. It plays with MAKEFLAGS to enforce there
is only one thread used. I haven't really looked into whether it's the
correct rune but it seems to work fine.

Wei.


> >  
> > @@ -18,7 +16,7 @@ all: build
> >  
> >  .PHONY: build
> >  build:
> > -   OvmfPkg/build.sh -a X64 -b $(TARGET)
> > +   OvmfPkg/build.sh -a X64 -b $(TARGET) -n 4
> >     cp Build/OvmfX64/$(TARGET)_GCC*/FV/OVMF.fd ovmf.bin
> >  
> >  .PHONY: clean
> 

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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.