From: Pavel Machek <pavel@ucw.cz>
To: Nigel Cunningham <ncunningham@linuxmail.org>
Cc: Andrew Morton <akpm@digeo.com>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: Suspend2 Merge: e820 table support.
Date: Thu, 16 Sep 2004 13:37:35 +0200 [thread overview]
Message-ID: <20040916113735.GG5467@elf.ucw.cz> (raw)
In-Reply-To: <1095334545.4932.206.camel@laptop.cunninghams>
Hi!
> > Hmm, it also contains (saveable()):
> >
> > BUG_ON(PageReserved(page) && PageNosave(page));
>
> How do you cover those HighMem pages that get marked Reserved and are
> unusable? (That's what the e820 logic was for, iirc. Think it was done
> about February!). Not handling them resulted in MCEs when trying to do
> the atomic copy or when restoring (seemed random).
This function is not use for highmem, AFAICS. If page is marked
reserved we do not touch it. Do you suggest that we need to save it
for highmem case?
MCEs... I see you have patch to disable them during suspend... That's
clearly wrong thing to do, right?
> > ..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);
>
> Mmm. I should get around to using pfn_to_page. That's necessary for
> discontig support, right? Haven't looked at that yet. (Yes, swsusp has
> functionality suspend2 doesn't!) :>.
>
> > if (!TestClearPageNosave(page))
> > continue;
> > else if (pfn >= pagedir_pfn && pfn < pagedir_end_pfn)
> > continue;
> > __free_page(page);
> > }
> > }
>
> Wow. This function is really hard to understand. Or maybe I'm really
> ignorant :>.
No, this function really is ugly and needs to die.
Pavel
--
People were complaining that M$ turns users into beta-testers...
...jr ghea gurz vagb qrirybcref, naq gurl frrz gb yvxr vg gung jnl!
next prev parent reply other threads:[~2004-09-16 11:42 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-09-16 11:03 Nigel Cunningham
2004-09-16 11:14 ` Pavel Machek
2004-09-16 11:24 ` Nigel Cunningham
2004-09-16 11:27 ` Pavel Machek
2004-09-16 11:35 ` Nigel Cunningham
2004-09-16 11:37 ` Pavel Machek [this message]
2004-09-16 11:59 ` Nigel Cunningham
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20040916113735.GG5467@elf.ucw.cz \
--to=pavel@ucw.cz \
--cc=akpm@digeo.com \
--cc=linux-kernel@vger.kernel.org \
--cc=ncunningham@linuxmail.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®