From: Pavel Machek <pavel@suse.cz>
To: "Rafael J. Wysocki" <rjw@sisk.pl>
Cc: kernel list <linux-kernel@vger.kernel.org>
Subject: Re: [RFC][PATCH] swsusp: do not use higher order memory allocations on suspend
Date: Mon, 31 Jan 2005 19:20:55 +0100 [thread overview]
Message-ID: <20050131182055.GB1507@elf.ucw.cz> (raw)
In-Reply-To: <200501311510.12979.rjw@sisk.pl>
Hi!
> > static inline void free_pagedir(struct pbe *pblist)
> > {
> > struct pbe *pbe;
> >
> > while (pblist) {
> > pbe = pblist + PB_PAGE_SKIP;
> > pblist = pbe->next;
> > free_page((unsigned long)pbe);
> > }
> > pr_debug("free_pagedir(): done\n");
> > }
> >
> > Should not you free_page(pblist) instead? This passes address in
> > middle of page to free_page, that seems wrong.
>
> Certainly. It should be something like that:
>
> while (pblist) {
> pbe = pblist;
> pblist = (pbe + PB_PAGE_SKIP)->next;
> free_page((unsigned long)pbe);
> }
Hmm, I see, my "fix" leaks one page of memory during each
suspend... I've fixed it properly now and will eventually propagete it
back.
This should be right..
while (pblist) {
pbe = (pblist + PB_PAGE_SKIP)->next;
free_page((unsigned long)pblist);
pblist = pbe;
}
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:[~2005-01-31 18:21 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-01-28 13:54 Rafael J. Wysocki
2005-01-28 14:07 ` Martin Zwickel
2005-01-28 17:52 ` Rafael J. Wysocki
2005-01-28 17:24 ` Pavel Machek
2005-01-28 18:31 ` Rafael J. Wysocki
[not found] ` <200501300052.55545.rjw@sisk.pl>
[not found] ` <20050131130631.GF6279@elf.ucw.cz>
[not found] ` <200501311510.12979.rjw@sisk.pl>
2005-01-31 18:20 ` Pavel Machek [this message]
2005-01-31 18:52 ` 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=20050131182055.GB1507@elf.ucw.cz \
--to=pavel@suse.cz \
--cc=linux-kernel@vger.kernel.org \
--cc=rjw@sisk.pl \
/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®