lkml.org 
[lkml]   [2007]   [Apr]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [RFC][PATCH -mm] swsusp: Use rbtree for tracking allocated swap
Date
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
-
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/

\
 
 \ /
  Last update: 2007-04-08 19:01    [W:0.112 / U:0.524 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site