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
| ||
|
Date: Wed, 25 Apr 2007 11:00:58 +0900 From: Yasunori Goto <y-goto@...fujitsu.com> To: Mel Gorman <mel@....ul.ie> Cc: akpm@...ux-foundation.org, linux-kernel@...r.kernel.org, linux-mm@...ck.org, apw@...dowen.org, kamezawa.hiroyu@...fujitsu.com Subject: Re: [PATCH 2/2] Align ZONE_MOVABLE to a MAX_ORDER_NR_PAGES boundary Looks good. :-) Thanks. Acked-by: Yasunori Goto <y-goto@...fujitsu.com> > > The boot memory allocator makes assumptions on the alignment of zone > boundaries even though the buddy allocator has no requirements on the > alignment of zones. This may cause boot problems in situations where > ZONE_MOVABLE is populated because the bootmem allocator assumes zones are > at least order-log2(BITS_PER_LONG) aligned. As the two potential users > (huge pages and memory hot-remove) of ZONE_MOVABLE would prefer a higher > alignment, this patch aligns the start of the zone instead of fixing the > different assumptions made by the bootmem allocator. > > This patch rounds the start of ZONE_MOVABLE in each node to a > MAX_ORDER_NR_PAGES boundary. If the rounding pushes the start of ZONE_MOVABLE > above the end of the node then the zone will contain no memory and will not > be used at runtime. The value is rounded up instead of down as it is > better to have the kernel-portion of memory larger than requested instead > of smaller. The impact is that the kernel-usable portion of memory because a > minimum guarantee instead of the exact size requested by the user. > > > Signed-off-by: Mel Gorman <mel@....ul.ie> > Acked-by: Andy Whitcroft <apw@...dowen.org> > --- > > page_alloc.c | 5 +++++ > 1 files changed, 5 insertions(+) > > diff -rup -X /usr/src/patchset-0.6/bin//dontdiff linux-2.6.21-rc6-mm1-002_commonparse/mm/page_alloc.c linux-2.6.21-rc6-mm1-003_alignmovable/mm/page_alloc.c > --- linux-2.6.21-rc6-mm1-002_commonparse/mm/page_alloc.c 2007-04-24 09:38:30.000000000 +0100 > +++ linux-2.6.21-rc6-mm1-003_alignmovable/mm/page_alloc.c 2007-04-24 11:15:40.000000000 +0100 > @@ -3642,6 +3642,11 @@ restart: > usable_nodes--; > if (usable_nodes && required_kernelcore > usable_nodes) > goto restart; > + > + /* Align start of ZONE_MOVABLE on all nids to MAX_ORDER_NR_PAGES */ > + for (nid = 0; nid < MAX_NUMNODES; nid++) > + zone_movable_pfn[nid] = > + roundup(zone_movable_pfn[nid], MAX_ORDER_NR_PAGES); > } > > /** -- Yasunori Goto - 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