Subject: Re: [PATCH 3/4] hugetlb: Change the function prototype to take vma_area_struct as arg

From: "Aneesh Kumar K.V" <[email-masked]>
Date: Fri, 11 Nov 2016 07:08:50 +0530

Benjamin Herrenschmidt <[email-masked]> writes:

> On Thu, 2016-11-10 at 14:59 +0530, Aneesh Kumar K.V wrote:
>> This help us to find the hugetlb page size which we need ot use on some
>> archs like ppc64 for tlbflush. This also make the interface consistent
>> with other hugetlb functions
>
> What about my requested simpler approach ?

Still working on the changes.

>
> For normal (non-huge) pages, we already know the size.
>
> For huge pages, can't we encode in the top SW bits of the PTE the
> page size that we obtain from set_pte_at ?
>
> That would be a lot less churn and avoid touching all these archs...
> especially since the current DD1 workaround is horrible and I want
> the fix to be backported, so something simpler and contained in
> arch/powerpc feels more suitable.
>

My take as of now is even though the modification lines will be less, it
is going to be much more difficult to follow and backport. I will try to
do a patch to show the complexity and we can decide which approach is
simpler.

-aneesh