[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20121026135750.GA16598@otc-wbsnb-06>
Date: Fri, 26 Oct 2012 16:57:50 +0300
From: "Kirill A. Shutemov" <kirill.shutemov@...ux.intel.com>
To: Peter Zijlstra <peterz@...radead.org>
Cc: linux-mm@...ck.org, Will Deacon <will.deacon@....com>,
Andrew Morton <akpm@...ux-foundation.org>,
Andrea Arcangeli <aarcange@...hat.com>,
Xiao Guangrong <xiaoguangrong@...ux.vnet.ibm.com>,
Ingo Molnar <mingo@...e.hu>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/2] numa, mm: drop redundant check in
do_huge_pmd_numa_page()
On Fri, Oct 26, 2012 at 03:43:12PM +0200, Peter Zijlstra wrote:
> On Fri, 2012-10-26 at 16:41 +0300, Kirill A. Shutemov wrote:
> > On Fri, Oct 26, 2012 at 03:08:05PM +0200, Peter Zijlstra wrote:
> > > On Fri, 2012-10-26 at 15:54 +0300, Kirill A. Shutemov wrote:
> > > > From: "Kirill A. Shutemov" <kirill.shutemov@...ux.intel.com>
> > > >
> > > > We check if the pmd entry is the same as on pmd_trans_huge() in
> > > > handle_mm_fault(). That's enough.
> > > >
> > > > Signed-off-by: Kirill A. Shutemov <kirill.shutemov@...ux.intel.com>
> > >
> > > Ah indeed, Will mentioned something like this on IRC as well, I hadn't
> > > gotten around to looking at it -- now have, thanks!
> > >
> > > Acked-by: Peter Zijlstra <a.p.zijlstra@...llo.nl>
> > >
> > > That said, where in handle_mm_fault() do we wait for a split to
> > > complete? We have a pmd_trans_huge() && !pmd_trans_splitting(), so a
> > > fault on a currently splitting pmd will fall through.
> > >
> > > Is it the return from the fault on unlikely(pmd_trans_huge()) ?
> >
> > Yes, this code will catch it:
> >
> > /* if an huge pmd materialized from under us just retry later */
> > if (unlikely(pmd_trans_huge(*pmd)))
> > return 0;
> >
> > If the pmd is under splitting it's still a pmd_trans_huge().
>
> OK, so then we simply keep taking the same fault until the split is
> complete? Wouldn't it be better to wait for it instead of spin on
> faults?
IIUC, on next fault we will wait split the page in fallow_page().
--
Kirill A. Shutemov
Download attachment "signature.asc" of type "application/pgp-signature" (837 bytes)
Powered by blists - more mailing lists