Re: [PATCH] swsusp: separate swap-writing/reading code

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Friday 24 March 2006 00:58, Andrew Morton wrote:
> "Rafael J. Wysocki" <[email protected]> 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).

Perhaps we can use radix-trees here.  Frankly, I haven't investigated this
possibility yet, because this part is not very high on my priority list for
improvements. :-)

First, I'd like to get the userland suspend out so people can benefit from the
userland interface.  Second, I think we can save much more memory if we
use bitmaps for the image metadata, but that will require a lot of work.
Then, there's the problem of the system responsiveness after resume,
and the "USB storage not available after resume" problem that I wouldn't
like to drop on the floor.  Not to mention device driver problems.

Greetings,
Rafael
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux