From: Andrew Morton <akpm@osdl.org>
To: Pavel Machek <pavel@ucw.cz>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [swsusp] Rework image freeing
Date: Wed, 21 Sep 2005 14:31:23 -0700 [thread overview]
Message-ID: <20050921143123.462ea5fa.akpm@osdl.org> (raw)
In-Reply-To: <20050921211944.GB2071@elf.ucw.cz>
Pavel Machek <pavel@ucw.cz> wrote:
>
> Hi!
>
> > >
> > > + for_each_zone(zone) {
> > > + for (zone_pfn = 0; zone_pfn < zone->spanned_pages; ++zone_pfn) {
> > > + struct page * page;
> > > + page = pfn_to_page(zone_pfn + zone->zone_start_pfn);
> > > + if (PageNosave(page) && PageNosaveFree(page)) {
> > > + ClearPageNosave(page);
> > > + ClearPageNosaveFree(page);
> > > + free_page((long) page_address(page));
> > > + }
> >
> > There doesn't seem to be much point in converting the pageframe address to
> > a virtual address, then back to a pageframe address. Why not just do
> > put_page() here?
>
> I do not know what put_page does, and free_page() has some friendly
> BUG_ONs. But if I should just do put_page(page); instead of
> free_page((long) page_address(page)), that is okay with me.
I don't know what alloc_pages() and free_page[s]() are supposed to do either
really. They date from when Linus was in diapers. They talk in terms of
kernel virtual addresses and will explode loudly if used for highmem pages.
All modern code will use page*'s or pfn's.
> [Sound of harddrive seeking and CPU fan going up as test kernel
> compiles].
>
Ah, I wondered what it was.
next prev parent reply other threads:[~2005-09-21 21:32 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-09-21 20:51 Pavel Machek
2005-09-21 20:58 ` Andrew Morton
2005-09-21 21:19 ` Pavel Machek
2005-09-21 21:31 ` Andrew Morton [this message]
2005-09-21 21:11 ` Dave Hansen
2005-09-21 21:18 ` Dave Hansen
2005-09-21 21:23 ` Pavel Machek
2005-09-21 22:53 ` Rafael J. Wysocki
2005-09-22 4:54 ` Rafael J. Wysocki
2005-09-22 9:46 ` Pavel Machek
2005-09-23 20:52 ` Rafael J. Wysocki
2005-09-23 21:19 ` Rafael J. Wysocki
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=20050921143123.462ea5fa.akpm@osdl.org \
--to=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pavel@ucw.cz \
/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®