From: "Rafael J. Wysocki" <rjw@sisk.pl>
To: Pavel Machek <pavel@suse.cz>
Cc: Andi Kleen <ak@suse.de>, Andrew Morton <akpm@osdl.org>,
hugang@soulinfo.com, LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH][RFC] swsusp: speed up image restoring on x86-64
Date: Fri, 21 Jan 2005 13:43:40 +0100 [thread overview]
Message-ID: <200501211343.41190.rjw@sisk.pl> (raw)
In-Reply-To: <20050121100603.GD18373@elf.ucw.cz>
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"
next prev parent reply other threads:[~2005-01-21 12:44 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-01-20 19:32 Rafael J. Wysocki
2005-01-20 20:59 ` Pavel Machek
2005-01-20 21:46 ` Rafael J. Wysocki
2005-01-20 22:06 ` Pavel Machek
2005-01-20 22:58 ` Rafael J. Wysocki
2005-01-20 23:06 ` Pavel Machek
2005-01-21 0:14 ` Rafael J. Wysocki
2005-01-21 10:06 ` Pavel Machek
2005-01-21 12:43 ` Rafael J. Wysocki [this message]
2005-01-21 2:23 ` hugang
2005-01-21 10:04 ` Pavel Machek
2005-01-21 10:19 ` Andi Kleen
2005-01-21 10:30 ` Pavel Machek
2005-01-21 13:42 ` Rafael J. Wysocki
2005-01-21 14:31 ` hugang
2005-01-21 17:48 ` Pavel Machek
2005-01-21 12:32 ` Rafael J. Wysocki
2005-01-21 19:09 ` Rafael J. Wysocki
2005-01-22 2:03 ` Andi Kleen
2005-01-20 21:04 ` Rafael J. Wysocki
2005-01-22 2:50 ` Andi Kleen
2005-01-22 9:54 ` Pavel Machek
2005-01-22 11:26 ` Andi Kleen
2005-01-22 11:30 ` Pavel Machek
2005-01-22 11:44 ` Andi Kleen
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=200501211343.41190.rjw@sisk.pl \
--to=rjw@sisk.pl \
--cc=ak@suse.de \
--cc=akpm@osdl.org \
--cc=hugang@soulinfo.com \
--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
Powered by JetHome