From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: mmu notifiers Date: Sun, 13 Jan 2008 14:28:08 +0200 Message-ID: <478A03D8.9050308@qumranet.com> References: <20080109181908.GS6958@v2.random> <47860512.3040607@qumranet.com> <47891A5C.8060907@qumranet.com> <20080113120939.GA3221@sgi.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org, linux-mm-Bw31MaZKKs3YtjvyW6yDsg@public.gmane.org, Daniel J Blueman , Andrea Arcangeli , Christoph Lameter To: Robin Holt Return-path: In-Reply-To: <20080113120939.GA3221-sJ/iWh9BUns@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: kvm-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org Errors-To: kvm-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org List-Id: kvm.vger.kernel.org Robin Holt wrote: > On Sat, Jan 12, 2008 at 09:51:56PM +0200, Avi Kivity wrote: > >> Christoph Lameter wrote: >> >>> On Thu, 10 Jan 2008, Avi Kivity wrote: >>> >>> >>> >>>> Actually sharing memory is possible even without this patch; one simply >>>> mmap()s a file into the address space of both guests. Or are you >>>> referring to >>>> something else? >>>> >>>> >>> A file from where? If a file is read by two guests then they will have >>> distinct page structs. >>> >>> >>> >> Two kvm instances mmap() the file (from anywhere) into the guest address >> space. That memory is shared, and will be backed by the same page structs >> at the same offset. >> > > That sounds nice, but... > > For larger machine configurations, we have different memory access > capabilities. When a partition that is located close to the home node > of the memory accesses memory, it is normal access. When it is further > away, they get special access to the line. Before the shared line is > sent to the reading node, it is converted by the memory controller into > an exclusive request and the reading node is handed the only copy of > the line. If we gave a remote kernel access to the page, we would also > open the entire owning nodes page tables up to speculative references > which effectively would be viewed by hardware as cache-line contention. > > Additionally, we have needs beyond memory backed by files. Including > special devices which do not have struct pages at all (see mspec.c). > I don't understand. I was just explaining how kvm shares memory among guests (which does not require mmu notifiers); if you have some other configuration that can benefit from mmu notifiers, then, well, great. -- error compiling committee.c: too many arguments to function ------------------------------------------------------------------------- Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace