From owner-freebsd-hackers Sun Sep 30 22:56:31 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from swan.mail.pas.earthlink.net (swan.mail.pas.earthlink.net [207.217.120.123]) by hub.freebsd.org (Postfix) with ESMTP id 4BE1137B40C; Sun, 30 Sep 2001 22:56:27 -0700 (PDT) Received: from mindspring.com (dialup-209.247.136.133.Dial1.SanJose1.Level3.net [209.247.136.133]) by swan.mail.pas.earthlink.net (EL-8_9_3_3/8.9.3) with ESMTP id WAA07544; Sun, 30 Sep 2001 22:56:24 -0700 (PDT) Message-ID: <3BB805B8.6F784DBD@mindspring.com> Date: Sun, 30 Sep 2001 22:57:12 -0700 From: Terry Lambert Reply-To: tlambert2@mindspring.com X-Mailer: Mozilla 4.7 [en]C-CCK-MCD {Sony} (Win98; U) X-Accept-Language: en MIME-Version: 1.0 To: Alfred Perlstein Cc: Greg Lehey , Jos Backus , hackers@FreeBSD.org Subject: Re: VM: dynamic swap remapping (patch) 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> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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