Re: [PATCH] cpupower: add Makefile dependencies for install targets
From: Thomas Renninger
Date: Thu Jan 07 2021 - 16:01:45 EST
Am Donnerstag, 7. Januar 2021, 18:42:25 CET schrieb Ivan Babrou:
> On Thu, Jan 7, 2021 at 2:07 AM Thomas Renninger <trenn@xxxxxxxx> wrote:
> > Am Dienstag, 5. Januar 2021, 00:57:18 CET schrieb Ivan Babrou:
> > > This allows building cpupower in parallel rather than serially.
> >
> > cpupower is built serially:
> >
> > [ make clean ]
> >
> > time make
> > real 0m3,742s
> > user 0m3,330s
> > sys 0m1,105s
> >
> > [ make clean ]
> >
> > time make -j10
> > real 0m1,045s
> > user 0m3,153s
> > sys 0m1,037s
> >
> > Only advantage I see is that you can call
> > make install-xy
> > targets without calling the corresponding build target
> > make xy
> > similar to the general install target:
> > install: all install-lib ...
> >
> > Not sure anyone needs this and whether all targets
> > successfully work this way.
> > If you'd show a useful usecase example...
>
> We build a bunch of kernel related tools (perf, cpupower, bpftool,
> etc.) from our own top level Makefile, propagating parallelism
> downwards like one should.
I still do not understand why you do not simply build:
Also if I call this from /tools directory I get a quick build:
make -j20 cpupower
Can you please show the make calls, ideally with a timing to better understand
and also to reproduce the advantages this patch introduces.
>From what I can see, it only helps if one calls "sub-install" targets
directly?
And I still do not understand why things should be more parallel now.
> Without this patch we have to remove parallelism for cpupower,
Why?
> which doesn't seem like a very clean thing
> to do, especially if you consider that it's 3x faster with parallelism
> enabled in wall clock terms.
Sure, you want to build in parallel. I still do not understand how this
patch helps in this regard.
BTW, I recently had a bunch of userspace tools Makefile patches.
I'd like to add you to CC for a review if they are not submitted already.
Thomas