Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-1-6]: src/sys/uvm Pull up revision 1.51 (requested by tls in tick...
details: https://anonhg.NetBSD.org/src/rev/1ffa030f3ac3
branches: netbsd-1-6
changeset: 530614:1ffa030f3ac3
user: tron <tron%NetBSD.org@localhost>
date: Tue Aug 26 06:46:59 2003 +0000
description:
Pull up revision 1.51 (requested by tls in ticket #1434):
Correct use of MAXBSIZE where MAXPHYS was intended. This is a necessary
first step towards per-device MAXPHYS, and has the beneficial side effect
of allowing clustering to MAXPHYS even on systems that need to run with
a reduced MAXBSIZE to get more metadata buffers.
diffstat:
sys/uvm/uvm_pdaemon.c | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
diffs (38 lines):
diff -r c1699025c7a4 -r 1ffa030f3ac3 sys/uvm/uvm_pdaemon.c
--- a/sys/uvm/uvm_pdaemon.c Tue Aug 26 06:46:51 2003 +0000
+++ b/sys/uvm/uvm_pdaemon.c Tue Aug 26 06:46:59 2003 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: uvm_pdaemon.c,v 1.46.4.1 2002/06/21 00:55:51 lukem Exp $ */
+/* $NetBSD: uvm_pdaemon.c,v 1.46.4.2 2003/08/26 06:46:59 tron Exp $ */
/*
* Copyright (c) 1997 Charles D. Cranor and Washington University.
@@ -71,7 +71,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uvm_pdaemon.c,v 1.46.4.1 2002/06/21 00:55:51 lukem Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uvm_pdaemon.c,v 1.46.4.2 2003/08/26 06:46:59 tron Exp $");
#include "opt_uvmhist.h"
@@ -362,7 +362,7 @@
struct vm_page *p, *nextpg;
struct uvm_object *uobj;
struct vm_anon *anon;
- struct vm_page *swpps[MAXBSIZE >> PAGE_SHIFT];
+ struct vm_page *swpps[round_page(MAXPHYS) >> PAGE_SHIFT];
struct simplelock *slock;
int swnpages, swcpages;
int swslot;
@@ -621,7 +621,9 @@
*/
if (swslot == 0) {
- swnpages = MAXBSIZE >> PAGE_SHIFT;
+ /* Even with strange MAXPHYS, the shift
+ implicitly rounds down to a page. */
+ swnpages = MAXPHYS >> PAGE_SHIFT;
swslot = uvm_swap_alloc(&swnpages, TRUE);
if (swslot == 0) {
simple_unlock(slock);
Home |
Main Index |
Thread Index |
Old Index