Hi,

On Friday, 4 of March 2005 15:21, Nigel Cunningham wrote:
[-- snip --]
> 
> Will something like this patch help?
> 
[-- snip --]

I think that the changes below are unnecessary.  free_all_bootmem() is
actually called _before_ the loop in mem_init() in which PG_nosave is set for
the first time, so there's no need to clear it earlier.

> diff -ruNp 208-e820-table-support-old/mm/bootmem.c 
> 208-e820-table-support-new/mm/bootmem.c
> --- 208-e820-table-support-old/mm/bootmem.c   2005-01-12 17:07:15.902387400 
> +1100
> +++ 208-e820-table-support-new/mm/bootmem.c   2005-01-12 17:23:44.087160480 
> +1100
> @@ -280,12 +280,14 @@ static unsigned long __init free_all_boo
>  
>                       count += BITS_PER_LONG;
>                       __ClearPageReserved(page);
> +                     ClearPageNosave(page);
>                       order = ffs(BITS_PER_LONG) - 1;
>                       set_page_refs(page, order);
>                       for (j = 1; j < BITS_PER_LONG; j++) {
>                               if (j + 16 < BITS_PER_LONG)
>                                       prefetchw(page + j + 16);
>                               __ClearPageReserved(page + j);
> +                             ClearPageNosave(page + j);
>                       }
>                       __free_pages(page, order);
>                       i += BITS_PER_LONG;
> @@ -296,6 +298,7 @@ static unsigned long __init free_all_boo
>                               if (v & m) {
>                                       count++;
>                                       __ClearPageReserved(page);
> +                                     ClearPageNosave(page);
>                                       set_page_refs(page, 0);
>                                       __free_page(page);
>                               }
> @@ -316,6 +319,7 @@ static unsigned long __init free_all_boo
>       for (i = 0; i < ((bdata->node_low_pfn-(bdata->node_boot_start >> 
> PAGE_SHIFT))/8 + PAGE_SIZE-1)/PAGE_SIZE; i++,page++) {
>               count++;
>               __ClearPageReserved(page);
> +             ClearPageNosave(page);
>               set_page_count(page, 1);
>               __free_page(page);
>       }

Greets,
Rafael
 

-- 
- Would you tell me, please, which way I ought to go from here?
- That depends a good deal on where you want to get to.
                -- Lewis Carroll "Alice's Adventures in Wonderland"
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to