Re: Unfreed kernel buffers (fsck and 2.3.99-pre*)

From: Mike Galbraith (mikeg@weiden.de)
Date: Thu Mar 23 2000 - 01:35:00 EST


On Wed, 22 Mar 2000, Craig Kulesa wrote:

> Linus Torvalds wrote:
>
> > Can you try pre2-4 or later? It should have unbroken the breakage,
>
> Indeed; it made the situation bearable again. :) Thanks!
>
> There is _another_ issue, maybe an academic one, that I'd like to ask
> about. Maybe someone could help illuminate the issue; it regards the
> releasing of swapped pages.
>
> Summary: If I open a suitably large text file in Emacs, and the system
> swaps liberally, and the application is closed -- those swapped pages are
> not immediately released in 2.3.99-pre* (up to pre3-5), but only upon
> "demand".
>
> Here's an example.
>
> Starting situation, in X-windows, under 2.3.99-pre3-5:
> total used free shared buffers cached
> Mem: 30348 29776 572 0 284 22344
> minus buffers/cache: 7148 23200
> Swap: 32764 3008 29756
>
> Now open a large Emacs session, go 23M into swap. Close Emacs. Then look:
>
> total used free shared buffers cached
> Mem: 30348 27136 3212 0 160 22748
> minus buffers/cache: 4228 26120
> Swap: 32764 17640 15124
>
> Hmmm, there's nothing significant running anymore, yet 17M is shown paged
> out. If I go and 'dd if=/dev/zero of=dump.dat bs=1024k count=40', or
> attempt to allocate "relatively large" amounts of memory, _then_ those
> swapped pages are freed and I get back to where I started:
>
> total used free shared buffers cached
> Mem: 30348 29568 780 0 552 21660
> minus buffers/cache: 7356 22992
> Swap: 32764 3644 29120
>
>
> So... is it better to release swapped pages immediately, or only upon
> "demand"? I would have naively guessed the former, but maybe I'm
> missing a crucial point.
>
> Thoughts?

Well, I'm glad I'm not the only one seeing this. Here, after a day
of swap testing, I ended up with 100meg of something unidentifiable
hanging out in swap.

I think that this is a problem. If I bloat up swap with netscape,
(click on BIG diff works wonderfully) and then click back and then
click on the same diff again, swap drops and drops and drops before
starting to climb again. I see the same thing doing controlled make
-j. It _seems_ like it's bringing old stale pages back in only to
throw them away (conjecture).. and using up a LOT of time doing so.

        -Mike

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Thu Mar 23 2000 - 21:00:37 EST