Re: Power usage Q and parallel make question (separate issues)

LA Walsh (law@sgi.com)
Wed, 31 Jan 2001 19:02:03 -0800


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/