public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Dave Chinner <david@fromorbit.com>
To: Christian Kujau <lists@nerdbynature.de>
Cc: Christoph Hellwig <hch@infradead.org>, xfs@oss.sgi.com
Subject: Re: [PATCH] remove bashisms from xfstests
Date: Thu, 7 Jan 2010 09:36:31 +1100	[thread overview]
Message-ID: <20100106223631.GV13802@discord.disaster> (raw)
In-Reply-To: <alpine.DEB.2.01.1001061114340.3483@bogon.housecafe.de>

On Wed, Jan 06, 2010 at 11:24:10AM -0800, Christian Kujau wrote:
> On Wed, 6 Jan 2010 at 11:48, Christoph Hellwig wrote:
> > > 2) convert "let..." into something (hopefully) more portable
> > 
> > Dave converted these away from expr due to performance reasons.  I'd
> > like too see a prove that performance hasn't regressed due to this
> > change.
> 
> That's why I hesitated to just change all scripts to /bin/bash, but didn't 
> dare to say so, because of the inevitable "but today's computers are fast 
> enough" reactions :-)

FYI - the problem I came across was to do with running xfsqa under UML,
where forking a new process is an expensive operation (I measured it
at about 300ms) and so using bash built-in expressions for
incrementing variables is a major win in terms of test run time.
IIRC, one test loops 100,000 times and the runtime went from half an
hour to 10s just by using "let n=n+1" instead of expr...

> 
> > > 3) replace 'a == b' with 'a = b' in bourne shell scripts
> > 
> > This looks fine.  If you want feel free to submit these as a separate
> > first patch so that we have the large pile sorted out.
> 
> OK, will do.
> 
> > I fear this might cause some overhead in the shell.  What about the
> > following instead:
> > 
> > for i in `seq 0 39`; do
> >     ln -s $o symlink_$i
> >     o=symlink_$i
> > done
> 
> I didn't go for seq(1), as I feared this wouldn't be available on every 
> machine.

seq(1) is already used in several tests, so it is ok to use in
more. :)

Cheers,

Dave.
-- 
Dave Chinner
david@fromorbit.com

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

      reply	other threads:[~2010-01-06 22:35 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-03 10:30 [PATCH] remove bashisms from xfstests Christian Kujau
2010-01-03 16:56 ` Andi Kleen
2010-01-03 17:06   ` Michael Weissenbacher
2010-01-04  7:27   ` Christian Kujau
2010-01-04  7:56     ` Christian Kujau
2010-01-15  7:19       ` Dave Chinner
2010-01-06 16:48 ` Christoph Hellwig
2010-01-06 19:24   ` Christian Kujau
2010-01-06 22:36     ` Dave Chinner [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100106223631.GV13802@discord.disaster \
    --to=david@fromorbit.com \
    --cc=hch@infradead.org \
    --cc=lists@nerdbynature.de \
    --cc=xfs@oss.sgi.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox