[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1296768812.8299.1644.camel@nimitz>
Date: Thu, 03 Feb 2011 13:33:32 -0800
From: Dave Hansen <dave@...ux.vnet.ibm.com>
To: David Rientjes <rientjes@...gle.com>
Cc: linux-kernel@...r.kernel.org, linux-mm@...ck.org,
Michael J Wolf <mjwolf@...ibm.com>,
Andrea Arcangeli <aarcange@...hat.com>
Subject: Re: [RFC][PATCH 2/6] pagewalk: only split huge pages when necessary
On Thu, 2011-02-03 at 13:22 -0800, David Rientjes wrote:
> > diff -puN mm/pagewalk.c~pagewalk-dont-always-split-thp mm/pagewalk.c
> > --- linux-2.6.git/mm/pagewalk.c~pagewalk-dont-always-split-thp 2011-01-27 10:57:02.309914973 -0800
> > +++ linux-2.6.git-dave/mm/pagewalk.c 2011-01-27 10:57:02.317914965 -0800
> > @@ -33,19 +33,35 @@ static int walk_pmd_range(pud_t *pud, un
> >
> > pmd = pmd_offset(pud, addr);
> > do {
> > + again:
>
> checkpatch will warn about the indent.
>
> > next = pmd_addr_end(addr, end);
> > - split_huge_page_pmd(walk->mm, pmd);
> > - if (pmd_none_or_clear_bad(pmd)) {
> > + if (pmd_none(*pmd)) {
>
> Not sure why this has been changed from pmd_none_or_clear_bad(), that's
> been done even prior to THP.
The bad check will trigger on huge pmds. We can not use it here. We
can, however, use pmd_none(). The bad check was moved below to where we
actually dereference the pmd.
> > if (walk->pte_hole)
> > err = walk->pte_hole(addr, next, walk);
> > if (err)
> > break;
> > continue;
> > }
> > + /*
> > + * This implies that each ->pmd_entry() handler
> > + * needs to know about pmd_trans_huge() pmds
> > + */
>
> Probably needs to be documented somewhere for users of pagewalk?
Probably, but we don't currently have any central documentation for it.
Guess we could make some, or just ensure that all the users got updated.
Any ideas where to put it other than the mm_walk struct?
-- Dave
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists