linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mm: Disable DEFERRED_STRUCT_PAGE_INIT on !NO_BOOTMEM
@ 2016-04-14  2:49 Gavin Shan
  2016-04-14 10:52 ` Mel Gorman
  0 siblings, 1 reply; 2+ messages in thread
From: Gavin Shan @ 2016-04-14  2:49 UTC (permalink / raw)
  To: linux-mm; +Cc: mgorman, zhlcindy, aneesh.kumar, Gavin Shan

When we have !NO_BOOTMEM, the deferred page struct initialization
doesn't work well because the pages reserved in bootmem are released
to the page allocator uncoditionally. It causes memory corruption
and system crash eventually.

As Mel suggested, the bootmem is retiring slowly. We fix the issue
by simply hiding DEFERRED_STRUCT_PAGE_INIT when bootmem is enabled.

Signed-off-by: Gavin Shan <gwshan@linux.vnet.ibm.com>
---
 mm/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mm/Kconfig b/mm/Kconfig
index 989f8f3..646cf9f 100644
--- a/mm/Kconfig
+++ b/mm/Kconfig
@@ -626,7 +626,7 @@ config DEFERRED_STRUCT_PAGE_INIT
 	bool "Defer initialisation of struct pages to kthreads"
 	default n
 	depends on ARCH_SUPPORTS_DEFERRED_STRUCT_PAGE_INIT
-	depends on MEMORY_HOTPLUG
+	depends on NO_BOOTMEM && MEMORY_HOTPLUG
 	help
 	  Ordinarily all struct pages are initialised during early boot in a
 	  single thread. On very large machines this can take a considerable
-- 
2.1.0

--
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>

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] mm: Disable DEFERRED_STRUCT_PAGE_INIT on !NO_BOOTMEM
  2016-04-14  2:49 [PATCH] mm: Disable DEFERRED_STRUCT_PAGE_INIT on !NO_BOOTMEM Gavin Shan
@ 2016-04-14 10:52 ` Mel Gorman
  0 siblings, 0 replies; 2+ messages in thread
From: Mel Gorman @ 2016-04-14 10:52 UTC (permalink / raw)
  To: Gavin Shan; +Cc: linux-mm, zhlcindy, aneesh.kumar

On Thu, Apr 14, 2016 at 12:49:30PM +1000, Gavin Shan wrote:
> When we have !NO_BOOTMEM, the deferred page struct initialization
> doesn't work well because the pages reserved in bootmem are released
> to the page allocator uncoditionally. It causes memory corruption
> and system crash eventually.
> 
> As Mel suggested, the bootmem is retiring slowly. We fix the issue
> by simply hiding DEFERRED_STRUCT_PAGE_INIT when bootmem is enabled.
> 
> Signed-off-by: Gavin Shan <gwshan@linux.vnet.ibm.com>

Acked-by: Mel Gorman <mgorman@suse.de>

-- 
Mel Gorman
SUSE Labs

--
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>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-04-14 10:52 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-04-14  2:49 [PATCH] mm: Disable DEFERRED_STRUCT_PAGE_INIT on !NO_BOOTMEM Gavin Shan
2016-04-14 10:52 ` Mel Gorman

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).