linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Michal Hocko <mhocko@kernel.org>
To: Mike Kravetz <mike.kravetz@oracle.com>
Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org,
	"Aneesh Kumar K . V" <aneesh.kumar@linux.vnet.ibm.com>,
	Michael Ellerman <mpe@ellerman.id.au>,
	Benjamin Herrenschmidt <benh@kernel.crashing.org>,
	Cannon Matthews <cannonmatthews@google.com>,
	Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [PATCH] mm/hugetlb: remove gigantic page support for HIGHMEM
Date: Thu, 12 Jul 2018 09:47:16 +0200	[thread overview]
Message-ID: <20180712074716.GA32648@dhcp22.suse.cz> (raw)
In-Reply-To: <20180711195913.1294-1-mike.kravetz@oracle.com>

On Wed 11-07-18 12:59:13, Mike Kravetz wrote:
> This reverts commit ee8f248d266e ("hugetlb: add phys addr to struct
> huge_bootmem_page")
> 
> At one time powerpc used this field and supporting code. However that
> was removed with commit 79cc38ded1e1 ("powerpc/mm/hugetlb: Add support
> for reserving gigantic huge pages via kernel command line").
> 
> There are no users of this field and supporting code, so remove it.
> 
> Signed-off-by: Mike Kravetz <mike.kravetz@oracle.com>

Acked-by: Michal Hocko <mhocko@suse.com>

> ---
>  include/linux/hugetlb.h | 3 ---
>  mm/hugetlb.c            | 9 +--------
>  2 files changed, 1 insertion(+), 11 deletions(-)
> 
> diff --git a/include/linux/hugetlb.h b/include/linux/hugetlb.h
> index 36fa6a2a82e3..c39d9170a8a0 100644
> --- a/include/linux/hugetlb.h
> +++ b/include/linux/hugetlb.h
> @@ -348,9 +348,6 @@ struct hstate {
>  struct huge_bootmem_page {
>  	struct list_head list;
>  	struct hstate *hstate;
> -#ifdef CONFIG_HIGHMEM
> -	phys_addr_t phys;
> -#endif
>  };
>  
>  struct page *alloc_huge_page(struct vm_area_struct *vma,
> diff --git a/mm/hugetlb.c b/mm/hugetlb.c
> index 430be42b6ca1..e39593df050b 100644
> --- a/mm/hugetlb.c
> +++ b/mm/hugetlb.c
> @@ -2139,16 +2139,9 @@ static void __init gather_bootmem_prealloc(void)
>  	struct huge_bootmem_page *m;
>  
>  	list_for_each_entry(m, &huge_boot_pages, list) {
> +		struct page *page = virt_to_page(m);
>  		struct hstate *h = m->hstate;
> -		struct page *page;
>  
> -#ifdef CONFIG_HIGHMEM
> -		page = pfn_to_page(m->phys >> PAGE_SHIFT);
> -		memblock_free_late(__pa(m),
> -				   sizeof(struct huge_bootmem_page));
> -#else
> -		page = virt_to_page(m);
> -#endif
>  		WARN_ON(page_count(page) != 1);
>  		prep_compound_huge_page(page, h->order);
>  		WARN_ON(PageReserved(page));
> -- 
> 2.17.1

-- 
Michal Hocko
SUSE Labs

      parent reply	other threads:[~2018-07-12  7:47 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-11 19:59 [PATCH] mm/hugetlb: remove gigantic page support for HIGHMEM Mike Kravetz
2018-07-11 20:57 ` Davidlohr Bueso
2018-07-11 21:36   ` Mike Kravetz
2018-07-12  7:47 ` Michal Hocko [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180712074716.GA32648@dhcp22.suse.cz \
    --to=mhocko@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=aneesh.kumar@linux.vnet.ibm.com \
    --cc=benh@kernel.crashing.org \
    --cc=cannonmatthews@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mike.kravetz@oracle.com \
    --cc=mpe@ellerman.id.au \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).