Re: Software suspend testing in 2.6.0-test1

Pavel Machek
2003-07-18T17:36:15Z

Hi!

> > I tried the patch below, but it didn't work. Nothing (or very little)
> > was swapped out to disk. I also tried using GFP_KERNEL, but that
> > seemed to cause a deadlock. (Maybe it would have gone OOM if I had
> > waited long enough). I think the problem is that pdflush and friends
> > are already frozen when this code runs.
>
> Oh, we shouldn't be doing this sort of thing when the kernel threads are
> refrigerated. We do need kswapd services for the trick you tried.
>
> And all flavours of ext3_writepage() can block on kjournald activity, so if
> kjournald is refrigerated during the memory shrink the machine can deadlock.
>
> It would be much better to freeze kernel threads _after_ doing the big
> memory shrink.

I wanted to avoid that: we do want user threads refrigerated at that
point so that we know noone is allocating memory as we are trying to
do memory shrink. I'd like to avoid having refrigerator run in two
phases....

Pavel
--
When do you have a heart between your knees?
[Johanka's followup: and *two* hearts?]