From 8c82ff3bb6dcdcb455ee1819f90530fc7750618c Mon Sep 17 00:00:00 2001 From: adilger Date: Fri, 13 Feb 2004 22:17:10 +0000 Subject: [PATCH] Update b_bug974 from HEAD (20040213_1456) prior to landing (mostly b_smallfix) --- lustre/scripts/bdev-io-survey.sh | 29 ++++++++++- lustre/scripts/cvs-modified-files.pl | 47 ------------------ lustre/scripts/cvsdiffclient | 26 ---------- lustre/scripts/land1.sh | 93 ------------------------------------ lustre/scripts/land2.sh | 28 ----------- 5 files changed, 28 insertions(+), 195 deletions(-) delete mode 100755 lustre/scripts/cvs-modified-files.pl delete mode 100755 lustre/scripts/cvsdiffclient delete mode 100755 lustre/scripts/land1.sh delete mode 100755 lustre/scripts/land2.sh diff --git a/lustre/scripts/bdev-io-survey.sh b/lustre/scripts/bdev-io-survey.sh index cea3066..016bd65 100755 --- a/lustre/scripts/bdev-io-survey.sh +++ b/lustre/scripts/bdev-io-survey.sh @@ -22,6 +22,9 @@ declare -a cleanup_mounts cur_y="0" # a global which funcs use to get at the blocks[] array last_block=-1 +# prefix to run oprofile or readprofile +oprofile="" +readprofile="" # defaults for some options: min_threads=1 @@ -418,7 +421,7 @@ echo_filter_config() { fi if [ $index = 0 ]; then - if ! lmc -m $config --add net \ + if ! lmc -m $config --add net \ --node localhost --nid localhost --nettype tcp; then echo "error adding localhost net node" return 1 @@ -447,6 +450,10 @@ echo_filter_prepare() { return 1; fi running_config="$config" + + echo 0 > /proc/sys/portals/debug + echo 0 > /proc/sys/portals/subsystem_debug + if ! grep -q '^obdecho\>' /proc/modules; then local m if ! modprobe obdecho; then @@ -598,11 +605,13 @@ test_one() { done $oprofile opcontrol --reset + $readprofile -r # start all the tests. each returns a pid to wait on pids="" for i in `seq 0 $last_block`; do local cmd=`${test}_start $threads $iosize $wor $i` + echo "$cmd" >> $tmpdir/commands $cmd > $tmpdir/$i 2>&1 & local pid=$! pids="$pids $pid" @@ -628,11 +637,15 @@ test_one() { pid_has_stopped $pid done + $readprofile | sort -rn > $tmpdir/readprofile + $oprofile opcontrol --shutdown $oprofile opreport > $tmpdir/oprofile echo >> $tmpdir/oprofile $oprofile opreport -c -l | head -20 >> $tmpdir/oprofile + save_output $tmpdir/oprofile $opref.oprofile + save_output $tmpdir/readprofile $opref.readprofile # collect the results of vmstat and iostat cpu=$(mean_stddev $(awk \ @@ -792,6 +805,18 @@ else oprofile=": " fi +if which readprofile; then + map="/boot/System.map-`uname -r`" + if [ -f /proc/profile -a -f "$map" ]; then + echo generating profiles with 'readprofile' + readprofile="readprofile -m $map" + fi +fi +if [ -z "$readprofile" ]; then + echo not using readprofile + readprofile=": " +fi + [ $min_threads -gt $max_threads ] && \ die "min threads $min_threads must be <= min_threads $min_threads" @@ -832,6 +857,8 @@ for t in $run_tests; do test_results="$test_results $t" done +save_output $tmpdir/commands commands + [ ! -z "$test_results" ] && ( echo echo "T = number of concurrent threads per device" diff --git a/lustre/scripts/cvs-modified-files.pl b/lustre/scripts/cvs-modified-files.pl deleted file mode 100755 index d13c4d3..0000000 --- a/lustre/scripts/cvs-modified-files.pl +++ /dev/null @@ -1,47 +0,0 @@ -#!/usr/bin/env perl - -my $mode = "NONE"; -my @modified, @added, @removed; - -while($line = <>) { - if ($line =~ /Modified Files:/) { - $mode = "MODIFIED"; - next; - } - - if ($line =~ /Added Files:/) { - $mode = "ADDED"; - next; - } - - if ($line =~ /Removed Files:/) { - $mode = "REMOVED"; - next; - } - - if ($mode eq "NONE") { next; } - if ($line =~ /-------/) { next; } - - chop($line); - $line =~ s/^CVS:\s+//; - $line =~ s/\s+$//; - # print "processing $line for $mode\n"; - @files = split(/ /, $line); - # print "new files for $mode: ", join(', ', @files), "\n"; - - if ($mode eq "MODIFIED") { - push(@modified, @files); - } elsif ($mode eq "ADDED") { - push(@added, @files); - } elsif ($mode eq "REMOVED") { - push(@removed, @files); - } else { - die "Unknown mode $mode!"; - } -} - -print join(' ', @modified); -if ($ENV{"SHOW_ALL_FILES"} ne "no") { - print ' ', join(' ', @added), ' ', join(' ', @removed); -} -print "\n"; diff --git a/lustre/scripts/cvsdiffclient b/lustre/scripts/cvsdiffclient deleted file mode 100755 index dab1e90..0000000 --- a/lustre/scripts/cvsdiffclient +++ /dev/null @@ -1,26 +0,0 @@ -#!/bin/bash - -[ -f .mergeinfo ] && . ./.mergeinfo - -FILES=`cvs-modified-files.pl $1` -TMP=`mktemp /tmp/cvslog-XXXXXXXX` -if [ -f $TMP ]; then - [ -f .mergeinfo ] && \ - echo "CVS: Update $child from $parent ($date)" >> $TMP - echo "CVS: did you update the ChangeLog for a bug fix?" >> $TMP - echo "CVS: b=" >> $TMP - echo "CVS: r=" >> $TMP - - cat $1 >> $TMP - cp $TMP $1 - rm $TMP -fi - -if [ "${FILES:+have_files}"x = have_filesx ]; then - echo Diffing $1 : $FILES - cvs diff -wbBup $FILES 2>/dev/null | sed "s/^/CVS: /" >>$1 -fi -#gnuclient $1 || vi $1 -[ "$EDITOR" ] || EDITOR=vi - -$EDITOR $1 diff --git a/lustre/scripts/land1.sh b/lustre/scripts/land1.sh deleted file mode 100755 index 0c07803..0000000 --- a/lustre/scripts/land1.sh +++ /dev/null @@ -1,93 +0,0 @@ -#!/bin/sh -e - -CONFLICTS=cvs-merge-conflicts -CVS=cvs - -if [ -f .mergeinfo ] ; then - echo ".mergeinfo exists - clean up first" - exit -fi - -if [ -f $CONFLICTS ] ; then - echo "$CONFLICTS exists - clean up first" - exit -fi - -if [ $# -lt 2 -o $# -gt 3 ]; then - echo "This is phase 1 of merging branches. Usage: $0 parent child [dir]" - exit -fi - -parent=$1 -PARENT=`echo $parent | sed -e "s/^b_//" | tr "[a-z]" "[A-Z]"` -child=$2 -CHILD=`echo $child | sed -e "s/^b_//" | tr "[a-z]" "[A-Z]"` -date=`date +%Y%m%d_%H%M` -module=lustre - -if [ "$parent" != "HEAD" -a "`cat CVS/Tag`" != "T$parent" ]; then - echo "This script must be run within the $parent branch" - exit 1 -fi - -dir=$3 - -if [ $parent != "HEAD" ]; then - parent="b_$parent" -fi -if [ $child != "HEAD" ]; then - child="b_$child" -fi - -cat << EOF > .mergeinfo -parent=$parent -PARENT=$PARENT -child=$child -CHILD=$CHILD -date=$date -module=$module -dir=$dir -CONFLICTS=$CONFLICTS -EOF - -echo PARENT $PARENT parent $parent CHILD $CHILD child $child date $date - -# Update your tree to the PARENT branch; HEAD is not really a branch, so you -# need to update -A instead of update -r HEAD, or the commit will fail. -p -echo -n "Updating to $parent ...." -if [ $parent == "HEAD" ]; then - $CVS update -AdP $dir -else - $CVS update -r $parent -dP $dir -fi -echo "done" - -echo -n "Tagging as ${PARENT}_${CHILD}_LAND_PARENT_$date ..." -$CVS tag ${PARENT}_${CHILD}_LAND_PARENT_$date $dir -echo "done" - -echo -n "Create land point on ${child} ${PARENT}_${CHILD}_LAND_CHILD_$date ..." -$CVS rtag -r ${child} ${PARENT}_${CHILD}_LAND_CHILD_$date $module $dir -echo "done" - -echo -n "Preserve old base tag ${CHILD}_BASE as ${CHILD}_BASE_PREV ..." -$CVS tag -F -r ${CHILD}_BASE ${CHILD}_BASE_PREV $dir -echo "done" - -# Apply all of the changes to your local tree: -echo -n "Updating as -j ${CHILD}_BASE -j ${PARENT}_${CHILD}_LAND_CHILD_$date ..." -$CVS update -j ${CHILD}_BASE -j ${PARENT}_${CHILD}_LAND_CHILD_$date $dir -echo "done" - -echo -n "Recording conflicts in $CONFLICTS ..." -if $CVS update | grep '^C' > $CONFLICTS; then - echo "Conflicts found, fix before committing." - cat $CONFLICTS -else - echo "No conflicts found" - rm -f $CONFLICTS -fi -echo "done" - -echo "Test, commit and then run land2.sh (no arguments)" - diff --git a/lustre/scripts/land2.sh b/lustre/scripts/land2.sh deleted file mode 100755 index 6690e7d..0000000 --- a/lustre/scripts/land2.sh +++ /dev/null @@ -1,28 +0,0 @@ -#!/bin/sh -e - -CVS=cvs - -if [ ! -f .mergeinfo ] ; then - echo ".mergeinfo doesn't exist - exit" - exit -fi - -. .mergeinfo - -if [ -f $CONFLICTS ] ; then - echo "$CONFLICTS exists - clean up first" - cat $CONFLICTS - exit -fi - -cvs update $dir 2>&1 | grep "^M" && echo "uncommitted changes" && exit 1 - -echo -n "Tagging as ${CHILD}_BASE_$date ..." -$CVS tag -F ${CHILD}_BASE_$date $dir -echo "done" -echo -n "Tagging as ${CHILD}_BASE ..." -$CVS tag -F ${CHILD}_BASE $dir - -echo "saving .mergeinfo as .mergeinfo-$date" -mv .mergeinfo .mergeinfo-$date -echo "done" -- 1.8.3.1