From mboxrd@z Thu Jan 1 00:00:00 1970 From: Shao Miller Subject: Shared Memory Pages for Same Base Device Date: Sat, 20 Sep 2014 11:50:23 -0400 Message-ID: <541DA23F.6000003@treefrog.ca> Reply-To: device-mapper development Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============5090571618278986678==" Return-path: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dm-devel-bounces@redhat.com Errors-To: dm-devel-bounces@redhat.com To: dm-devel@redhat.com List-Id: dm-devel.ids This is a multi-part message in MIME format. --===============5090571618278986678== Content-Type: multipart/alternative; boundary="------------090100080907070603020005" This is a multi-part message in MIME format. --------------090100080907070603020005 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Good day to all. If I've some block device "base" and I've two derived device-mapper devices "derived1" and "derived2" that are copy-on-write layers over top of that base, and I mount the filesystems on those derived block devices and run the same program "foo" from both, does the "foo" running from "derived1" share any [read and execute] memory pages with the "foo" running from "derived2", since the underlying sectors are both from the same position on "base"? The more general question would be about mmap, but I hope this example is clear. "Docker"[1] uses device-mapper in scenarios like the above example and I'm curious if they benefit from shared pages. [1] https://www.docker.com/ -- Shao Miller /Network Technician/ /905-836-4442 *ext: 112*/ www.treefrog.ca/shao-miller * * /*Treefrog Inc.*/ 905-836-4442 567 Davis Drive, Newmarket, ON www.treefrog.ca - @Treefrog --------------090100080907070603020005 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Good day to all.

If I've some block device "base" and I've two derived device-mapper devices "derived1" and "derived2" that are copy-on-write layers over top of that base, and I mount the filesystems on those derived block devices and run the same program "foo" from both, does the "foo" running from "derived1" share any [read and execute] memory pages with the "foo" running from "derived2", since the underlying sectors are both from the same position on "base"?

The more general question would be about mmap, but I hope this example is clear.  "Docker"[1] uses device-mapper in scenarios like the above example and I'm curious if they benefit from shared pages.

[1] https://www.docker.com/
--

Shao Miller
Network Technician
905-836-4442 ext: 112
www.treefrog.ca/shao-miller

Treefrog Inc.
905-836-4442
567 Davis Drive, Newmarket, ON
www.treefrog.ca - @Treefrog


--------------090100080907070603020005-- --===============5090571618278986678== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline --===============5090571618278986678==--