Re: [PATCH][RFC] swsusp: speed up image restoring on x86-64
From: Rafael J. Wysocki (rjw_at_sisk.pl)
Date: 01/21/05
- Previous message: Kirill Korotaev: "Re: possible CPU bug and request for Intel contacts"
- In reply to: Pavel Machek: "Re: [PATCH][RFC] swsusp: speed up image restoring on x86-64"
- Next in thread: hugang_at_soulinfo.com: "Re: [PATCH][RFC] swsusp: speed up image restoring on x86-64"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
To: Pavel Machek <pavel@suse.cz> Date: Fri, 21 Jan 2005 13:43:40 +0100
On Friday, 21 of January 2005 11:06, Pavel Machek wrote:
> Hi!
>
> > > Well, I know that current code works. It was produced by C compiler,
> > > btw. Now, new code works for you, but it was not in kernel for 4
> > > releases, and... this code is pretty subtle.
> >
> > Now, I'm confused. :-) It's roughly this:
> >
> > struct pbe *pbe = pagedir_nosave, *end;
> > unsigned n = nr_copy_pages;
> > if (n) {
> > end = pbe + n;
> > do {
> > memcpy((void *)pbe->orig_address, (void *)pbe->address, PAGE_SIZE);
> > pbe++;
> > } while (pbe < end);
> > }
> >
> > where memcpy() is of course a hand-written inline that includes the cr3 manipulation,
> > and pbe, end, n are registers.
>
> For example it may not use any variable in memory, and may not use
> stack, as memory changes under its hands.
Which is not a big problem on x86-64. :-)
> Plus assembly is always subtle ;-).
And that's what makes it interesting.
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" - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
- Previous message: Kirill Korotaev: "Re: possible CPU bug and request for Intel contacts"
- In reply to: Pavel Machek: "Re: [PATCH][RFC] swsusp: speed up image restoring on x86-64"
- Next in thread: hugang_at_soulinfo.com: "Re: [PATCH][RFC] swsusp: speed up image restoring on x86-64"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|