Re: Software suspend testing in 2.6.0-test1

Peter Osterlund
2003-07-20T07:31:26Z

Andrew Morton <akpm@osdl.org> writes:

> Peter Osterlund <petero2@telia.com> wrote:
> >
> > I have tried the change, but the writeout is still very slow. (Maybe
> > somewhat faster than the original code, but far from being limited by
> > disk bandwidth.)
>
> Did you fix swsusp to leave kswapd unrefrigerated during the shrink? If
> not, the change wouldn't make any difference.

Yes, handled by this part of the patch:

@@ -976,10 +983,11 @@
* us from recursively trying to free more memory as we're
* trying to free the first piece of memory in the first place).
*/
- tsk->flags |= PF_MEMALLOC|PF_KSWAPD;
+ tsk->flags |= PF_MEMALLOC|PF_KSWAPD|PF_IOTHREAD;

Without that change, nothing got swapped to disk. It looks like
__alloc_pages(GFP_ATOMIC,...) only wakes up the kswapd threads. Is the
pdflush threads needed during memory freeing? My patch leaves them
unrefrigerated too, but Pavel said that wasn't safe for some reason.

--
Peter Osterlund - petero2@telia.com