From owner-cvs-sys Wed May 22 18:01:53 1996 Return-Path: owner-cvs-sys Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id SAA18806 for cvs-sys-outgoing; Wed, 22 May 1996 18:01:53 -0700 (PDT) Received: from tfs.com (tfs.com [140.145.250.1]) by freefall.freebsd.org (8.7.3/8.7.3) with SMTP id SAA18794; Wed, 22 May 1996 18:01:49 -0700 (PDT) Received: from critter.tfs.com by tfs.com (smail3.1.28.1) with SMTP id m0uMOmd-0003xuC; Wed, 22 May 96 18:01 PDT Received: from critter.tfs.com (localhost [127.0.0.1]) by critter.tfs.com (8.7.5/8.6.12) with ESMTP id BAA01337; Thu, 23 May 1996 01:01:42 GMT To: John Dyson cc: CVS-committers@freebsd.org, cvs-all@freebsd.org, cvs-sys@freebsd.org Subject: Re: cvs commit: src/sys/vm swap_pager.c swap_pager.h vm_map.c vm_object.c src/sys/sys mman.h In-reply-to: Your message of "Wed, 22 May 1996 17:46:04 MST." <199605230046.RAA16458@freefall.freebsd.org> Date: Thu, 23 May 1996 01:01:40 +0000 Message-ID: <1335.832813300@critter.tfs.com> From: Poul-Henning Kamp Sender: owner-cvs-sys@freebsd.org X-Loop: FreeBSD.org Precedence: bulk Hey ... cool! THANKS John! I'm severly hardware challenged right now, so I cannot make too many benchmarks on this. If somebody wants to play with this, here is the patch to phkmalloc. I've cut&pasted it, so the tabs are probably screwed up. This should make most difference in environments where paging is common, anybody care to run "make world" or other suitable benchmakrs on a 4MB machine before and after ? Please email any results to me. Poul-Henning Index: malloc.c =================================================================== RCS file: /home/ncvs/src/lib/libc/stdlib/malloc.c,v retrieving revision 1.10 diff -u -r1.10 malloc.c --- malloc.c 1996/01/22 00:01:44 1.10 +++ malloc.c 1996/05/23 00:56:14 @@ -1010,6 +1010,8 @@ l = i << malloc_pageshift; + madvise(ptr, l, MADV_FREE); + tail = ptr+l; /* add to free-list */ Poul-Henning > dyson 96/05/22 17:46:03 > > Modified: sys/sys mman.h > sys/vm swap_pager.c swap_pager.h vm_map.c vm_object.c > Log: > Initial support for MADV_FREE, support for pages that we don't care > about the contents anymore. This gives us alot of the advantage of > freeing individual pages through munmap, but with almost none of the > overhead. -- Poul-Henning Kamp | phk@FreeBSD.ORG FreeBSD Core-team. http://www.freebsd.org/~phk | phk@login.dknet.dk Private mailbox. whois: [PHK] | phk@ref.tfs.com TRW Financial Systems, Inc. Future will arrive by its own means, progress not so.