Re: [PATCH] hugetlb: call arch_prepare_hugepage() for surplus pages

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wednesday 06 August 2008 01:29, Gerald Schaefer wrote:
> From: Gerald Schaefer <gerald.schaefer@xxxxxxxxxx>
>
> The s390 software large page emulation implements shared page tables
> by using page->index of the first tail page from a compound large page
> to store page table information. This is set up in arch_prepare_hugepage(),
> which is called from alloc_fresh_huge_page_node().
>
> A similar call to arch_prepare_hugepage() is missing for surplus large
> pages that are allocated in alloc_buddy_huge_page(), which breaks the
> software emulation mode for (surplus) large pages on s390. This patch
> adds the missing call to arch_prepare_hugepage(). It will have no effect
> on other architectures where arch_prepare_hugepage() is a nop.
>
> Acked-by: Martin Schwidefsky <schwidefsky@xxxxxxxxxx>
> Signed-off-by: Gerald Schaefer <gerald.schaefer@xxxxxxxxxx>
> ---
>
>  mm/hugetlb.c |    7 ++++++-
>  1 file changed, 6 insertions(+), 1 deletion(-)
>
> Index: linux/mm/hugetlb.c
> ===================================================================
> --- linux.orig/mm/hugetlb.c
> +++ linux/mm/hugetlb.c
> @@ -565,7 +565,7 @@ static struct page *alloc_fresh_huge_pag
>  		huge_page_order(h));
>  	if (page) {
>  		if (arch_prepare_hugepage(page)) {
> -			__free_pages(page, HUGETLB_PAGE_ORDER);
> +			__free_pages(page, huge_page_order(h));
>  			return NULL;
>  		}
>  		prep_new_huge_page(h, page, nid);

This looks like a seperate bugfix?


> @@ -665,6 +665,11 @@ static struct page *alloc_buddy_huge_pag
>  					__GFP_REPEAT|__GFP_NOWARN,
>  					huge_page_order(h));
>
> +	if (page && arch_prepare_hugepage(page)) {
> +		__free_pages(page, huge_page_order(h));
> +		return NULL;
> +	}
> +
>  	spin_lock(&hugetlb_lock);
>  	if (page) {
>  		/*

Acked-by: Nick Piggin <npiggin@xxxxxxx>
--
To unsubscribe from this list: send the line "unsubscribe linux-s390" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Kernel Development]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Info]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Linux Media]     [Device Mapper]

  Powered by Linux