linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Xishi Qiu <qiuxishi@huawei.com>
To: grygorii.strashko@ti.com, santosh.shilimkar@ti.com,
	Andrew Morton <akpm@linux-foundation.org>,
	beckyb@kernel.crashing.org
Cc: Linux MM <linux-mm@kvack.org>, LKML <linux-kernel@vger.kernel.org>
Subject: two questions: hugetlb, how to set huge_bootmem_page->phys before gather_bootmem_prealloc()
Date: Wed, 31 Aug 2016 16:20:14 +0800	[thread overview]
Message-ID: <57C6933E.2090907@huawei.com> (raw)

If the system is 32 bit, usually we will have a highmem zone.

I find gather_bootmem_prealloc() will free the huge_bootmem_page and
then prep the new huge page in CONFIG_HIGHMEM.

But alloc_bootmem_huge_page() we will use the beginning of the huge page
to store the huge_bootmem_page struct, so how to set huge_bootmem_page->phys?

commit(ee8f248d266ec6966c0ce6b7dec24de43dcc1b58) add phys addr to struct
huge_bootmem_page


Another question, commit(8b89a1169437541a2a9b62c8f7b1a5c0ceb0fbde)
update the interface, and the following code actually fix a bug too, right?

We should use phys instead of virt when calling free_bootmem_late(),
But it has not reported to stable.

-               free_bootmem_late((unsigned long)m,
-                                 sizeof(struct huge_bootmem_page));
+               memblock_free_late(__pa(m),
+                                  sizeof(struct huge_bootmem_page));


Thanks,
Xishi Qiu

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

                 reply	other threads:[~2016-08-31  8:28 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=57C6933E.2090907@huawei.com \
    --to=qiuxishi@huawei.com \
    --cc=akpm@linux-foundation.org \
    --cc=beckyb@kernel.crashing.org \
    --cc=grygorii.strashko@ti.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=santosh.shilimkar@ti.com \
    /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