Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 3 Jun 2010 11:58:43 +0530
From:      "C. Jayachandran" <c.jayachandran@gmail.com>
To:        Alan Cox <alc@imimic.com>
Cc:        Alan Cox <alc@cs.rice.edu>, mips@freebsd.org
Subject:   Re: init_pte_prot() patch
Message-ID:  <AANLkTikgjoYtZPOUEK2x6aWk-pXTgMlA3txFob25AL6r@mail.gmail.com>
In-Reply-To: <4C0736A5.1010101@imimic.com>
References:  <4C0736A5.1010101@imimic.com>

index | next in thread | previous in thread | raw e-mail

On Thu, Jun 3, 2010 at 10:29 AM, Alan Cox <alc@imimic.com> wrote:
> I would appreciate it if someone would test the attached patch.  (A
> "buildworld" would probably suffice.)  Essentially, it does two things:
>
> 1. The virtual memory system only cares about the contents of a page's dirty
> field if that page is managed (i.e., it is pageable).  And, in fact, if you
> survey the calls to vm_page_dirty() in the MIPS or any other pmap, they are
> generally conditioned on the mapping having been for a managed page.
>
> The MIPS pmap_enter() is an exception to this rule.  It is unconditionally
> calling vm_page_dirty() on any page mapped within the kernel address space,
> managed or otherwise.  In fact, it is highly unusual for pmap_enter() to be
> calling vm_page_dirty() on the page being mapped, regardless of whether it
> is managed.  This call to vm_page_dirty() shouldn't be needed if change #2
> below is also made.  The attached patch eliminates the call.
>
> 2. Since the virtual memory system only cares about the contents of a page's
> dirty field if that page is managed, then dirty bit emulation need only be
> performed on managed pages.  At present, init_pte_prot() skips emulation if
> the address being mapped is in the kernel.  However, this is not really the
> right condition to test for.  There do exist some managed pages in the
> kernel address space, and it is also possible through System V shared memory
> to have unmanaged pages in the user address space.  The attached patch bases
> the emulation decision on whether the page is managed.

I have added this patch to my buildworld test (make -j128 buildworld
on a 8-core MIPS SoC) and it seems to be holding up.  It will take a
few hours to run over NFS - will update if I get anything.

JC.


help

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?AANLkTikgjoYtZPOUEK2x6aWk-pXTgMlA3txFob25AL6r>