Date: Fri, 12 Oct 2012 18:46:42 +0000 From: "Poul-Henning Kamp" <phk@phk.freebsd.dk> To: Alan Cox <alc@rice.edu> Cc: Tim LaBerge <tlaberge@juniper.net>, Marcel Moolenaar <marcel@xcllnt.net>, "freebsd-arch@freebsd.org Arch" <freebsd-arch@freebsd.org> Subject: Re: Behavior of madvise(MADV_FREE) Message-ID: <5511.1350067602@critter.freebsd.dk> In-Reply-To: <50786023.1000206@rice.edu> References: <9FEBC10C-C453-41BE-8829-34E830585E90@xcllnt.net> <4835.1350062021@critter.freebsd.dk> <50786023.1000206@rice.edu>
next in thread | previous in thread | raw e-mail | index | archive | help
-------- In message <50786023.1000206@rice.edu>, Alan Cox writes: >Given the way that madvise(MADV_FREE) is still used by malloc()/free(), >any additional overhead would still be a pessimization most of the >time. That would be my fear too. >Over the years, I think you and I have both said that what we >really need is the ability for the kernel to deliver an event to >malloc()/free() when memory is trending toward scarcity. I still think this would be a good idea, and I can only assume that the absense of this feature is due to Jason Evans failing in his malloc-maintainers duty of bugging the VM people for this feature at every conceiveable opportunity :-) That being said, my experience with Varnish does indicate that intelligent use of VM from userland is close to a lost case, in no small part because of the lack of a good API. If you can spare a student of sufficient quality, it might be a good assignment to design a new VM-API, relative to the current reality of things like malware attacks, "no-execute" bits etc. -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?5511.1350067602>