lkml.org 
[lkml]   [2006]   [Mar]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] swsusp: separate swap-writing/reading code
"Rafael J. Wysocki" <rjw@sisk.pl> wrote:
>
> > I guess I missed this one somehow. Using a bitmap for allocated swap is really
> > inefficient because the values are usually not fragmented much. Extents would
> > have been a far better choice.
>
> I agree it probably may be improved. Still it seems to be good enough. Further,
> it's more efficient than the previous solution, so I consider it as an improvement.
> Also this code has been tested for quite some time in -mm and appears to
> behave properly, at least we haven't got any bug reports related to it so far.

I think that temporarily allocating 1/32768th of total memory here is
reasonable, especially as it's not all allocated in a contiguous hunk.

> Currently I'm not working on any better solution. If you can provide any
> patches to implement one, please submit them, but I think they'll have to be
> tested for as long as this code, in -mm.

I was a little saddened by the open-coded approach. I'd expect that both
radix-trees and idr-trees could be used in this application. Probably the
former. (Radix-trees should have been designed from day one to store
`unsigned long's, not void*'s, so unless we change that, this application
will need to use typecasts when converting between void*'s and the stored
BITS_PER_LONG bitmaps).

-
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: 2006-03-24 00:59    [W:0.051 / U:1.196 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site