Re: [RFC][PATCH 2/6] pagewalk: only split huge pages when necessary

From: Dave Hansen
Date: Fri Feb 04 2011 - 12:19:24 EST


On Thu, 2011-02-03 at 13:46 -0800, David Rientjes wrote:
> > 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?
>
> I think noting it where struct mm_walk is declared would be best (just a
> "/* must handle pmd_trans_huge() */" would be sufficient) although
> eventually it might be cleaner to add a ->pmd_huge_entry().

For code maintenance, I really like _not_ hiding this in the API
somewhere. This way, we have a great, self-explanatory tag wherever
code (possibly) hasn't properly dealt with THPs. We get a nice,
greppable, cscope'able:

split_huge_page_pmd()

wherever we need to "teach" the code about THP.

It's kinda like the BKL. :)

-- Dave

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/