Power usage Q and parallel make question (separate issues)
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
Signature · 6 lines
Linda A Walsh | Trust Technology, Core Linux, SGI [email protected] | Voice: (650) 933-5338 - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected] Please read the FAQ at http://www.tux.org/lkml/
Quoted 5 lines · LA Walsh
So, just about anyone I know uses make -j X [-l Y] bzImage modules, but I noticed that make
modules_installisn'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).
Quoted 6 lines
Is it the intention of the
Makefilemaintainers 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 [email protected]
Please read the FAQ at http://www.tux.org/lkml/
Quoted 9 lines · Keith Owens
The only bit that could run in parallel is this one.
.PHONY: $(patsubst %, _modinst_%, $(SUBDIRS))
$(patsubst %, _modinst_%, $(SUBDIRS)) :$(MAKE) -C $(patsubst _modinst_%, %, $@) modules_installThe erase must be done first (serial), then make
modules_installin every subdir (parallel), then depmod (serial).
---
Right...Wouldn't something like this work? (Seems to)
Makefile Wed Jan 31 18:54:53 2001 renamed from Makefile.old Wed Jan 31 18:57:21 2001 +6 -2
@@ -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.
Signature · 6 lines
Linda A Walsh | Trust Technology, Core Linux, SGI [email protected] | Voice: (650) 933-5338 - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected] Please read the FAQ at http://www.tux.org/lkml/
Quoted 2 lines · LA Walsh
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 [email protected]
Please read the FAQ at http://www.tux.org/lkml/
Quoted 9 lines · Keith Owens
Quoted 2 lines · LA Walsh
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.
Quoted 4 lines
There is not, and never has been, any interlock between make modules and make
modules_install. If you letmodules_installrun in parallel then people will be tempted to issue the incorrect command above instead of the required separate commands.
---
Quoted 6 lines
make -j 4 modules
make -j 4modules_installYou gain a few seconds on
module_installbut 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.
Signature · 6 lines
Linda A Walsh | Trust Technology, Core Linux, SGI [email protected] | Voice: (650) 933-5338 - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected] Please read the FAQ at http://www.tux.org/lkml/
Quoted 6 lines · LA Walsh
Quoted 3 lines · Keith Owens
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.
Quoted 6 lines
A bit of documentation at the beginning of the
Makefilewould 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 [email protected]
Please read the FAQ at http://www.tux.org/lkml/