From John Dyson:

Fixed physio in the 386 case - write faults weren't properly implemented.
This commit is contained in:
dg 1994-04-25 23:48:20 +00:00
parent a5efe9171e
commit d9ee61523b
2 changed files with 40 additions and 6 deletions

View File

@ -38,7 +38,7 @@
*
* from: @(#)vm_machdep.c 7.3 (Berkeley) 5/13/91
* Utah $Hdr: vm_machdep.c 1.16.1.1 89/06/23$
* $Id: vm_machdep.c,v 1.19 1994/04/14 07:49:40 davidg Exp $
* $Id: vm_machdep.c,v 1.20 1994/04/20 07:06:20 davidg Exp $
*/
#include "npx.h"
@ -594,14 +594,12 @@ cldisksort(struct buf *dp, struct buf *bp, vm_offset_t maxio)
insert:
#if 0
/*
* read clustering with new read-ahead disk drives hurts mostly, so
* we don't bother...
*/
if( bp->b_flags & B_READ)
goto nocluster;
#endif
/*
* we currently only cluster I/O transfers that are at page-aligned
* kvas and transfers that are multiples of page lengths.
@ -830,6 +828,25 @@ cldisksort(struct buf *dp, struct buf *bp, vm_offset_t maxio)
bp->av_back = ap;
}
/*
* quick version of vm_fault
*/
void
vm_fault_quick( v, prot)
vm_offset_t v;
int prot;
{
if( (cpu_class == CPUCLASS_386) &&
(prot & VM_PROT_WRITE))
vm_fault(&curproc->p_vmspace->vm_map, v,
VM_PROT_READ|VM_PROT_WRITE, FALSE);
else if( prot & VM_PROT_WRITE)
*(volatile char *)v += 0;
else
*(volatile char *)v;
}
/*
* Finish a fork operation, with process p2 nearly set up.

View File

@ -38,7 +38,7 @@
*
* from: @(#)vm_machdep.c 7.3 (Berkeley) 5/13/91
* Utah $Hdr: vm_machdep.c 1.16.1.1 89/06/23$
* $Id: vm_machdep.c,v 1.19 1994/04/14 07:49:40 davidg Exp $
* $Id: vm_machdep.c,v 1.20 1994/04/20 07:06:20 davidg Exp $
*/
#include "npx.h"
@ -594,14 +594,12 @@ cldisksort(struct buf *dp, struct buf *bp, vm_offset_t maxio)
insert:
#if 0
/*
* read clustering with new read-ahead disk drives hurts mostly, so
* we don't bother...
*/
if( bp->b_flags & B_READ)
goto nocluster;
#endif
/*
* we currently only cluster I/O transfers that are at page-aligned
* kvas and transfers that are multiples of page lengths.
@ -830,6 +828,25 @@ cldisksort(struct buf *dp, struct buf *bp, vm_offset_t maxio)
bp->av_back = ap;
}
/*
* quick version of vm_fault
*/
void
vm_fault_quick( v, prot)
vm_offset_t v;
int prot;
{
if( (cpu_class == CPUCLASS_386) &&
(prot & VM_PROT_WRITE))
vm_fault(&curproc->p_vmspace->vm_map, v,
VM_PROT_READ|VM_PROT_WRITE, FALSE);
else if( prot & VM_PROT_WRITE)
*(volatile char *)v += 0;
else
*(volatile char *)v;
}
/*
* Finish a fork operation, with process p2 nearly set up.