From owner-freebsd-hackers Thu Jun 15 07:35:01 1995 Return-Path: hackers-owner Received: (from majordom@localhost) by freefall.cdrom.com (8.6.10/8.6.6) id HAA21402 for hackers-outgoing; Thu, 15 Jun 1995 07:35:01 -0700 Received: from insanus.matematik.su.se (insanus.matematik.su.se [130.237.198.12]) by freefall.cdrom.com (8.6.10/8.6.6) with ESMTP id HAA21389 for ; Thu, 15 Jun 1995 07:34:58 -0700 Received: from localhost (jocosus.matematik.su.se [130.237.198.7]) by insanus.matematik.su.se (8.6.10/8.6.9) with ESMTP id OAA04557; Thu, 15 Jun 1995 14:34:06 GMT Message-Id: <199506151434.OAA04557@insanus.matematik.su.se> X-Address: Department of Mathematics, Stockholm University S-106 91 Stockholm SWEDEN X-Phone: int+8162000 X-Fax: int+86126717 X-Url: http://www.matematik.su.se To: hackers@freebsd.org cc: sef@cygnus.com Subject: Poor store performance with Pentium Date: Thu, 15 Jun 1995 16:34:01 +0200 From: Torbjorn Granlund Sender: hackers-owner@freebsd.org Precedence: bulk I am exploring the Pentium pipeline, in preparation for optimizing GCC for Pentium. I just ran into something very weird with the performance of loads and stores. The loop in below takes 28 cycles/iteration if READ is undefined, and the expected 4 cycles if READ is defined. (The nops are irrelevant, but are needed in my accurate timing setup.) The only explanation I can think of to the poor write performance is that the cache is in write-through mode, not write-back mode. Does FreeBSD 2.x have support for setting the Pentium data cache in write-back mode? If it doesn't, could somebody with a good understanding of the relevant components in the kernel outline the issues involved, and what I would have to modify in order to enable write-back. Torbjorn .text .align 2 .globl _f .type _f,@function _f: movl 4(%esp),%edx movl $99999999,%eax .align 2,0x90 L2: nop nop #if READ movl (%edx),%ecx movl 4(%edx),%ecx movl 8(%edx),%ecx movl 12(%edx),%ecx #else movl %ecx,(%edx) movl %ecx,4(%edx) movl %ecx,8(%edx) movl %ecx,12(%edx) #endif decl %eax jg L2 ret Lfe1: .size _f,Lfe1-_f