public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* two questions: hugetlb, how to set huge_bootmem_page->phys before gather_bootmem_prealloc()
@ 2016-08-31  8:20 Xishi Qiu
  0 siblings, 0 replies; only message in thread
From: Xishi Qiu @ 2016-08-31  8:20 UTC (permalink / raw)
  To: grygorii.strashko, santosh.shilimkar, Andrew Morton, beckyb
  Cc: Linux MM, LKML

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2016-08-31  8:27 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-08-31  8:20 two questions: hugetlb, how to set huge_bootmem_page->phys before gather_bootmem_prealloc() Xishi Qiu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox