lkml.org 
[lkml]   [2006]   [May]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [Patch]Fix spanned_pages is not updated at a case of memory hot-add.
> I really don't like the idea of having this variable called "new_"
> something. That implies that this is what the new end_pfn is going to
> be. The *new* one. In reality, it is what it _might_ have been. How
> about "tmp_zone_end_pfn"?
>
> This practice of dealing with spanned_pages is a real pain.
>
> I generally try to avoid max/min in code, but this struck me as possibly
> being useful. Do you find this easier to read, or your patch?

Ah, I think using max is better due to smaller code, indeed.

>
> diff -puN mm/memory_hotplug.c~fix-spanned-pages mm/memory_hotplug.c
> --- work/mm/memory_hotplug.c~fix-spanned-pages 2006-05-23 09:04:31.000000000 -0700
> +++ work-dave/mm/memory_hotplug.c 2006-05-23 09:22:18.000000000 -0700
> @@ -91,8 +91,8 @@ static void grow_zone_span(struct zone *
> if (start_pfn < zone->zone_start_pfn)
> zone->zone_start_pfn = start_pfn;
>
> - if (end_pfn > old_zone_end_pfn)
> - zone->spanned_pages = end_pfn - zone->zone_start_pfn;
> + zone->spanned_pages = max(old_zone_end_pfn, end_pfn) -
> + zone->zone_start_pfn);
^
this parentheses is redundant. :-)

Could you fix and repost it? Or should I?

--
Yasunori Goto


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

\
 
 \ /
  Last update: 2006-05-24 03:21    [W:0.091 / U:0.120 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site