mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Rafael J. Wysocki" <rjw@sisk.pl>
To: Pavel Machek <pavel@ucw.cz>
Cc: LKML <linux-kernel@vger.kernel.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	Nigel Cunningham <ncunningham@linuxmail.org>
Subject: Re: [RFC][PATCH -mm] swsusp: Use rbtree for tracking allocated swap
Date: Sun, 8 Apr 2007 19:02:35 +0200	[thread overview]
Message-ID: <200704081902.35857.rjw@sisk.pl> (raw)
In-Reply-To: <20070408125636.GB4404@ucw.cz>

On Sunday, 8 April 2007 14:56, Pavel Machek wrote:
> Hi!
> 
> > Some time ago we discussed the possibility of simplifying the swsusp's approach
> > towards tracking the swap pages allocated by it for saving the image (so that
> > they can be freed if there's an error).
> > 
> > I think we can get back to it now, as it is a nice optimization that should
> > allow us to use less memory (almost always) and improve performance a bit.
> > 
> 
> Well, I do not think you can measure the difference, but...

As far as the memory usage is concerned, I can. :-)  Usually, it takes 1 extent
(40 B on x86_64) to register all of the allocated swap pages.  If bitmaps are
used, we need as many bits as there are swap pages available (for 1 GB swap
and 4 KB pages that would be ~250000 bits, which gives ~8 pages, and we can
save more than 800 extents using that much memory).

> >  kernel/power/power.h  |   27 +---------
> >  kernel/power/swap.c   |   18 +-----
> >  kernel/power/swsusp.c |  135 ++++++++++++++++++++++++++------------------------
> >  kernel/power/user.c   |   22 +-------
> >  4 files changed, 85 insertions(+), 117 deletions(-)
> 
> ....as it removes code... I think we can do that. But it is 2.6.23+
> material.

Yes, I think so, but still we can ask Andrew to include it into -mm earlier? ;-)

Rafael

  reply	other threads:[~2007-04-08 16:59 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-04-07 21:20 Rafael J. Wysocki
2007-04-07 22:06 ` Andrew Morton
2007-04-07 22:31   ` Nigel Cunningham
2007-04-07 23:13     ` Rafael J. Wysocki
2007-04-07 23:42       ` Nigel Cunningham
2007-04-08 16:47         ` Rafael J. Wysocki
2007-04-08 21:07           ` Nigel Cunningham
2007-04-09 13:03             ` Rafael J. Wysocki
2007-04-09 21:00               ` Nigel Cunningham
2007-04-08 12:56 ` Pavel Machek
2007-04-08 17:02   ` Rafael J. Wysocki [this message]
2007-04-09 12:39     ` Pavel Machek
2007-04-10 21:00       ` Rafael J. Wysocki

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=200704081902.35857.rjw@sisk.pl \
    --to=rjw@sisk.pl \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ncunningham@linuxmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome