Date: Wed, 6 Nov 2002 20:51:19 -0500 (EST) From: Jeff Roberson <jroberson@chesapeake.net> To: Poul-Henning Kamp <phk@critter.freebsd.dk> Cc: cvs-committers@FreeBSD.org, <cvs-all@FreeBSD.org> Subject: Re: cvs commit: src/sys/sys malloc.h src/sys/kern kern_malloc.c Message-ID: <20021106204902.F17759-100000@mail.chesapeake.net> In-Reply-To: <5999.1036611132@critter.freebsd.dk>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20021106204902.F17759-100000>