Messages in this thread | | | Date | Thu, 16 Sep 2004 13:27:11 +0200 | From | Pavel Machek <> | Subject | Re: Suspend2 Merge: e820 table support. |
| |
Hi!
> > > +#ifdef CONFIG_SOFTWARE_SUSPEND2 > > > + /* > > > + * Mark nosave pages > > > + */ > > > + if (addr >= (void *)&__nosave_begin && addr < (void *)&__nosave_end) > > > + SetPageNosave(mem_map+tmp); > > > + } else > > > + /* > > > + * Non-RAM pages are always nosave > > > + */ > > > + SetPageNosave(mem_map+tmp); > > > +#else > > > + } > > > +#endif > > > + } > > > > Current -mm code does something funny with Nosave; I'm not sure it > > will not try to free them after resume. I have fix in my tree but it > > is little tested. > > Double negative: you think current mm may try to free Nosave pages after > resume? I haven't updated to the latest -mm yet, but will see if I can > try tomorrow.
Hmm, it also contains (saveable()):
BUG_ON(PageReserved(page) && PageNosave(page));
..but that should be easy to kill. I'd be worried about this function:
static void free_suspend_pagedir_zone(struct zone *zone, unsigned long pagedir) { unsigned long zone_pfn, pagedir_end, pagedir_pfn, pagedir_end_pfn; pagedir_end = pagedir + (PAGE_SIZE << pagedir_order); pagedir_pfn = __pa(pagedir) >> PAGE_SHIFT; pagedir_end_pfn = __pa(pagedir_end) >> PAGE_SHIFT; for (zone_pfn = 0; zone_pfn < zone->spanned_pages; ++zone_pfn) { struct page *page; unsigned long pfn = zone_pfn + zone->zone_start_pfn; if (!pfn_valid(pfn)) continue; page = pfn_to_page(pfn); if (!TestClearPageNosave(page)) continue; else if (pfn >= pagedir_pfn && pfn < pagedir_end_pfn) continue; __free_page(page); } }
I posted diff to get rid of it, but it did not get enough testing so it is not in mainline. Pavel
-- People were complaining that M$ turns users into beta-testers... ...jr ghea gurz vagb qrirybcref, naq gurl frrz gb yvxr vg gung jnl! - 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/
| |