From mboxrd@z Thu Jan 1 00:00:00 1970 From: Anthony Liguori Subject: Re: [kvm-devel] [RFC PATCH 1/5] lguest: mmap backing file Date: Thu, 20 Mar 2008 09:04:17 -0500 Message-ID: <47E26EE1.5030706@codemonkey.ws> References: <200803201659.14344.rusty@rustcorp.com.au> <200803201705.44422.rusty@rustcorp.com.au> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Cc: kvm-devel , lguest , virtualization-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org To: Rusty Russell Return-path: In-Reply-To: <200803201705.44422.rusty-8n+1lVoiYb80n/F98K4Iww@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: lguest-bounces+glkvl-lguest=m.gmane.org-mnsaURCQ41sdnm+yROfE0A@public.gmane.org Errors-To: lguest-bounces+glkvl-lguest=m.gmane.org-mnsaURCQ41sdnm+yROfE0A@public.gmane.org List-Id: kvm.vger.kernel.org Rusty Russell wrote: > From: Paul TBBle Hampson > > This creates a file in $HOME/.lguest/ to directly back the RAM and DMA memory > mappings created by map_zeroed_pages. > I created a test program recently that measured the latency of a reads/writes to an mmap() file in /dev/shm and in a normal filesystem. Even after unlinking the underlying file, the write latency was much better with a mmap()'d file in /dev/shm. /dev/shm is not really for general use. I think we'll want to have our own tmpfs mount that we use to create VM images. I also prefer to use a unix socket for communication, unlink the file immediately after open, and then pass the fd via SCM_RIGHTS to the other process. Regards, Anthony Liguori