aboutsummaryrefslogtreecommitdiffstats
path: root/mm
diff options
context:
space:
mode:
authorAndy Whitcroft <apw@shadowen.org>2005-07-27 14:44:02 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2005-07-27 19:25:54 -0400
commit12b1c5f382194d3f656e78fb5c9c8f2bfbe8ed8a (patch)
tree052ec39f86482f4623531b247131aed93b6fb345 /mm
parent165cd40235732644b1856a5ed5e158c9b93f6010 (diff)
[PATCH] Remove bogus warning in page_alloc.c
Originally __free_pages_bulk used the relative page number within a zone to define its buddies. This meant that to maintain the "maximally aligned" requirements (that an allocation of size N will be aligned at least to N physically) zones had to also be aligned to 1<<MAX_ORDER pages. When __free_pages_bulk was updated to use the relative page frame numbers of the free'd pages to pair buddies this released the alignment constraint on the 'left' edge of the zone. This allows _either_ edge of the zone to contain partial MAX_ORDER sized buddies. These simply never will have matching buddies and thus will never make it to the 'top' of the pyramid. The patch below removes a now redundant check ensuring that the mem_map was aligned to MAX_ORDER. Signed-off-by: Andy Whitcroft <apw@shadowen.org> Cc: Christoph Lameter <christoph@lameter.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'mm')
-rw-r--r--mm/page_alloc.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index 1d6ba6a4b594..42bccfb8464d 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -1861,7 +1861,6 @@ static void __init free_area_init_core(struct pglist_data *pgdat,
1861 unsigned long *zones_size, unsigned long *zholes_size) 1861 unsigned long *zones_size, unsigned long *zholes_size)
1862{ 1862{
1863 unsigned long i, j; 1863 unsigned long i, j;
1864 const unsigned long zone_required_alignment = 1UL << (MAX_ORDER-1);
1865 int cpu, nid = pgdat->node_id; 1864 int cpu, nid = pgdat->node_id;
1866 unsigned long zone_start_pfn = pgdat->node_start_pfn; 1865 unsigned long zone_start_pfn = pgdat->node_start_pfn;
1867 1866
@@ -1934,9 +1933,6 @@ static void __init free_area_init_core(struct pglist_data *pgdat,
1934 zone->zone_mem_map = pfn_to_page(zone_start_pfn); 1933 zone->zone_mem_map = pfn_to_page(zone_start_pfn);
1935 zone->zone_start_pfn = zone_start_pfn; 1934 zone->zone_start_pfn = zone_start_pfn;
1936 1935
1937 if ((zone_start_pfn) & (zone_required_alignment-1))
1938 printk(KERN_CRIT "BUG: wrong zone alignment, it will crash\n");
1939
1940 memmap_init(size, nid, j, zone_start_pfn); 1936 memmap_init(size, nid, j, zone_start_pfn);
1941 1937
1942 zonetable_add(zone, nid, j, zone_start_pfn, size); 1938 zonetable_add(zone, nid, j, zone_start_pfn, size);