From owner-freebsd-hackers@FreeBSD.ORG Thu Feb 20 09:00:59 2014 Return-Path: Delivered-To: freebsd-hackers@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 50774F9A for ; Thu, 20 Feb 2014 09:00:59 +0000 (UTC) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 9B0AF1618 for ; Thu, 20 Feb 2014 09:00:58 +0000 (UTC) Received: from porto.starpoint.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id LAA06032; Thu, 20 Feb 2014 11:00:49 +0200 (EET) (envelope-from avg@FreeBSD.org) Received: from localhost ([127.0.0.1]) by porto.starpoint.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1WGPUv-000OuA-Hb; Thu, 20 Feb 2014 11:00:49 +0200 Message-ID: <5305C404.8010601@FreeBSD.org> Date: Thu, 20 Feb 2014 10:59:48 +0200 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 MIME-Version: 1.0 To: George Kola , freebsd-hackers@FreeBSD.org Subject: Re: Question about ZFS arc cache and page cache References: In-Reply-To: X-Enigmail-Version: 1.6 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Feb 2014 09:00:59 -0000 on 20/02/2014 03:29 George Kola said the following: > I have a question about what happens when a file on a ZFS filesystem is mmaped into memory. I traced it on illumos and found that the file pages made it into the ARC cache and then I got a copy of it in page cache which was then mapped to my address space. Another process mapping the same file got the same page from the page cache. (I used mdb and converting virtual address to physical address to see if the pages were the same) . > I was wondering if FreeBSD does the same copy or if the physical pages in ARC can be used for mmap without requiring a copy. The reason for this question is that we are currently on illumos and are considering moving to FreeBSD and are evaluating the pros and cons. On FreeBSD the behavior is exactly the same in this respect. -- Andriy Gapon