From owner-freebsd-hackers@FreeBSD.ORG Thu Feb 20 01:29:55 2014 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E05287CC for ; Thu, 20 Feb 2014 01:29:55 +0000 (UTC) Received: from mail-pa0-x232.google.com (mail-pa0-x232.google.com [IPv6:2607:f8b0:400e:c03::232]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id B69BA19B1 for ; Thu, 20 Feb 2014 01:29:55 +0000 (UTC) Received: by mail-pa0-f50.google.com with SMTP id kp14so1199752pab.9 for ; Wed, 19 Feb 2014 17:29:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:content-type:content-transfer-encoding:subject:message-id:date :to:mime-version; bh=k3TWaqWyhA3uJuIEjmXSVeOjE8g9AwS/kahl3OsdBB0=; b=UTDFcgWMMgHzfMWGjCI6axTT8iDQx0s7FkrgpVOFHuqUssKyAocg43shXbN+XPuiyh fgvpAbvJiXnSHBVBoyNby5dfUm/v1OREVB6AIneRDhtwzJ8sKF5VKBoxN7TL+YKgUmgF N8x0120E+ecjtzVesLvWV22ifFnAFxIE/CTI+U8cEXVaFNFxJEXfU1u5HUqMuZ6AS+Xw XzNAn/+d7m/29uNXRb1elUeWTI3qYde1KNDf2ED6IrbM7+qDvmkpXn0idjFjUdmun/2J 1RFuzpFfCixjKnJ9U5mflj8HVpaIoZnnV5WX4QMJrzmz+IWYrCrNVzsAQ8ulGBiXayPH gxtw== X-Received: by 10.69.31.235 with SMTP id kp11mr43212321pbd.36.1392859795385; Wed, 19 Feb 2014 17:29:55 -0800 (PST) Received: from [10.51.2.103] ([199.101.130.202]) by mx.google.com with ESMTPSA id yh4sm4964598pbb.19.2014.02.19.17.29.53 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 19 Feb 2014 17:29:54 -0800 (PST) From: George Kola Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Subject: Question about ZFS arc cache and page cache Message-Id: Date: Wed, 19 Feb 2014 17:29:52 -0800 To: freebsd-hackers@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 7.1 \(1827\)) X-Mailer: Apple Mail (2.1827) 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 01:29:55 -0000 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. Thanks, George