linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Power usage Q and parallel make question (separate issues)
@ 2001-01-31 19:44 LA Walsh
  2001-02-01  0:32 ` Keith Owens
  0 siblings, 1 reply; 6+ messages in thread
From: LA Walsh @ 2001-01-31 19:44 UTC (permalink / raw)
  To: linux-kernel

I remember reading some time back that on a pentium the difference between a
pentium in HLT vs. running was about 2-3 watts vs. 15-20 watts.  Does anyone
know the difference for today's CPU's?  P-III/P-IV or other archs?

How about the difference when calling the BIOS power-save feature?  With
the threat of rolling blackouts here in CA, I was wondering what the power
consumption might be of a 100,000 or 1,000,000 CPU's in HLT vs. doing complex
mathematical computation?

Separately -- Parallel Make's
----------    ===============
So, just about anyone I know uses make -j X [-l Y] bzImage modules, but I noticed that
make modules_install isn't parallel safe in 2.4 -- since it takes much longer than the
old, it would make sense to want to run it in parallel as well, but it has a 
delete-old, <multiple sub-dirs>, index-new for deps.  Those "3" steps can't be done
in parallel safely.  Was this intentional or would a 'fix' be desired?

Is it the intention of the Makefile maintainers to allow a parallel or distributed
make?  I know for me it makes a noticable difference even on a 1 CPU machine
(CPU overlap with disk I/O), and with multi CPU machines, it's even more noticable.

Is a make of the kernel and/or the modules designed to be parallel safe?  Is it 
something I should 'rely' on?  If it isn't, should it be?

-l

-- 
Linda A Walsh                    | Trust Technology, Core Linux, SGI
law@sgi.com                      | Voice: (650) 933-5338
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

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

* Re: Power usage Q and parallel make question (separate issues)
  2001-01-31 19:44 Power usage Q and parallel make question (separate issues) LA Walsh
@ 2001-02-01  0:32 ` Keith Owens
  2001-02-01  3:02   ` LA Walsh
  0 siblings, 1 reply; 6+ messages in thread
From: Keith Owens @ 2001-02-01  0:32 UTC (permalink / raw)
  To: LA Walsh; +Cc: linux-kernel

On Wed, 31 Jan 2001 11:44:28 -0800, 
LA Walsh <law@sgi.com> wrote:
>So, just about anyone I know uses make -j X [-l Y] bzImage modules, but I noticed that
>make modules_install isn't parallel safe in 2.4 -- since it takes much longer than the
>old, it would make sense to want to run it in parallel as well, but it has a 
>delete-old, <multiple sub-dirs>, index-new for deps.  Those "3" steps can't be done
>in parallel safely.  Was this intentional or would a 'fix' be desired?

The only bit that could run in parallel is this one.

.PHONY: $(patsubst %, _modinst_%, $(SUBDIRS))
$(patsubst %, _modinst_%, $(SUBDIRS)) :
        $(MAKE) -C $(patsubst _modinst_%, %, $@) modules_install

The erase must be done first (serial), then make modules_install in
every subdir (parallel), then depmod (serial).

>Is it the intention of the Makefile maintainers to allow a parallel or distributed
>make?  I know for me it makes a noticable difference even on a 1 CPU machine
>(CPU overlap with disk I/O), and with multi CPU machines, it's even more noticable.
>
>Is a make of the kernel and/or the modules designed to be parallel safe?  Is it 
>something I should 'rely' on?  If it isn't, should it be?

make dep, make clean and the various install targets are not parallel
safe in 2.4.  Most of the make vmlinux, bzImage, modules is parallel
safe but even in those phases there are known problems because the 2.4
makefiles do not make it easy to handle cross directory dependencies.
The recommended sequence for 2.4 is

  make xxxconfig
  make dep
  make clean <if necessary>
  make -j n bzImage modules
  make modules_install

The makefile rewrite for 2.5 will fix these parallelism problems.  The
2.4 system is too fragile with too many special cases, nobody is game
to fix the parallelism and guarantee that it will not break anything
else.  modules_install in 2.5 will be fast!

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

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

* Re: Power usage Q and parallel make question (separate issues)
  2001-02-01  0:32 ` Keith Owens
@ 2001-02-01  3:02   ` LA Walsh
  2001-02-01  3:32     ` Keith Owens
  0 siblings, 1 reply; 6+ messages in thread
From: LA Walsh @ 2001-02-01  3:02 UTC (permalink / raw)
  To: Keith Owens; +Cc: linux-kernel

Keith Owens wrote:
>
> The only bit that could run in parallel is this one.
> 
> .PHONY: $(patsubst %, _modinst_%, $(SUBDIRS))
> $(patsubst %, _modinst_%, $(SUBDIRS)) :
>         $(MAKE) -C $(patsubst _modinst_%, %, $@) modules_install
> 
> The erase must be done first (serial), then make modules_install in
> every subdir (parallel), then depmod (serial).
---
Right...Wouldn't something like this work?  (Seems to)
--- Makefile.old        Wed Jan 31 18:57:21 2001
+++ Makefile    Wed Jan 31 18:54:53 2001
@@ -351,8 +351,12 @@
 $(patsubst %, _mod_%, $(SUBDIRS)) : include/linux/version.h include/config/MARKER
        $(MAKE) -C $(patsubst _mod_%, %, $@) CFLAGS="$(CFLAGS) $(MODFLAGS)" MAKING_MODULES=1 modules
 
+modules_inst_subdirs: _modinst_
+       $(MAKE) $(patsubst %, _modinst_%, $(SUBDIRS))
+
+
 .PHONY: modules_install
