From: hugang@soulinfo.com
To: Lukas Hejtmanek <xhejtman@mail.muni.cz>
Cc: linux-kernel@vger.kernel.org
Subject: Re: PATCH swsusp: page rellocation speed up
Date: Wed, 12 Jan 2005 21:46:13 +0800 [thread overview]
Message-ID: <20050112134612.GA29173@hugang.soulinfo.com> (raw)
In-Reply-To: <20050112124948.GA15687@hugang.soulinfo.com>
On Wed, Jan 12, 2005 at 08:49:49PM +0800, hugang@soulinfo.com wrote:
> On Tue, Jan 11, 2005 at 02:01:23AM +0100, Lukas Hejtmanek wrote:
> > Hello,
> >
> > attached patch should speed up page rellocation at time of resume. Please test.
> > The diff is against 2.6.10-bk8
> >
> ....
>
> really cool, Passed in my x86 and ppc.
>
> Here is a patch to make pagedir using non-continuity page,
> 2.6.10 -> mm1 -> this patch -> my patch
>
...
After more deep test, I found A bug, Here is a patch to fix it.
--- 2.6.10-mm1-one-pbe-hg/kernel/power/pbe.h~mail 2005-01-12 21:10:39.000000000 +0800
+++ 2.6.10-mm1-one-pbe-hg/kernel/power/pbe.h 2005-01-12 21:21:41.000000000 +0800
@@ -267,7 +267,7 @@ static int __init check_pagedir(void)
{
void **c, *f;
struct pbe *next, *pos;
- int error, index, i;
+ int error, index;
suspend_pagedir_t *addr = NULL;
struct zone *zone;
unsigned long zone_pfn;
@@ -280,8 +280,9 @@ static int __init check_pagedir(void)
}
/* Clear orig address */
- pbe_for_each(pos, next, i, nr_copy_pages, pagedir_nosave) {
- pr_debug("clear <%p>\n", (void*)pos->orig_address);
+ pbe_for_each(pos, next, index, nr_copy_pages, pagedir_nosave) {
+ pr_debug("clear <%p>, <%p>, %d\n",
+ pos, (void*)pos->orig_address, index);
ClearPageNosaveFree(virt_to_page(pos->orig_address));
}
--- 2.6.10-mm1-one-pbe-hg/kernel/power/swsusp.c~mail 2005-01-12 21:10:43.000000000 +0800
+++ 2.6.10-mm1-one-pbe-hg/kernel/power/swsusp.c 2005-01-12 21:43:41.000000000 +0800
@@ -380,6 +380,8 @@ static int write_pagedir(void)
pgdir_for_each(pgdir, next, pagedir_nosave) {
error = write_page((unsigned long)pgdir, &swsusp_info.pagedir[n]);
+ pr_debug("write_pagedir: <%p>, %lu\n",
+ pgdir, swp_offset(swsusp_info.pagedir[n]));
if (error) break;
n ++;
}
@@ -1008,6 +1010,7 @@ static int __init read_pagedir(void)
pgdir_for_each(pgdir, next, pagedir_nosave) {
error = read_one_pagedir(pgdir, i);
if (error) break;
+ pgdir[ONE_PAGE_PBE_NUM-1].dummy.val = next ? next->dummy.val : 0;
i++;
}
BUG_ON(i != n);
--
Hu Gang .-.
/v\
// \\
Linux User /( )\ [204016]
GPG Key ID ^^-^^ http://soulinfo.com/~hugang/hugang.asc
next prev parent reply other threads:[~2005-01-12 13:48 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-01-11 1:01 PATCH swsusp: page rellocation speed up Lukas Hejtmanek
2005-01-12 12:49 ` hugang
2005-01-12 13:01 ` hugang
2005-01-12 13:46 ` hugang [this message]
2005-01-12 15:14 ` hugang
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=20050112134612.GA29173@hugang.soulinfo.com \
--to=hugang@soulinfo.com \
--cc=linux-kernel@vger.kernel.org \
--cc=xhejtman@mail.muni.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;
as well as URLs for NNTP newsgroup(s).