Re: [linux-pm] Re: swsusp: Not enough free pages

From: Rafael J. Wysocki
Date: Mon Jun 06 2005 - 16:49:47 EST


Hi,

On Monday, 6 of June 2005 19:14, Pavel Machek wrote:
> Hi!
>
> > > > > > > So far, yes. I just tried 2 times.
> > > > > >
> > > > > > always. (I check that swap dev is on)
> > > > > >
> > > > > > Sometimes, my ia32 laptop free 0 pages too.
> > > > > > I think we should always free some pages
> > > > > > from various caches.
> > > > >
> > > > > Try this hack... it is basically mm problem I don't know how to fix,
> > > > > but this seems to help.
> > > > > Pavel
> > > >
> > > > Thanks Pavel, this hack works.
> > > > ..
> > > > Freeing memory... ^Hdone (0 pages freed)
> > > > Freeing memory... ^H-^Hdone (4636 pages freed)
> > > > Freeing memory... ^Hdone (0 pages freed)
> > > > Freeing memory... ^H-^Hdone (914 pages freed)
> > > > Freeing memory... ^Hdone (0 pages freed)
> > > > Freezing CPUs (at 0)...ok
> > > >
> > > > Any mm guru know how to fix this?
> > >
> > > Andrew, can you help? It seems free_some_memory does not really free
> > > all reclaimable memory in recent kernels. In fact, it likes to free
> > > nothing on first invocations....
> >
> > Actually, on (my) x86-64 it seems to work. It frees even more memory than
> > I'd like it to (there's 80-90% of RAM free after it's finished). ;-)
> >
> > If I had to guess, I'd say the problem is related to PAGE_SIZE !=
> >4096.
>
> No, I see it on i386, too. Try patch below; if it frees some after
> first pass, you have that problem, too.

I've run it once and the result is this:

Freeing memory... done (75876 pages freed)
Freeing memory... done (1536 pages freed)
Freeing memory... done (0 pages freed)
Freeing memory... done (1792 pages freed)
Freeing memory... done (0 pages freed)

It does free some pages after the first pass, but this is only a small fraction
of all pages freed. I wouldn't call it a bad result ...

Greets,
Rafael


--
- Would you tell me, please, which way I ought to go from here?
- That depends a good deal on where you want to get to.
-- Lewis Carroll "Alice's Adventures in Wonderland"
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/