Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 30 Sep 2001 22:57:12 -0700
From:      Terry Lambert <tlambert2@mindspring.com>
To:        Alfred Perlstein <bright@mu.org>
Cc:        Greg Lehey <grog@FreeBSD.org>, Jos Backus <josb@cncdsl.com>, hackers@FreeBSD.org
Subject:   Re: VM: dynamic swap remapping (patch)
Message-ID:  <3BB805B8.6F784DBD@mindspring.com>
References:  <20010929232953.B341@eix.do-labs.spb.ru> <20010929175653.Z59854@elvis.mu.org> <20010930120328.A534@eix.do-labs.spb.ru> <20010930035529.G59854@elvis.mu.org> <20010930134437.B284@eix.do-labs.spb.ru> <20010930105509.B2220@lizzy.bugworks.com> <20010930142326.L59854@elvis.mu.org> <20010930123359.A7241@lizzy.bugworks.com> <20010930145558.M59854@elvis.mu.org> <20011001131951.M31215@wantadilla.lemis.com> <20010930234114.P59854@elvis.mu.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Alfred Perlstein wrote:
[ ... SIGDANGER ... ]
> Well Joe seems to have provided a pretty interesting document on
> how it works in AIX, but I was wondering if they do anything wrt
> low/high watermarks like my idea.
> 
> Basically you'd like to inform processes that the danger has been
> alliviated so that they can cautiously start accepting more work
> rather than freaking out and shutting out clients forever...

The process is supposed to return unused memory to the system
when it gets the signal, if it can.

It's not supposed to shed all load until it gets the "all clear"
signal.

I don't know if there are any good books on Windows Internals,
but the Windows VM system does the same thing: it notifies all
kernel subsystems that they need to free up memory, if they can.
The VFAT32 IFS will basically return exactly one page out of
many thousands it is using for cache, when it gets the request
(it is implemented as a callback, which you must provide when
you register for VM services).


> This might lead to a situation where SIGDANGER starts getting
> sent informing that things are looking bleak, then processes
> start freeing resources, they get the second SIGDANGER to let
> them know that things are looking ok so they ramp up again and
> the cycle repeats, I guess that's not optimal, but I'd like FreeBSD
> to let processes know that things are looking better so they can
> go from "scrooge mode" to "thrifty mode".

The idea is just to free resources, if you can, and to mark the
processes which are "precious" by whether or not they have a
signal handler.  A close reading of the other document posted
(it seemed to be the admin manual from the URL) will indicate
that the followon SIGKILL is not sent to the processes that have
a SIGDANGER handler registered.  Note that this does not mean
that your process won't be killed off as a result of a page not
present fault, so abusing the interface is not really tolerated
very well by the system.

I think signalling an "all clear" is really a bad idea; a soft
hysteresis loop is much less prone to pendulum swings than a
hard hysteresis loop (lesson #1 in the book "Fuzzy Logic").

-- Terry

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3BB805B8.6F784DBD>