Re: [PATCH] THP: need is_vma_temporary_stack() when reference transparent_hugepage_enabled

From: Alex Shi
Date: Wed May 02 2012 - 20:58:12 EST



> My preference would still be to remove the is_vma_temporary_stack and
> use two vmas during mremap of execve, that would remove the "vma"
> parameter from transparent_hugepage_enabled() but others prefers to
> skip a vma allocation in execve and stick to is_vma_temporary_stack,
> which is fair enough argument.


Actually, current transparent_hugepage_enabled just means the vma is in
THP enable ENV, the vma is just possibly has some large page, no grantee
really has. But in lots situations, user wants to know if a vma or a
part of memory really include a large page. not the possibility.

So, it will be great to see a real large page checking function appearing.

>
>> Oh, yes. Since is_vma_temporay_stack is just used in rmap.c and huge_memory.c
>> . is it better to move it to huge_mm.h?
>
> I guess it was cleaner on rmap.h as this is not related to THP, but
> clearly it works better in huge_mm.h (and rmap.h->mm.h->huge_mm.h is
> included automatically) so the patch looks fine to me.


Thanks for point out.
--
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/