All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nigel Cunningham <ncunningham@cyclades.com>
To: Andrew Morton <akpm@osdl.org>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Pavel Machek <pavel@ucw.cz>
Subject: Re: [PATCH]: Speed freeing memory for suspend.
Date: Fri, 04 Mar 2005 09:20:20 +1100	[thread overview]
Message-ID: <1109888419.3772.9.camel@desktop.cunningham.myip.net.au> (raw)
In-Reply-To: <20050303032620.69add028.akpm@osdl.org>

Hi.

Here are the stats:

1GB P4, 2.6.11+Suspend2 2.1.8.
Soft image size limit set to 2MB to emulate Pavel's implementation (eat
as much memory as we can).

Without patch:
Freed  16545 pages in  4000 jiffies = 16.16 MB/s
Freed  83281 pages in 14060 jiffies = 23.14 MB/s
Freed 237754 pages in 41482 jiffies = 22.39 MB/s

With patch:
Freed  52257 pages in  6700 jiffies = 30.46 MB/s
Freed 105693 pages in 11035 jiffies = 37.41 MB/s
Freed 239007 pages in 18284 jiffies = 51.06 MB/s

With a less aggressive image size limit (200MB):

Without the patch:
Freed  14600 pages in  1749 jiffies = 32.61 MB/s (Anomolous!)
Freed  88563 pages in 14719 jiffies = 23.50 MB/s
Freed 205734 pages in 32389 jiffies = 24.81 MB/s

With the patch:
Freed  68252 pages in   496 jiffies = 537.52 MB/s
Freed 116464 pages in   569 jiffies = 798.54 MB/s
Freed 209699 pages in   705 jiffies = 1161.89 MB/s

The later pages take more work to get, which accounts for the slower
MB/s with smaller numbers of pages to free. Without the patch, though,
getting the easier pages also takes longer because we do a far greater
number of invocations of shrink_all_memory in order to get the same
number of pages.

Regards,

Nigel

On Thu, 2005-03-03 at 22:26, Andrew Morton wrote: 
> Nigel Cunningham <ncunningham@cyclades.com> wrote:
> >
> > Here's a patch I've prepared which improves the speed at which memory is
> >  freed prior to suspend. It should be a big gain for swsusp.
> 
> Patch is simple enough but, as always, please back up an optimization patch
> with quantitative test results.



-- 
Nigel Cunningham
Software Engineer, Canberra, Australia
http://www.cyclades.com
Bus: +61 (2) 6291 9554; Hme: +61 (2) 6292 8028;  Mob: +61 (417) 100 574

Maintainer of Suspend2 Kernel Patches http://softwaresuspend.berlios.de


      parent reply	other threads:[~2005-03-03 22:24 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-03-03 11:17 [PATCH]: Speed freeing memory for suspend Nigel Cunningham
2005-03-03 11:26 ` Andrew Morton
2005-03-03 12:35   ` Nigel Cunningham
2005-03-03 22:20   ` Nigel Cunningham [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=1109888419.3772.9.camel@desktop.cunningham.myip.net.au \
    --to=ncunningham@cyclades.com \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pavel@ucw.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.