From owner-freebsd-hackers Tue Mar 27 16:30:18 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from fw.wintelcom.net (ns1.wintelcom.net [209.1.153.20]) by hub.freebsd.org (Postfix) with ESMTP id 60A6037B718 for ; Tue, 27 Mar 2001 16:30:16 -0800 (PST) (envelope-from bright@fw.wintelcom.net) Received: (from bright@localhost) by fw.wintelcom.net (8.10.0/8.10.0) id f2S0UAU18655; Tue, 27 Mar 2001 16:30:10 -0800 (PST) Date: Tue, 27 Mar 2001 16:30:10 -0800 From: Alfred Perlstein To: Gersh Cc: David Taylor , freebsd-hackers@FreeBSD.ORG Subject: Re: crash dump speed up patch. Message-ID: <20010327163009.M9431@fw.wintelcom.net> References: <20010327235324.A60690@gattaca.yadt.co.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: ; from gersh@sonn.com on Tue, Mar 27, 2001 at 03:54:56PM -0800 X-all-your-base: are belong to us. Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG * Gersh [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