PERFORCE change 115881 for review
Alan Cox
alc at cs.rice.edu
Thu Mar 15 17:31:57 UTC 2007
Oleksandr Tymoshenko wrote:
>http://perforce.freebsd.org/chv.cgi?CH=115881
>
>Change 115881 by gonzo at gonzo_jeeves on 2007/03/14 20:56:39
>
> o vm_fault_prefault calls pmap_enter with corespondent entry
> protection, so if we're prefaulting R/W region with COW
> all pages except faulting one are mapped with R/W permissions i
> and therefore fail to perform COW operation. This issue is to
> be investigated, meanwhile work it around with disabling prefault
> for MIPS at all.
> o Some spellchecking stuff.
>
>Affected files ...
>
>.. //depot/projects/mips2/src/sys/mips/mips/pmap.c#21 edit
>
>Differences ...
>
>==== //depot/projects/mips2/src/sys/mips/mips/pmap.c#21 (text+ko) ====
>
>@@ -1657,18 +1657,17 @@
> /*
> * pmap_is_prefaultable:
> *
>- * Return whether or not the specified virtual address is elgible
>+ * Return whether or not the specified virtual address is eligible
> * for prefault.
> */
> boolean_t
> pmap_is_prefaultable(pmap_t pmap, vm_offset_t va)
> {
>- pt_entry_t *pte;
>-
>- pte = pmap_pte(pmap, va);
>- if (pte_valid(pte))
>- return (FALSE);
>- return (TRUE);
>+ /*
>+ * XXX: prefault causes bugs with COW, so let's stick
>+ * with all pages not eligible to prefault.
>+ */
>+ return (FALSE);
> }
>
> /*
>
>
vm_fault_prefault() calls pmap_enter_quick(), not pmap_enter().
However, some implementations of pmap_enter_quick() are little more than
a call to pmap_enter(). These implementations remove write access from
the allowed access permissions. The sparc64 implementation below is
representative:
void
pmap_enter_quick(pmap_t pm, vm_offset_t va, vm_page_t m, vm_prot_t prot)
{
PMAP_LOCK(pm);
pmap_enter_locked(pm, va, m, prot & (VM_PROT_READ | VM_PROT_EXECUTE),
FALSE);
PMAP_UNLOCK(pm);
}
Regards,
Alan
More information about the p4-projects
mailing list