DragonFly commits List (threaded) for 2007-01
[
Date Prev][
Date Next]
[
Thread Prev][
Thread Next]
[
Date Index][
Thread Index]
cvs commit: src/sys/libkern mcount.c src/sys/machine/pc32/i386 pmap.c src/sys/machine/vkernel/platform pmap.c src/sys/vm vm_fault.c
dillon 2007/01/12 14:12:53 PST
DragonFly src repository
Modified files:
sys/libkern mcount.c
sys/machine/pc32/i386 pmap.c
sys/machine/vkernel/platform pmap.c
sys/vm vm_fault.c
Log:
Fix the recently committed (and described) page writability nerf. The real
kernel was unconditionally mapping writable pages read-only on read faults
in order to be able to take another fault on a write attempt. This was needed
for early virtual kernel support in order to set the Modify bit in the
virtualized page table, but was being applied to ALL mappings rather then
just those installed by the virtual kernel.
Now the real kernel only does this for virtual kernel mappings. Additionally,
the real kernel no longer makes the page read-only when clearing the Modify
bit in the real page table (in order to rearm the write fault). When this
case occurs VPTE_M has already been set in the virtual page table and no
re-fault is required.
The virtual kernel now only needs to invalidate the real kernel's page
mapping when clearing the virtualized Modify bit in the virtual page table
(VPTE_M), in order to rearm the real kernel's write fault so it can detect
future modifications via the virtualized Modify bit. Also, the virtual kernel
no longer needs to install read-only pages to detect the write fault. This
allows the real kernel to do ALL the work required to handle VPTE_M and
make the actual page writable. This greatly reduces the number of real
page faults that occur and greatly reduces the number of page faults which
have to be passed through to the virtual kernel.
This fix reduces fork() overhead for processes running under a virtual
kernel by 70%, from around 2100uS to around 650uS.
Revision Changes Path
1.9 +2 -0 src/sys/libkern/mcount.c
1.71 +14 -10 src/sys/machine/pc32/i386/pmap.c
1.13 +23 -15 src/sys/machine/vkernel/platform/pmap.c
1.41 +2 -1 src/sys/vm/vm_fault.c
http://www.dragonflybsd.org/cvsweb/src/sys/libkern/mcount.c.diff?r1=1.8&r2=1.9&f=u
http://www.dragonflybsd.org/cvsweb/src/sys/machine/pc32/i386/pmap.c.diff?r1=1.70&r2=1.71&f=u
http://www.dragonflybsd.org/cvsweb/src/sys/machine/vkernel/platform/pmap.c.diff?r1=1.12&r2=1.13&f=u
http://www.dragonflybsd.org/cvsweb/src/sys/vm/vm_fault.c.diff?r1=1.40&r2=1.41&f=u
[
Date Prev][
Date Next]
[
Thread Prev][
Thread Next]
[
Date Index][
Thread Index]