Date: Sun, 16 May 1999 12:52:09 -0700 (PDT) From: sobomax@altavista.net To: freebsd-gnats-submit@freebsd.org Subject: kern/11736: On fast machines kernel reports negative i586_bzero bandwith values due to datatype overflow Message-ID: <19990516195209.1464B1512C@hub.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 11736 >Category: kern >Synopsis: On fast machines kernel reports negative i586_bzero bandwith values due to datatype overflow >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Sun May 16 13:00:01 PDT 1999 >Closed-Date: >Last-Modified: >Originator: Maxim Sobolev >Release: 4.0-CURRENT >Organization: Vega International Capital >Environment: >Description: On the fast machine with lot of cache (K6-2 250MHz, 1024KBcache respectevly in my case) i586_bzero bandwith in bytes may exceed 2^31 (signed long datatype maximum value - i.e > 2.147.483.648 bytes/s) and kernel in verbose mode will report negative bandwith. >How-To-Repeat: 1. Take a relatively fast machine 2. Boot with -v option 3. Look at the dmesg output ;) >Fix: --- npx.c.orig Sat May 15 01:14:13 1999 +++ npx.c Sat May 15 02:01:51 1999 @@ -696,8 +696,8 @@ if (usec <= 0) usec = 1; if (bootverbose) - printf("%s bandwidth = %ld bytes/sec\n", - funcname, (long)(BUFSIZE * (int64_t)1000000 / usec)); + printf("%s bandwidth = %ld Kbytes/sec\n", + funcname, (long)(BUFSIZE * (int64_t)1000000 / (1024*usec))); free(buf, M_TEMP); return (usec); } >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19990516195209.1464B1512C>