Subject: Re: kern/36019 (uvm_readahead.c:ra_startio() assumes (MAXPHYS & (MAXPHYS
To: None <yamt@NetBSD.org, gnats-admin@netbsd.org, netbsd-bugs@netbsd.org,>
From: Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>
List: netbsd-bugs
Date: 05/09/2007 23:35:01
The following reply was made to PR kern/36019; it has been noted by GNATS.
From: Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>
To: gnats-bugs@NetBSD.org
Cc: yamt@NetBSD.org, kern-bug-people@NetBSD.org,
netbsd-bugs@NetBSD.org, gnats-admin@NetBSD.org, yamt@NetBSD.org,
tsutsui@ceres.dti.ne.jp
Subject: Re: kern/36019 (uvm_readahead.c:ra_startio() assumes (MAXPHYS & (MAXPHYS
- 1)) == 0)
Date: Thu, 10 May 2007 08:34:16 +0900
yamt@NetBSD.org wrote:
> Synopsis: uvm_readahead.c:ra_startio() assumes (MAXPHYS & (MAXPHYS - 1)) == 0
:
> Responsible-Changed-Why:
> mine.
Is it okay to commit this as temporary workaround (for 4.0)?
---
Index: uvm_readahead.c
===================================================================
RCS file: /cvsroot/src/sys/uvm/uvm_readahead.c,v
retrieving revision 1.3
diff -u -r1.3 uvm_readahead.c
--- uvm_readahead.c 12 Mar 2007 18:18:39 -0000 1.3
+++ uvm_readahead.c 9 May 2007 23:24:23 -0000
@@ -66,6 +66,12 @@
off_t ra_next; /* next offset to read-ahead */
};
+#if defined(sun2) || (defined(sun3) && defined(_SUN3_))
+/* XXX: on sun2 and sun3 (but not sun3x) MAXPHYS is 0xe000 */
+#undef MAXPHYS
+#define MAXPHYS 0x8000 /* XXX */
+#endif
+
#define RA_WINSIZE_INIT MAXPHYS /* initial window size */
#define RA_WINSIZE_MAX (MAXPHYS * 8) /* max window size */
#define RA_WINSIZE_SEQENTIAL RA_WINSIZE_MAX /* fixed window size used for
---
Izumi Tsutsui