Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 23 May 1996 01:01:40 +0000
From:      Poul-Henning Kamp <phk@critter.tfs.com>
To:        John Dyson <dyson@freebsd.org>
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 
Message-ID:  <1335.832813300@critter.tfs.com>
In-Reply-To: Your message of "Wed, 22 May 1996 17:46:04 MST." <199605230046.RAA16458@freefall.freebsd.org> 

next in thread | previous in thread | raw e-mail | index | archive | help

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.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1335.832813300>