Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 27 Mar 2001 16:30:10 -0800
From:      Alfred Perlstein <bright@wintelcom.net>
To:        Gersh <gersh@sonn.com>
Cc:        David Taylor <davidt@yadt.co.uk>, freebsd-hackers@FreeBSD.ORG
Subject:   Re: crash dump speed up patch.
Message-ID:  <20010327163009.M9431@fw.wintelcom.net>
In-Reply-To: <Pine.BSF.4.21.0103271553570.570-200000@tabby.sonn.com>; from gersh@sonn.com on Tue, Mar 27, 2001 at 03:54:56PM -0800
References:  <20010327235324.A60690@gattaca.yadt.co.uk> <Pine.BSF.4.21.0103271553570.570-200000@tabby.sonn.com>

next in thread | previous in thread | raw e-mail | index | archive | help
* Gersh <gersh@sonn.com> [010327 15:50] wrote:
> Attatched is a updated version of the patch with a few ideas from the list
> aswell as cam/scsi/scsi_da.c modified aswell.  Thanks for all the comments.

>  #endif
> -	    printf("%ld ", (long)(count * DEV_BSIZE) / (1024 * 1024));
> +	    /*
> +	     *  Rate limit printf's to replace old DELAY(1000)
> +	     *  This is done so that old slow serial connections
> +	     *  do not get hosed.
> +	     */
> +
> +	    left++;
> +	    percent = left * 100 / total;
> +
> +	    if (!(percent % 10) && (state - percent))
> +	    {
> +		printf("%d ", percent);
> +		state = percent;
> +	    }
>  	}

I still don't understand why you need the variable 'state'

should probably be:

if (percent % 10 == 0)
  printf("%d%%, ", percent);

-- 
-Alfred Perlstein - [bright@wintelcom.net|alfred@freebsd.org]
Daemon News Magazine in your snail-mail! http://magazine.daemonnews.org/

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010327163009.M9431>