Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/sparc64 Increase maximum MSGBUFSIZE to 248k.
details: https://anonhg.NetBSD.org/src/rev/96267e59d97b
branches: trunk
changeset: 330465:96267e59d97b
user: jdc <jdc%NetBSD.org@localhost>
date: Thu Jul 10 06:24:02 2014 +0000
description:
Increase maximum MSGBUFSIZE to 248k.
While here, remove 2 sparc(32)-only entries (from mrg@).
diffstat:
sys/arch/sparc64/include/param.h | 17 +++++++++++------
sys/arch/sparc64/sparc64/pmap.c | 7 +++----
2 files changed, 14 insertions(+), 10 deletions(-)
diffs (69 lines):
diff -r cdc40d23225e -r 96267e59d97b sys/arch/sparc64/include/param.h
--- a/sys/arch/sparc64/include/param.h Thu Jul 10 06:02:40 2014 +0000
+++ b/sys/arch/sparc64/include/param.h Thu Jul 10 06:24:02 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: param.h,v 1.53 2014/02/21 18:00:09 palle Exp $ */
+/* $NetBSD: param.h,v 1.54 2014/07/10 06:24:02 jdc Exp $ */
/*
* Copyright (c) 1992, 1993
@@ -168,13 +168,12 @@
#define _MAXNBPG 8192 /* fixed VAs, independent of actual NBPG */
-#define AUXREG_VA ( KERNEND + _MAXNBPG) /* 1 page REDZONE */
-#define TMPMAP_VA ( AUXREG_VA + _MAXNBPG)
-#define MSGBUF_VA ( TMPMAP_VA + _MAXNBPG)
+#define MSGBUF_VA ( KERNEND + _MAXNBPG) /* 1 page REDZONE */
/*
+ * Maximum message buffer size is 248k.
* Here's the location of the interrupt stack and CPU structure.
*/
-#define INTSTACK ( KERNEND + 8*_MAXNBPG)
+#define INTSTACK ( KERNEND + 32*_MAXNBPG)
#define EINTSTACK ( INTSTACK + 4*_MAXNBPG)
#define CPUINFO_VA ( EINTSTACK )
#define PANICSTACK ( INTSTACK + 8*_MAXNBPG)
@@ -197,7 +196,13 @@
#define MCLBYTES (1 << MCLSHIFT) /* size of a m_buf cluster */
-#define MSGBUFSIZE NBPG
+#if !defined (MSGBUFSIZE) /* options MSGBUFSIZE=integer */
+#define MSGBUFSIZE 4 * NBPG
+#else
+#if INTSTACK - MSGBUF_VA - MSGBUFSIZE < 0
+#error MSGBUFSIZE is too large
+#endif
+#endif
/*
* Minimum size of the kernel kmem_arena in PAGE_SIZE-sized
diff -r cdc40d23225e -r 96267e59d97b sys/arch/sparc64/sparc64/pmap.c
--- a/sys/arch/sparc64/sparc64/pmap.c Thu Jul 10 06:02:40 2014 +0000
+++ b/sys/arch/sparc64/sparc64/pmap.c Thu Jul 10 06:24:02 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pmap.c,v 1.288 2014/06/05 19:47:24 palle Exp $ */
+/* $NetBSD: pmap.c,v 1.289 2014/07/10 06:24:02 jdc Exp $ */
/*
*
* Copyright (C) 1996-1999 Eduardo Horvath.
@@ -26,7 +26,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.288 2014/06/05 19:47:24 palle Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.289 2014/07/10 06:24:02 jdc Exp $");
#undef NO_VCACHE /* Don't forget the locked TLB in dostart */
#define HWREF
@@ -742,8 +742,7 @@
* Get hold or the message buffer.
*/
msgbufp = (struct kern_msgbuf *)(vaddr_t)MSGBUF_VA;
-/* XXXXX -- increase msgbufsiz for uvmhist printing */
- msgbufsiz = 4*PAGE_SIZE /* round_page(sizeof(struct msgbuf)) */;
+ msgbufsiz = MSGBUFSIZE;
BDPRINTF(PDB_BOOT, ("Trying to allocate msgbuf at %lx, size %lx\n",
(long)msgbufp, (long)msgbufsiz));
if ((long)msgbufp !=
Home |
Main Index |
Thread Index |
Old Index