lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 3 Jul 2012 11:29:42 +0800
From:	Jiang Liu <jiang.liu@...wei.com>
To:	Yinghai Lu <yinghai@...nel.org>
CC:	Benjamin Herrenschmidt <benh@...nel.crashing.org>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Mel Gorman <mgorman@...e.de>, Tony Luck <tony.luck@...el.com>,
	Xishi Qiu <qiuxishi@...wei.com>,
	KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>,
	KOSAKI Motohiro <kosaki.motohiro@...fujitsu.com>,
	David Rientjes <rientjes@...gle.com>,
	Minchan Kim <minchan@...nel.org>,
	Keping Chen <chenkeping@...wei.com>, <linux-mm@...ck.org>,
	<stable@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
	Jiang Liu <liuj97@...il.com>,
	David Gibson <david@...son.dropbear.id.au>,
	<linuxppc-dev@...ts.ozlabs.org>
Subject: Re: [PATCH] mm: setup pageblock_order before it's used by sparse

>> Hi Yinghai,
>>
>> I'm afraid the v2 will break powerpc. Currently only IA64 and PowerPC
>> supports variable hugetlb size.
>>
>> HPAGE_SHIFT is a variable default to 0 on powerpc. But seems PowerPC
>> is doing something wrong here, according to it's mm initialization
>> sequence as below:
>> start_kernel()
>>         setup_arch()
>>                 paging_init()
>>                         free_area_init_node()
>>                                 set_pageblock_order()
>>                                         refer to HPAGE_SHIFT (still 0)
>>         init_rest()
>>                 do_initcalls()
>>                         hugetlbpage_init()
>>                                 setup HPAGE_SHIFT
>> That means pageblock_order is always set to "MAX_ORDER - 1", not sure
>> whether this is intended. And it has the same issue as IA64 of wasting
>> memory if CONFIG_SPARSE is enabled.
> 
> adding BenH, need to know if it is powerpc intended.
> 
>>
>> So it would be better to keep function set_pageblock_order(), it will
>> fix the memory wasting on both IA64 and PowerPC.
> 
> Should setup pageblock_order as early as possible to avoid confusing.
OK, waiting response from PPC. If we could find some ways to set HPAGE_SIZE
early on PPC too, we can setup pageblock_order in arch instead of page_alloc.c
as early as possible.

Thanks!
Gerry

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