Re: [PATCH][RFC] swsusp: speed up image restoring on x86-64

From: Pavel Machek
Date: Thu Jan 20 2005 - 17:13:50 EST


Hi!

> > > The following patch speeds up the restoring of swsusp images on x86-64
> > > and makes the assembly code more readable (tested and works on AMD64). It's
> > > against 2.6.11-rc1-mm1, but applies to 2.6.11-rc1-mm2. Please consifer for applying.
> >
> > Can you really measure the speedup?
>
> In terms of time? Probably I can, but I prefer to measure it in terms of the numbers of
> operations to be performed.
>
> With this patch, at least 8 times less memory accesses are required to restore an image
> than without it, and in the original code cr3 is reloaded after copying each _byte_,
> let alone the SIB arithmetics. I'd expect it to be 10 times faster
> or so.

Well, 8 times less cr3 reloads may be significant... for the copy
loop. Speeding up copy loop that takes ... 100msec?... of whole
resume (30 seconds) does not seem too important to me.

> The readability of code is also important, IMHO.

It did not seem too much better to me.

> > If you want cheap way to speed it up, kill cr3 manipulation.
>
> Sure, but I think it's there for a reason.

Reason is "to crash it early if we have wrong pagetables".

> > Anyway, this is likely to clash with hugang's work; I'd prefer this not to be applied.
>
> I am aware of that, but you are not going to merge the hugang's patches soon, are you?
> If necessary, I can change the patch to work with his code (hugang, what do you think?).

I think it is just not worth the effort.
Pavel
--
People were complaining that M$ turns users into beta-testers...
...jr ghea gurz vagb qrirybcref, naq gurl frrz gb yvxr vg gung jnl!
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/