From owner-freebsd-arch@FreeBSD.ORG Sat Oct 20 19:35:00 2012 Return-Path: Delivered-To: freebsd-arch@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 495BCA73; Sat, 20 Oct 2012 19:35:00 +0000 (UTC) (envelope-from phk@phk.freebsd.dk) Received: from phk.freebsd.dk (phk.freebsd.dk [130.225.244.222]) by mx1.freebsd.org (Postfix) with ESMTP id EF71E8FC1C; Sat, 20 Oct 2012 19:34:59 +0000 (UTC) Received: from critter.freebsd.dk (critter-phk.freebsd.dk [192.168.48.2]) by phk.freebsd.dk (Postfix) with ESMTP id 37E253B762; Sat, 20 Oct 2012 19:34:58 +0000 (UTC) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.14.5/8.14.5) with ESMTP id q9KJYuSL092743; Sat, 20 Oct 2012 19:34:57 GMT (envelope-from phk@phk.freebsd.dk) To: Alan Cox Subject: Re: Behavior of madvise(MADV_FREE) In-reply-to: <5082F0F3.1070102@rice.edu> From: "Poul-Henning Kamp" References: <9FEBC10C-C453-41BE-8829-34E830585E90@xcllnt.net> <4835.1350062021@critter.freebsd.dk> <5082F0F3.1070102@rice.edu> Date: Sat, 20 Oct 2012 19:34:56 +0000 Message-ID: <92742.1350761696@critter.freebsd.dk> Cc: Tim LaBerge , "freebsd-arch@freebsd.org Arch" , Jason Evans , Marcel Moolenaar X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Oct 2012 19:35:00 -0000 -------- In message <5082F0F3.1070102@rice.edu>, Alan Cox writes: >I'm sympathetic. Once upon a time, I was often called upon to explain >to network administrators why their idle web cache didn't have oodles of >"free" memory and how this wasn't a problem. You too ? :-) >I think that you're being a bit too pessimistic here. If your use case >really corresponds to "this memory is free and will not be reused (or >reallocated for a very long time)" Which brings me to a question I have wondered: Why not simply munmap(2) it until you need it again ? -- 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.