Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH] kernel.bbclass: Allow do_compile_kernelmodules to use PARALLEL_MAKE
@ 2011-12-10  0:34 Richard Purdie
  2011-12-10  0:36 ` Bruce Ashfield
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Richard Purdie @ 2011-12-10  0:34 UTC (permalink / raw)
  To: Ashfield, Bruce, Hart, Darren, openembedded-core

Without this we don't take advantage of any configured multiple CPU
cores which seems a shame.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
index d0cc279..120a524 100644
--- a/meta/classes/kernel.bbclass
+++ b/meta/classes/kernel.bbclass
@@ -89,7 +89,7 @@ kernel_do_compile() {
 do_compile_kernelmodules() {
 	unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS MACHINE
 	if (grep -q -i -e '^CONFIG_MODULES=y$' .config); then
-		oe_runmake modules  CC="${KERNEL_CC}" LD="${KERNEL_LD}"
+		oe_runmake ${PARALLEL_MAKE} modules  CC="${KERNEL_CC}" LD="${KERNEL_LD}"
 	else
 		bbnote "no modules to compile"
 	fi





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

* Re: [PATCH] kernel.bbclass: Allow do_compile_kernelmodules to use PARALLEL_MAKE
  2011-12-10  0:34 [PATCH] kernel.bbclass: Allow do_compile_kernelmodules to use PARALLEL_MAKE Richard Purdie
@ 2011-12-10  0:36 ` Bruce Ashfield
  2011-12-10  1:06 ` Darren Hart
  2011-12-10 23:28 ` Khem Raj
  2 siblings, 0 replies; 8+ messages in thread
From: Bruce Ashfield @ 2011-12-10  0:36 UTC (permalink / raw)
  To: Richard Purdie; +Cc: Hart, Darren, openembedded-core

On 11-12-09 7:34 PM, Richard Purdie wrote:
> Without this we don't take advantage of any configured multiple CPU
> cores which seems a shame.

Agreed.

Acked-by: Bruce Ashfield <bruce.ashfield@windriver.com>

