From: "Rafael J. Wysocki" <rjw@sisk.pl>
To: Pavel Machek <pavel@suse.cz>
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:52:50 +0100 [thread overview]
Message-ID: <200501311952.51144.rjw@sisk.pl> (raw)
In-Reply-To: <20050131182055.GB1507@elf.ucw.cz>
On Monday, 31 of January 2005 19:20, Pavel Machek wrote:
> 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;
> }
Sure it is.
Greets,
RJW
--
- 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"
prev parent reply other threads:[~2005-01-31 18:52 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-01-28 13:54 [RFC][PATCH] swsusp: do not use higher order memory allocations on suspend 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
2005-01-31 18:52 ` Rafael J. Wysocki [this message]
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=200501311952.51144.rjw@sisk.pl \
--to=rjw@sisk.pl \
--cc=linux-kernel@vger.kernel.org \
--cc=pavel@suse.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