From owner-cvs-all Wed Nov 6 17:51:32 2002 Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4700B37B401; Wed, 6 Nov 2002 17:51:31 -0800 (PST) Received: from mail.chesapeake.net (chesapeake.net [205.130.220.14]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7A8F743E3B; Wed, 6 Nov 2002 17:51:30 -0800 (PST) (envelope-from jroberson@chesapeake.net) Received: from localhost (jroberson@localhost) by mail.chesapeake.net (8.11.6/8.11.6) with ESMTP id gA71pJS22846; Wed, 6 Nov 2002 20:51:19 -0500 (EST) (envelope-from jroberson@chesapeake.net) Date: Wed, 6 Nov 2002 20:51:19 -0500 (EST) From: Jeff Roberson To: Poul-Henning Kamp Cc: cvs-committers@FreeBSD.org, Subject: Re: cvs commit: src/sys/sys malloc.h src/sys/kern kern_malloc.c In-Reply-To: <5999.1036611132@critter.freebsd.dk> Message-ID: <20021106204902.F17759-100000@mail.chesapeake.net> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Wed, 6 Nov 2002, Poul-Henning Kamp wrote: > In message <20021106141427.J1374-100000@mail.chesapeake.net>, Jeff Roberson wri > tes: > > > >I would like to add a 'flush' callback to uma. So each zone could get a > >callback when the system is low on memory and it could reduce it's memory > >footprint. This would be very effective for something like the vnode > >cache or the directory cache, etc. > > > >What do you think of this? It would be trivial to add. > > I thought about it and then about the locking issues it might raise > and then I thought "I'll let another mad-man try that" :-) > > Seriously, yes, I've actually wanted something like that for years, > not only for the kernel but for userland as well. > > For the kernel, it will obviously have to be "best effort" and if the > necessary locks are unavailable we have to punt. > > For userland I would like a "SIGVM" which says "spare a page". To > be effective, this signal should _not_ result in a process to become > runnable if it currently sleeps, rather, it should only be delivered > when the process gets runnable for some other reason. > I don't have any comments on the userland side atm, but I do have a very simple way to implement this for the kernel. I will draft up a simple patch and we'll see if re will let me sneak it in before 5.0. I have really wanted this functionality for a long time myself. If I give you a callback facility to use, will you reimplement your geom functionality using that? Cheers, Jeff To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message