-modules_install: _modinst_ $(patsubst %, _modinst_%, $(SUBDIRS)) _modinst_post
+modules_install: _modinst_post
 
 .PHONY: _modinst_
 _modinst_:
@@ -372,7 +376,7 @@
 depmod_opts    := -b $(INSTALL_MOD_PATH) -r
 endif
 .PHONY: _modinst_post
-_modinst_post: _modinst_post_pcmcia
+_modinst_post: _modinst_post_pcmcia modules_inst_subdirs
        if [ -r System.map ]; then $(DEPMOD) -ae -F System.map $(depmod_opts) $(KERNELRELEASE); fi
 
 # Backwards compatibilty symlinks for people still using old versions          
---
This seems to serialize the delete, run the mod-installs in parallel, then run the
depmod when they are done.  
-- 
Linda A Walsh                    | Trust Technology, Core Linux, SGI
law@sgi.com                      | Voice: (650) 933-5338
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

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

* Re: Power usage Q and parallel make question (separate issues)
  2001-02-01  3:02   ` LA Walsh
@ 2001-02-01  3:32     ` Keith Owens
  2001-02-01  8:13       ` LA Walsh
  0 siblings, 1 reply; 6+ messages in thread
From: Keith Owens @ 2001-02-01  3:32 UTC (permalink / raw)
  To: LA Walsh; +Cc: linux-kernel

On Wed, 31 Jan 2001 19:02:03 -0800, 
LA Walsh <law@sgi.com> wrote:
>This seems to serialize the delete, run the mod-installs in parallel, then run the
>depmod when they are done.  

It works, until somebody does this

 make -j 4 modules modules_install

There is not, and never has been, any interlock between make modules
and make modules_install.  If you let modules_install run in parallel
then people will be tempted to issue the incorrect command above
instead of the required separate commands.

 make -j 4 modules
 make -j 4 modules_install

You gain a few seconds on module_install but leave more room for user
error.

All of this is cleaned up in the 2.5 kbuild system (work in progress).
I have carefully coded the 2.5 kbuild system so it can be used on 2.4
kernels as well.  If you don't mind being an earlier adopter, this will
be fixed in a few weeks.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

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

* Re: Power usage Q and parallel make question (separate issues)
  2001-02-01  3:32     ` Keith Owens
@ 2001-02-01  8:13       ` LA Walsh
  2001-02-01  8:24         ` Keith Owens
  0 siblings, 1 reply; 6+ messages in thread
From: LA Walsh @ 2001-02-01  8:13 UTC (permalink / raw)
  To: Keith Owens; +Cc: linux-kernel

Keith Owens wrote:
> 
> On Wed, 31 Jan 2001 19:02:03 -0800,
> LA Walsh <law@sgi.com> wrote:
> >This seems to serialize the delete, run the mod-installs in parallel, then run the
> >depmod when they are done.
> 
> It works, until somebody does this
> 
>  make -j 4 modules modules_install
---
	But that doesn't work now.  

> There is not, and never has been, any interlock between make modules
> and make modules_install.  If you let modules_install run in parallel
> then people will be tempted to issue the incorrect command above
> instead of the required separate commands.
---
	
> 
>  make -j 4 modules
>  make -j 4 modules_install
> 
> You gain a few seconds on module_install but leave more room for user
> error.
---
	A bit of documentation at the beginning of the Makefile would do wonders
for kernel-developer (not end user, please!) clarity.  I've oft'asked the question
as to what really is supported.  I've tried things like make dep bzImage modules --
I noticed it didn't work fairly quickly.  Same with modules/modules_install -- 
people would probably figure that one out, but just a bit of documentation would
help even that.  


	
-- 
Linda A Walsh                    | Trust Technology, Core Linux, SGI
law@sgi.com                      | Voice: (650) 933-5338
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

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

* Re: Power usage Q and parallel make question (separate issues)
  2001-02-01  8:13       ` LA Walsh
@ 2001-02-01  8:24         ` Keith Owens
  0 siblings, 0 replies; 6+ messages in thread
From: Keith Owens @ 2001-02-01  8:24 UTC (permalink / raw)
  To: LA Walsh; +Cc: linux-kernel

On Thu, 01 Feb 2001 00:13:17 -0800, 
LA Walsh <law@sgi.com> wrote:
>Keith Owens wrote:
>> It works, until somebody does this
>> 
>>  make -j 4 modules modules_install
>---
>	But that doesn't work now.  

Agreed, but letting modules_install parallel run increases the risk of
somebody doing that.  Most users will think that they can combine two
parallel runs into a single command, but if they are forced to single
thread modules_install it reduces the risk of user error.

>	A bit of documentation at the beginning of the Makefile would do wonders
>for kernel-developer (not end user, please!) clarity.  I've oft'asked the question
>as to what really is supported.  I've tried things like make dep bzImage modules --
>I noticed it didn't work fairly quickly.  Same with modules/modules_install -- 
>people would probably figure that one out, but just a bit of documentation would
>help even that.  

The 2.5 kbuild system will be fully documented, all the way from
reasons for doing things down to how they are down.  Trust me on this!
I have had too many problems with undocumented changes in kbuild.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

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

end of thread, other threads:[~2001-02-01  8:25 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-01-31 19:44 Power usage Q and parallel make question (separate issues) LA Walsh
2001-02-01  0:32 ` Keith Owens
2001-02-01  3:02   ` LA Walsh
2001-02-01  3:32     ` Keith Owens
2001-02-01  8:13       ` LA Walsh
2001-02-01  8:24         ` Keith Owens

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