Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/powerpc/ibm4xx copy{in,out}{,str}: Drop needless dc...



details:   https://anonhg.NetBSD.org/src/rev/098a17f854d5
branches:  trunk
changeset: 371735:098a17f854d5
user:      rin <rin%NetBSD.org@localhost>
date:      Tue Oct 04 13:45:50 2022 +0000

description:
copy{in,out}{,str}: Drop needless dcbst.

Data cache is purely physical for 40[53] with 16KB pages, and therefore
no need to flush cache before context switch.

This significantly improves copy{in,out} against small data; for example,
bytebench on DHT becomes:

-Pipe Throughput        12440.0          8826.1          7.1
+Pipe Throughput        12440.0         18364.8         14.8

No performance/ATF regression observed on 405. 403 boots successfully
into multiuser mode, and builds some packages.

diffstat:

 sys/arch/powerpc/ibm4xx/copyinstr.c  |  5 ++---
 sys/arch/powerpc/ibm4xx/copyoutstr.c |  5 ++---
 sys/arch/powerpc/ibm4xx/trap.c       |  8 ++------
 3 files changed, 6 insertions(+), 12 deletions(-)

diffs (102 lines):

diff -r 63c2fcce1b9d -r 098a17f854d5 sys/arch/powerpc/ibm4xx/copyinstr.c
--- a/sys/arch/powerpc/ibm4xx/copyinstr.c       Tue Oct 04 12:18:58 2022 +0000
+++ b/sys/arch/powerpc/ibm4xx/copyinstr.c       Tue Oct 04 13:45:50 2022 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: copyinstr.c,v 1.18 2022/10/03 23:41:28 rin Exp $       */
+/*     $NetBSD: copyinstr.c,v 1.19 2022/10/04 13:45:50 rin Exp $       */
 
 /*
  * Copyright 2001 Wasabi Systems, Inc.
@@ -36,7 +36,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: copyinstr.c,v 1.18 2022/10/03 23:41:28 rin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: copyinstr.c,v 1.19 2022/10/04 13:45:50 rin Exp $");
 
 #include <sys/param.h>
 #include <uvm/uvm_extern.h>
@@ -92,7 +92,6 @@
                MTPID(%[pid])
                "isync;"
                "stb %[data],0(%[kaddr]);"      /* Store kernel byte */
-               "dcbst 0,%[kaddr];"
                "addi %[kaddr],%[kaddr],1;"
                "or. %[data],%[data],%[data];"
                "sync;"
diff -r 63c2fcce1b9d -r 098a17f854d5 sys/arch/powerpc/ibm4xx/copyoutstr.c
--- a/sys/arch/powerpc/ibm4xx/copyoutstr.c      Tue Oct 04 12:18:58 2022 +0000
+++ b/sys/arch/powerpc/ibm4xx/copyoutstr.c      Tue Oct 04 13:45:50 2022 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: copyoutstr.c,v 1.18 2022/10/03 23:41:28 rin Exp $      */
+/*     $NetBSD: copyoutstr.c,v 1.19 2022/10/04 13:45:50 rin Exp $      */
 
 /*
  * Copyright 2001 Wasabi Systems, Inc.
@@ -36,7 +36,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: copyoutstr.c,v 1.18 2022/10/03 23:41:28 rin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: copyoutstr.c,v 1.19 2022/10/04 13:45:50 rin Exp $");
 
 #include <sys/param.h>
 #include <uvm/uvm_extern.h>
@@ -94,7 +94,6 @@
                "isync;"
 
                "stb %[data],0(%[uaddr]);"      /* Store byte */
-               "dcbst 0,%[uaddr];"
                "addi %[uaddr],%[uaddr],1;"
 
                "or. %[data],%[data],%[data];"
diff -r 63c2fcce1b9d -r 098a17f854d5 sys/arch/powerpc/ibm4xx/trap.c
--- a/sys/arch/powerpc/ibm4xx/trap.c    Tue Oct 04 12:18:58 2022 +0000
+++ b/sys/arch/powerpc/ibm4xx/trap.c    Tue Oct 04 13:45:50 2022 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: trap.c,v 1.99 2022/09/12 08:06:36 rin Exp $    */
+/*     $NetBSD: trap.c,v 1.100 2022/10/04 13:45:50 rin Exp $   */
 
 /*
  * Copyright 2001 Wasabi Systems, Inc.
@@ -69,7 +69,7 @@
 #define        __UFETCHSTORE_PRIVATE
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.99 2022/09/12 08:06:36 rin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.100 2022/10/04 13:45:50 rin Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_ddb.h"
@@ -481,7 +481,6 @@
 #else
                "stw    %[tmp],0(%[kaddr]);"
 #endif
-               "dcbst  0,%[kaddr];"            /* flush cache */
                "addi   %[kaddr],%[kaddr],0x4;" /* next kaddr word */
                "sync;"
                "bdnz   1b;"                    /* repeat */
@@ -498,7 +497,6 @@
                MTPID(%[pid])
                "isync;"
                "stswx  %[tmp],0,%[kaddr];"     /* Store kernel bytes */
-               "dcbst  0,%[kaddr];"            /* flush cache */
                "sync;"
 
        "10:"   "mtmsr  %[msr];"                /* Restore MSR */
@@ -601,7 +599,6 @@
 #else
                "stw    %[tmp],0(%[uaddr]);"
 #endif
-               "dcbst  0,%[uaddr];"            /* flush cache */
                "addi   %[uaddr],%[uaddr],0x4;" /* next uaddr word */
                "sync;"
 
@@ -619,7 +616,6 @@
                MTPID(%[ctx])
                "isync;"
                "stswx  %[tmp],0,%[uaddr];"     /* Store user bytes */
-               "dcbst  0,%[uaddr];"            /* flush cache */
                "sync;"
 
                MTPID(%[pid])                   /* Restore PID and MSR */



Home | Main Index | Thread Index | Old Index