Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/powerpc/include Reduce UPAGES from 2 to 1 for ibm4x...



details:   https://anonhg.NetBSD.org/src/rev/f31bc90932c8
branches:  trunk
changeset: 745018:f31bc90932c8
user:      rin <rin%NetBSD.org@localhost>
date:      Fri Feb 21 12:56:37 2020 +0000

description:
Reduce UPAGES from 2 to 1 for ibm4xx, which was originally 1 and bumped
to 2 in rev 1.29:

    http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/arch/powerpc/include/param.h#rev1.29

Since page size is 16KB on ibm4xx, USPACE is still 16KB, which is the
same size as on other powerpc processors.

This avoids kernel crash described in PR kern/54994. Also, even if the
PR is resolved, fork(2) easily fails with ENOMEM if UPAGES is 2, which
requires physically contiguous pages for u-area. No bad side effect is
observed as far as I can see.

XXX
Even with this commit, kern/54994 still critically affects other archs
with __HAVE_CPU_UAREA_ROUTINES, i.e., alpha, mips, powerpc/{oea,booke},
and riscv.

diffstat:

 sys/arch/powerpc/include/param.h |  4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diffs (18 lines):

diff -r 9a3ef98afdc2 -r f31bc90932c8 sys/arch/powerpc/include/param.h
--- a/sys/arch/powerpc/include/param.h  Fri Feb 21 12:41:29 2020 +0000
+++ b/sys/arch/powerpc/include/param.h  Fri Feb 21 12:56:37 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: param.h,v 1.31 2019/01/07 22:00:32 jdolecek Exp $      */
+/*     $NetBSD: param.h,v 1.32 2020/02/21 12:56:37 rin Exp $   */
 
 /*-
  * Copyright (C) 1995, 1996 Wolfgang Solfrank.
@@ -67,7 +67,7 @@
 
 #ifdef PPC_IBM4XX
 #define        PGSHIFT         14      /* Use 16KB to reduce TLB thrashing */
-#define        UPAGES          2
+#define        UPAGES          1
 #else
 #define        PGSHIFT         12
 #define        UPAGES          4



Home | Main Index | Thread Index | Old Index