Re: [PATCH] Rmap speedup

Daniel Phillips (phillips@arcor.de)
Sun, 4 Aug 2002 00:05:57 +0200


Wait a second guys, the problem is with the script, look at those CPU
numbers:

> ./daniel.sh 39.78s user 71.72s system 368% cpu 30.260 total
> quad:/home/akpm> time ./daniel.sh
> ./daniel.sh 38.45s user 70.00s system 365% cpu 29.642 total

They should be 399%!! With my fancy script, the processes themselves are
getting serialized somehow.

Lets back up and try this again with this pair of scripts, much closer to
the original:

doitlots:
-------------------------------
#!/bin/sh

doit()
{
( cat $1 | wc -l )
}

count=0

while [ $count != 500 ]
do
doit doitlots > /dev/null

count=$(expr $count + 1)
done
echo done
-------------------------------

forklots:
-------------------------------
echo >foocount
./doitlots >>foocount &
./doitlots >>foocount &
./doitlots >>foocount &
./doitlots >>foocount &
./doitlots >>foocount &
./doitlots >>foocount &
./doitlots >>foocount &
./doitlots >>foocount &
./doitlots >>foocount &

count=0

while [ $count != 10 ]
do
count=$(wc foocount | cut -b -8)
done
-------------------------------

/me makes the sign of the beast at bash

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