From owner-freebsd-arch@FreeBSD.ORG Fri Oct 12 22:15:06 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 78172ECD for ; Fri, 12 Oct 2012 22:15:06 +0000 (UTC) (envelope-from jasone@freebsd.org) Received: from canonware.com (canonware.com [204.109.63.53]) by mx1.freebsd.org (Postfix) with ESMTP id 51ED98FC14 for ; Fri, 12 Oct 2012 22:15:06 +0000 (UTC) Received: from jemac.thefacebook.com (unknown [173.252.71.6]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by canonware.com (Postfix) with ESMTPSA id 3B35B2842D; Fri, 12 Oct 2012 15:05:24 -0700 (PDT) Subject: Re: Behavior of madvise(MADV_FREE) Mime-Version: 1.0 (Apple Message framework v1283) Content-Type: text/plain; charset=us-ascii From: Jason Evans In-Reply-To: Date: Fri, 12 Oct 2012 15:05:22 -0700 Content-Transfer-Encoding: quoted-printable Message-Id: References: <9FEBC10C-C453-41BE-8829-34E830585E90@xcllnt.net> <4835.1350062021@critter.freebsd.dk> To: Marcel Moolenaar X-Mailer: Apple Mail (2.1283) Cc: Poul-Henning Kamp , "freebsd-arch@freebsd.org Arch" , Tim LaBerge , Alan Cox 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: Fri, 12 Oct 2012 22:15:06 -0000 On Oct 12, 2012, at 1:54 PM, Marcel Moolenaar wrote: > BTW: MADV_DONTNEED in Linux seems to behave like MADV_FREE > in FreeBSD -- at least according to the manpage. Which makes > me wonder how standard madvise(2) is anyway. MADV_DONTNEED on Linux immediately dissociates the physical page from = the VM mapping, such that subsequent access results in a zero-filled = page being soft-faulted into place. MADV_FREE is *way* nicer than MADV_DONTNEED in the context of malloc. = jemalloc has a really discouraging amount of complexity that is directly = a result of working around the performance overhead of MADV_DONTNEED. Jason=