Skip to contentSkip to conversation

discontig update for linux-ia64-2.5 bk tree

Discontig-devel Martin J. Bligh 2 participants 2 messages Jun 18, 2003

lore
Share & tools
lore
#0 lore raw

You seem to have missed the comments here:

Quoted 8 lines

-#ifndef CONFIG_DISCONTIGMEM /* Don't use mapnrs, do it properly */
extern unsigned long max_mapnr;

(quoted diff) +0 -2
-#endif
...
-#ifndef CONFIG_DISCONTIGMEM

/* The array of struct pages - for discontigmem use pgdat->lmem_map */
extern struct page *mem_map;
-#endif

Using global mapnrs for discontigmem is a horrible kludge, and very confusing. There was a damned good reason I removed those ...

It should be easy to just use local offsets into the node, right?

Quoted 11 lines

diff -Nru a/mm/page_alloc.c b/mm/page_alloc.c

mm/page_alloc.c +1 -2
@@ -57,12 +57,15 @@
  */
 static int bad_range(struct zone *zone, struct page *page)
 {
-	if (page_to_pfn(page) >= zone->zone_start_pfn + zone->spanned_pages)
+	if (page_to_pfn(page) >= zone->zone_start_pfn + zone->spanned_pages) {
 		return 1;
-	if (page_to_pfn(page) < zone->zone_start_pfn)

mm/page_alloc.c line 70

Quoted 10 lines
mm/page_alloc.c +5 -1
+	}
+	if (page_to_pfn(page) < zone->zone_start_pfn) {
 		return 1;
-	if (zone != page_zone(page))
+	}
+	if (zone != page_zone(page)) {
 		return 1;
+	}
 	return 0;
 }

Why? this just looks like removing standard Linux style? Is there a real change hidden in there?

M.

#1 lore raw
Quoted 15 lines · Martin J. Bligh

You seem to have missed the comments here:

Quoted 8 lines

-#ifndef CONFIG_DISCONTIGMEM /* Don't use mapnrs, do it properly */
extern unsigned long max_mapnr;

(quoted diff) +0 -2
-#endif
...
-#ifndef CONFIG_DISCONTIGMEM

/* The array of struct pages - for discontigmem use pgdat->lmem_map */
extern struct page *mem_map;
-#endif

Using global mapnrs for discontigmem is a horrible kludge, and very confusing. There was a damned good reason I removed those ...

Quoted 1 line

It should be easy to just use local offsets into the node, right?

I'll look at this.

Quoted 16 lines
Quoted 16 lines

diff -Nru a/mm/page_alloc.c b/mm/page_alloc.c

mm/page_alloc.c +4 -3
@@ -57,12 +57,15 @@
  */
 static int bad_range(struct zone *zone, struct page *page)
 {
-	if (page_to_pfn(page) >= zone->zone_start_pfn + zone->spanned_pages)
+	if (page_to_pfn(page) >= zone->zone_start_pfn + zone->spanned_pages) {
 		return 1;
-	if (page_to_pfn(page) < zone->zone_start_pfn)
+	}
+	if (page_to_pfn(page) < zone->zone_start_pfn) {
 		return 1;
-	if (zone != page_zone(page))
+	}
Quoted 8 lines

mm/page_alloc.c line 70

Quoted 5 lines
mm/page_alloc.c +2 -0
+	if (zone != page_zone(page)) {
 		return 1;
+	}
 	return 0;
 }

Why? this just looks like removing standard Linux style? Is there a real change hidden in there?

Oops, that one stuck past me.

Thanks,
Jesse