tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Does Memory have to get swapped in to be freed?



Manuel Bouyer wrote:

> On Mon, Jun 16, 2008 at 10:48:05AM +0200, Martin S. Weber wrote:
> > Hoi,
> >    Just an observation after killing an ages old firefox with
> > a good count of plugins having run. I look at my xosview and
> > watch disk activity for quite a period, with rising memory
> > usage. Then at a sudden the disk activity stops, all the
> > memory (obviously used by firefox) is freed and memory
> > usage drops quite, while finally the ffox window closes.
> >    What is kind of strange is the time of disk activity
> > which kind of goes around the system and ties it up while
> > swapping in. Just to free the pages swapped out? Isn't it
> > possible to free those pages just on the swap, without
> > reading them in? Or was I witnessing something absolutely
> > different?
> 
> firefox probably has a signal handler which is called when killed,
> and this handler is doing a lot of things (like closing the
> windows, flushing and closing files, etc), and all pages needed for
> this are likely to have been paged out.

A good test for this theory is to try to "kill -9 <firefox>" to
bypass any signal handlers and see if you see the same behaviour.

FWIW, killing an "ages old" (couple of weeks) firefox on NetBSD
4.0 results in a lot disk activity then a "hang" for anywhere up
to 3 or 4 minutes before the system recovers normally.  During
that time, the machine is effectively frozen, but still answers
a ping.  I'm guessing that this might be some sort of process
tear-down in uvm or something, but don't have any real evidence
to base that on and because it seems to take about a week or so
of firefox run time before the problem shows up it's not exactly
easy to diagnose any further...

Cheers,
Simon.


Home | Main Index | Thread Index | Old Index