[lkml]   [2006]   [Mar]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [ck] Re: Faster resuming of suspend technology.
On Po 13-03-06 11:43:55, Nigel Cunningham wrote:
> Hi.
> On Monday 13 March 2006 08:30, Con Kolivas wrote:
> > On Monday 13 March 2006 08:32, Andreas Mohr wrote:
> > > And... well... this sounds to me exactly like a prime task
> > > for the newish swap prefetch work, no need for any other
> > > special solutions here, I think.
> > > We probably want a new flag for swap prefetch to let it know
> > > that we just resumed from software suspend and thus need
> > > prefetching to happen *much* faster than under normal
> > > conditions for a short while, though (most likely by
> > > enabling prefetching on a *non-idle* system for a minute).
> >
> > Adding a resume_swap_prefetch() called just before the resume finishes that
> > aggressively prefetches from swap would be easy. Please tell me if you
> > think adding such a function would be worthwhile.
> My 2c would be that swsusp is broken in a number of ways in discarding those
> pages in the first place:

Yep, feel free to submit a patch.

> - Forcing pages out to swap by vm pressure is an inefficient way of writing
> the pages.

Really? VM subsystem is supposed to be effective.

> - It doesn't get the pages compressed, and so makes inefficient use of the
> storage and forces more pages to be discarded that would otherwise be
> necessary.

"more pages to be discarded" is untrue. If you want to argue that swap
needs to be compressed, feel free to submit patches for swap

(Compression is actually not as important as you paint it. Rafael
implemented it, only to find out that it is 20 percent speedup in
common cases -- and your gzip actually slows things down.)

> - Bringing the pages back in by swap prefetching or swapoffing or whatever is
> equally inefficient (I was going to say 'particularly in low memory
> situations', but immediately ate my words as I remembered that if you've just
> swsusp'd, you've freed at least half of memory anyway).

...but allows you to use machine immediately after resume, which
people want, as you have just seen.

> - This technique doesn't guarantee that the pages you end up with in memory
> are the pages that you're actually most likely to want. The vast majority of
> what you really want will simply have been discarded rather than swapped.
> Having said that, Rafael is making some progress in these areas, such that
> swsusp is eating less memory than it used to, so that swap prefetching will
> be less important at resume time than it has been in the past.
> Hope this helps.
> Nigel

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2006-03-13 11:15    [W:0.043 / U:9.148 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site