>
> Signed-off-by: Richard Purdie<richard.purdie@linuxfoundation.org>
> ---
> diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
> index d0cc279..120a524 100644
> --- a/meta/classes/kernel.bbclass
> +++ b/meta/classes/kernel.bbclass
> @@ -89,7 +89,7 @@ kernel_do_compile() {
>   do_compile_kernelmodules() {
>   	unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS MACHINE
>   	if (grep -q -i -e '^CONFIG_MODULES=y$' .config); then
> -		oe_runmake modules  CC="${KERNEL_CC}" LD="${KERNEL_LD}"
> +		oe_runmake ${PARALLEL_MAKE} modules  CC="${KERNEL_CC}" LD="${KERNEL_LD}"
>   	else
>   		bbnote "no modules to compile"
>   	fi
>
>




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

* Re: [PATCH] kernel.bbclass: Allow do_compile_kernelmodules to use PARALLEL_MAKE
  2011-12-10  0:34 [PATCH] kernel.bbclass: Allow do_compile_kernelmodules to use PARALLEL_MAKE Richard Purdie
  2011-12-10  0:36 ` Bruce Ashfield
@ 2011-12-10  1:06 ` Darren Hart
  2011-12-10 23:28 ` Khem Raj
  2 siblings, 0 replies; 8+ messages in thread
From: Darren Hart @ 2011-12-10  1:06 UTC (permalink / raw)
  To: Richard Purdie; +Cc: Ashfield, Bruce, openembedded-core

On 12/09/2011 04:34 PM, Richard Purdie wrote:
> Without this we don't take advantage of any configured multiple CPU
> cores which seems a shame.
> 
> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>

Thanks RP,

Acked-by: Darren Hart <dvhart@linux.intel.com>

> ---
> diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
> index d0cc279..120a524 100644
> --- a/meta/classes/kernel.bbclass
> +++ b/meta/classes/kernel.bbclass
> @@ -89,7 +89,7 @@ kernel_do_compile() {
>  do_compile_kernelmodules() {
>  	unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS MACHINE
>  	if (grep -q -i -e '^CONFIG_MODULES=y$' .config); then
> -		oe_runmake modules  CC="${KERNEL_CC}" LD="${KERNEL_LD}"
> +		oe_runmake ${PARALLEL_MAKE} modules  CC="${KERNEL_CC}" LD="${KERNEL_LD}"
>  	else
>  		bbnote "no modules to compile"
>  	fi
> 
> 


-- 
Darren Hart
Intel Open Source Technology Center
Yocto Project - Linux Kernel



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

* Re: [PATCH] kernel.bbclass: Allow do_compile_kernelmodules to use PARALLEL_MAKE
  2011-12-10  0:34 [PATCH] kernel.bbclass: Allow do_compile_kernelmodules to use PARALLEL_MAKE Richard Purdie
  2011-12-10  0:36 ` Bruce Ashfield
  2011-12-10  1:06 ` Darren Hart
@ 2011-12-10 23:28 ` Khem Raj
  2011-12-11  8:56   ` Koen Kooi
  2011-12-12 18:21   ` Phil Blundell
  2 siblings, 2 replies; 8+ messages in thread
From: Khem Raj @ 2011-12-10 23:28 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer
  Cc: Ashfield, Bruce, Hart, Darren

On Fri, Dec 9, 2011 at 4:34 PM, Richard Purdie
<richard.purdie@linuxfoundation.org> wrote:
> Without this we don't take advantage of any configured multiple CPU
> cores which seems a shame.
>
> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
> ---
> diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
> index d0cc279..120a524 100644
> --- a/meta/classes/kernel.bbclass
> +++ b/meta/classes/kernel.bbclass
> @@ -89,7 +89,7 @@ kernel_do_compile() {
>  do_compile_kernelmodules() {
>        unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS MACHINE
>        if (grep -q -i -e '^CONFIG_MODULES=y$' .config); then
> -               oe_runmake modules  CC="${KERNEL_CC}" LD="${KERNEL_LD}"
> +               oe_runmake ${PARALLEL_MAKE} modules  CC="${KERNEL_CC}" LD="${KERNEL_LD}"
>        else
>                bbnote "no modules to compile"
>        fi


in base.bbclass oe_runmake says

${MAKE} ${EXTRA_OEMAKE} "$@"

and

conf/bitbake.conf says

EXTRA_OEMAKE_prepend_task-compile = "${PARALLEL_MAKE} "

hmmm so we dont parallel make if task is not called do_compile ?



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

* Re: [PATCH] kernel.bbclass: Allow do_compile_kernelmodules to use PARALLEL_MAKE
  2011-12-10 23:28 ` Khem Raj
@ 2011-12-11  8:56   ` Koen Kooi
  2011-12-12 18:21   ` Phil Blundell
  1 sibling, 0 replies; 8+ messages in thread
From: Koen Kooi @ 2011-12-11  8:56 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer
  Cc: Ashfield, Bruce, Hart, Darren

[-- Attachment #1: Type: text/plain, Size: 2189 bytes --]


Op 11 dec. 2011, om 00:28 heeft Khem Raj het volgende geschreven:

> On Fri, Dec 9, 2011 at 4:34 PM, Richard Purdie
> <richard.purdie@linuxfoundation.org> wrote:
>> Without this we don't take advantage of any configured multiple CPU
>> cores which seems a shame.
>> 
>> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
>> ---
>> diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
>> index d0cc279..120a524 100644
>> --- a/meta/classes/kernel.bbclass
>> +++ b/meta/classes/kernel.bbclass
>> @@ -89,7 +89,7 @@ kernel_do_compile() {
>>  do_compile_kernelmodules() {
>>        unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS MACHINE
>>        if (grep -q -i -e '^CONFIG_MODULES=y$' .config); then
>> -               oe_runmake modules  CC="${KERNEL_CC}" LD="${KERNEL_LD}"
>> +               oe_runmake ${PARALLEL_MAKE} modules  CC="${KERNEL_CC}" LD="${KERNEL_LD}"
>>        else
>>                bbnote "no modules to compile"
>>        fi
> 
> 
> in base.bbclass oe_runmake says
> 
> ${MAKE} ${EXTRA_OEMAKE} "$@"
> 
> and
> 
> conf/bitbake.conf says
> 
> EXTRA_OEMAKE_prepend_task-compile = "${PARALLEL_MAKE} "
> 
> hmmm so we dont parallel make if task is not called do_compile ?

Correct, that's why I did the following in meta-ti a while ago:

commit c62d16735db1beecd47a0ea3c4c51ddd29a1aeeb
Author: Koen Kooi <koen@dominion.thruhere.net>
Date:   Thu Jul 21 13:38:33 2011 +0200

    linux.inc: enable parallel make for modules as well
    
    Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>

diff --git a/recipes-kernel/linux/linux.inc b/recipes-kernel/linux/linux.inc
index 77e3179..9650e68 100644
--- a/recipes-kernel/linux/linux.inc
+++ b/recipes-kernel/linux/linux.inc
@@ -228,6 +228,10 @@ do_configure_append() {
        fi
 }
 
+# bitbake.conf only prepends PARALLEL make in tasks called do_compile, which isn't the case for compile_modules
+# So explicitly enable it for that in here
+EXTRA_OEMAKE = "${PARALLEL_MAKE} "
+
 do_install_append() {
        oe_runmake headers_install INSTALL_HDR_PATH=${D}${exec_prefix}/src/linux-${KERNEL_VERSION} ARCH=$ARCH
 }

regards,

Koen



[-- Attachment #2: Message signed with OpenPGP using GPGMail --]
[-- Type: application/pgp-signature, Size: 169 bytes --]

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

* Re: [PATCH] kernel.bbclass: Allow do_compile_kernelmodules to use PARALLEL_MAKE
  2011-12-10 23:28 ` Khem Raj
  2011-12-11  8:56   ` Koen Kooi
@ 2011-12-12 18:21   ` Phil Blundell
  2011-12-12 18:31     ` Khem Raj
  2011-12-12 21:30     ` Richard Purdie
  1 sibling, 2 replies; 8+ messages in thread
From: Phil Blundell @ 2011-12-12 18:21 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer

On Sat, 2011-12-10 at 15:28 -0800, Khem Raj wrote:
> in base.bbclass oe_runmake says
> 
> ${MAKE} ${EXTRA_OEMAKE} "$@"
> 
> and
> 
> conf/bitbake.conf says
> 
> EXTRA_OEMAKE_prepend_task-compile = "${PARALLEL_MAKE} "
> 
> hmmm so we dont parallel make if task is not called do_compile ?

Indeed.  It's been that way basically forever; I think this was to avoid
a class of problems caused by trying to run "make install" with -j.  

It's possible that the general situation has improved a bit since that
code was written and it might be interesting to try enabling it for
install as well and see what happens.

p.





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

* Re: [PATCH] kernel.bbclass: Allow do_compile_kernelmodules to use PARALLEL_MAKE
  2011-12-12 18:21   ` Phil Blundell
@ 2011-12-12 18:31     ` Khem Raj
  2011-12-12 21:30     ` Richard Purdie
  1 sibling, 0 replies; 8+ messages in thread
From: Khem Raj @ 2011-12-12 18:31 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer

On Mon, Dec 12, 2011 at 10:21 AM, Phil Blundell <philb@gnu.org> wrote:
> Indeed.  It's been that way basically forever; I think this was to avoid
> a class of problems caused by trying to run "make install" with -j.

correct I wanted to highlight it since its important to know when we
write recipes
and have special compile steps



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

* Re: [PATCH] kernel.bbclass: Allow do_compile_kernelmodules to use PARALLEL_MAKE
  2011-12-12 18:21   ` Phil Blundell
  2011-12-12 18:31     ` Khem Raj
@ 2011-12-12 21:30     ` Richard Purdie
  1 sibling, 0 replies; 8+ messages in thread
From: Richard Purdie @ 2011-12-12 21:30 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer

On Mon, 2011-12-12 at 18:21 +0000, Phil Blundell wrote:
> On Sat, 2011-12-10 at 15:28 -0800, Khem Raj wrote:
> > in base.bbclass oe_runmake says
> > 
> > ${MAKE} ${EXTRA_OEMAKE} "$@"
> > 
> > and
> > 
> > conf/bitbake.conf says
> > 
> > EXTRA_OEMAKE_prepend_task-compile = "${PARALLEL_MAKE} "
> > 
> > hmmm so we dont parallel make if task is not called do_compile ?
> 
> Indeed.  It's been that way basically forever; I think this was to avoid
> a class of problems caused by trying to run "make install" with -j.  
> 
> It's possible that the general situation has improved a bit since that
> code was written and it might be interesting to try enabling it for
> install as well and see what happens.

I recently merged patches to default to add PARALLEL_MAKE to do_install.
We have had surprisingly few issues with that. I think autotools itself
got fixed and hence so did anything using it. I guess anything with
broken makefiles already disables PARALLEL_MAKE so it seemed to work
pretty well.

Cheers,

Richard




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

end of thread, other threads:[~2011-12-12 21:37 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-12-10  0:34 [PATCH] kernel.bbclass: Allow do_compile_kernelmodules to use PARALLEL_MAKE Richard Purdie
2011-12-10  0:36 ` Bruce Ashfield
2011-12-10  1:06 ` Darren Hart
2011-12-10 23:28 ` Khem Raj
2011-12-11  8:56   ` Koen Kooi
2011-12-12 18:21   ` Phil Blundell
2011-12-12 18:31     ` Khem Raj
2011-12-12 21:30     ` Richard Purdie

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox