Re: [patch 1/7] x86 PAT: store vm_pgoff for all linear_over_vma_region mappings - v3

From: Nick Piggin
Date: Thu Dec 18 2008 - 17:33:20 EST


On Thu, Dec 18, 2008 at 02:10:57PM -0800, Pallipadi, Venkatesh wrote:
> On Thu, Dec 18, 2008 at 01:27:28PM -0800, Nick Piggin wrote:
> >
> > This is fine by me, however:
> > 1. Can you add some comments to say "this is not for core vm but for pat,
> > oh and a pgoff of zero is not going to work".
>
> OK. Will add comments about both the points.
>
> > 2. Can you please justify to me (or the changelog) roughly why PAT wants
> > to know if the mapping is linear or not? Presumably it has to handle
> > both types? If performance wasn't an issue, then you could manually scan
> > the ptes to verify (which would solve your zero-offset bug). etc.
>
> The main reason is performance. If we know it is linear, we can track the entire
> region as one block and do the reserve free for entire region. But, if it is
> not linear, then we have to reserve memtype of physical addresses page by page.
> This will not be optimal as it will result in reserve and free becoming
> slower. Almost all users that we find in kernel today (atleast in x86) are
> all linear.

OK, so it is not a bug to miss the zero pgoff case then. That's good
to know and should be added to comments.

--
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/