lkml.org 
[lkml]   [1996]   [Sep]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Perl make depend made faster
On Sun, 15 Sep 1996, Linus Torvalds wrote:

> (This just does the thing in C - you end compiling "mkdep", but it does
> have the advantage that we know that a C compiler is always installed,
> because we couldn't compile the kernel without one anyway).

On an SMP box at work with dual P54C/90's (35.84 bogomips), though not
running an SMP kernel (dunno why, probably forgot to uncomment __SMP__)
with pretty much the entire tree in cache:

linux-2.0.20: time make dep (gawk stuff)
59.550u 5.260s 1:07.95 95.3% 0+0k 0+0io 17605pf+0w

linux-2.0.20-mkdep: time make dep (mkdep)
15.370u 3.420s 0:20.25 92.7% 0+0k 0+0io 18629pf+0w

I haven't seen a complete patch for the latest of the perl versions,
though I'll time it when I get ahold of it.


On a similar note, is there any way to make `make dep` more '-j'-happy?
On SMP boxen it's pretty much the only thing linear, not counting `make
clean`, which takes 2-4 seconds on this thing with all in cache.

The code segment in question is in Rules.make, lines 84-89:

-----
fastdep: dummy
if [ -n "$(wildcard *.[chS])" ]; then \
$(TOPDIR)/scripts/mkdep *.[chS] > .depend; fi
ifdef ALL_SUB_DIRS
set -e; for i in $(ALL_SUB_DIRS); do $(MAKE) -C $$i fastdep; done
endif
-----

On Sequent SMP boxen (I work at Sequent), there's an environment variable
called PARALLEL that hints make to do that many simultaneously. The
interesting thing is that at least one of the shells also uses it. If you
have $PARALLEL jobs started in the background, you can't start any more.

I noticed this behaviour when using 'for' loops for common manual tasks.
I background each element in the loop, etc., but it doesn't seem to kick
off all of them at once. A max of $PARALLEL are running at any one time.

This behaviour would be quite useful in this situation, so the `$(MAKE) -C
$$i fastdep` could be backgrounded within certain automatic limits.

If anyone's even remotely interested, I could take a patch to make-3.74 a
friend did and remove the '#ifdef SEQUENT's for the $PARALLEL hack. Could
make things easier for those in the SMP world.

TIA,
Omega@Sequent.com

__
__ Erik Walthinsen - Programmer, webmaster, 3D artist, etc. / /\
/ \ / / \
| | M E G A omega@sequent.com Work: (503)578-5314 / / /\ \
_\ /_ omega@teleport.com Home: (503)281-4281 / / /\ \ \
/ /_/__\ \ \
SSA: http://www.teleport.com/~omega/sequent/ (for now) /________\ \ \
\___________\/




\
 
 \ /
  Last update: 2005-03-22 13:38    [W:0.076 / U:0.260 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site