Solved: NPX code reports negative i586_bzero() bandwidth

1999-05-14 Thread Maxim Sobolev
Maxim Sobolev wrote:

 i586_bzero() bandwidth = -2082577916 bytes/sec
 bzero() bandwidth = 184877056 bytes/sec

It seems that on a fast machines with a lot of cache long type is not
sufficient to print i586_bzero bandwith values in bytes/s (in my case it was
slightly overruned). Following is the patch:

--- 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)100 / usec));
+  printf(%s bandwidth = %ld Kbytes/sec\n,
+  funcname, (long)(BUFSIZE * (int64_t)100 / (1024*usec)));
  free(buf, M_TEMP);
  return (usec);
 }



To Unsubscribe: send mail to majord...@freebsd.org
with unsubscribe freebsd-current in the body of the message



NPX code reports negative i586_bzero() bandwidth

1999-05-09 Thread Maxim Sobolev
I already submitted this (about a week ago)   :(
Please take a look at negative bandwith reported by i586_bzero...
(kernel cvsup'ed and rebuilded several minutes ago). Looks like data
type owerflow (my machine have K6-2 266 running on 250MHz and 1MB of L2
cache).

Calibrating clock(s) ... TSC clock: 250535974 Hz, i8254 clock: 1193028
Hz
Timecounter i8254  frequency 1193028 Hz
CPU: AMD-K6(tm) 3D processor (250.54-MHz 586-class CPU)
  Origin = AuthenticAMD  Id = 0x580  Stepping=0
  Features=0x8001bfFPU,VME,DE,PSE,TSC,MSR,MCE,CX8,MMX
Data TLB: 128 entries, 2-way associative
Instruction TLB: 64 entries, 1-way associative
L1 data cache: 32 kbytes, 32 bytes/line, 2 lines/tag, 2-way associative
L1 instruction cache: 32 kbytes, 32 bytes/line, 2 lines/tag, 2-way
associative
Write Allocate Enable Limit: 64M bytes
Write Allocate 15-16M bytes: Enable
Hardware Write Allocate Control: Disable
real memory  = 67108864 (65536K bytes)
Physical memory chunk(s):
0x1000 - 0x0009, 651264 bytes (159 pages)
0x00265000 - 0x03ffdfff, 64589824 bytes (15769 pages)
sio0: system console
avail memory = 62922752 (61448K bytes)
Found BIOS32 Service Directory header at 0xc00faff0
Entry = 0xfb470 (0xc00fb470)  Rev = 0  Len = 1
PCI BIOS entry at 0xb4a0
Other BIOS signatures found:
ACPI: 
$PnP: 000fc0b0
Preloaded elf kernel kernel at 0xc025.
Initializing PnP override table
Probing for PnP devices:
Trying Read_Port at 203
PnP: CSN 1 COMP_DEVICE_ID = 0x0006d041
CSN 1 Vendor ID: CTL0028 [0x28008c0e] Serial 0x1013c276 Comp ID: PNP0600
[0x0006d041]
Called nullpnp_probe with tag 0x0001, type 0x28008c0e
Called nullpnp_probe with tag 0x0001, type 0x0006d041
pci_open(1): mode 1 addr port (0x0cf8) is 0x8060
pci_open(1a): mode1res=0x8000 (0x8000)
pci_cfgcheck: device 0 [class=06] [hdr=00] is there (id=05971106)
npx0: math processor on motherboard
npx0: INT 16 interface
i586_bzero() bandwidth = -2082577916 bytes/sec
bzero() bandwidth = 184877056 bytes/sec


Sincerely,

Maxim



To Unsubscribe: send mail to majord...@freebsd.org
with unsubscribe freebsd-current in the body of the message