diff options
| author | Alan Cox <alc@FreeBSD.org> | 2018-10-27 17:49:46 +0000 |
|---|---|---|
| committer | Alan Cox <alc@FreeBSD.org> | 2018-10-27 17:49:46 +0000 |
| commit | 9f1abe3df44028fcf378c839825e2b70703e87e8 (patch) | |
| tree | f0af84000816484f35b77f2c92fee259afcec77c /sys | |
| parent | b25a469f94c39badfb17aba2cd33a388a4b12aaf (diff) | |
Notes
Diffstat (limited to 'sys')
| -rw-r--r-- | sys/vm/vm_fault.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/sys/vm/vm_fault.c b/sys/vm/vm_fault.c index c56e51f3dbfe..e095ccc69edf 100644 --- a/sys/vm/vm_fault.c +++ b/sys/vm/vm_fault.c @@ -1181,6 +1181,16 @@ readrest: */ vm_object_pip_wakeup(fs.object); VM_OBJECT_WUNLOCK(fs.object); + + /* + * We only try to prefault read-only mappings to the + * neighboring pages when this copy-on-write fault is + * a hard fault. In other cases, trying to prefault + * is typically wasted effort. + */ + if (faultcount == 0) + faultcount = 1; + /* * Only use the new page below... */ |
