From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932275AbYBAMLA (ORCPT ); Fri, 1 Feb 2008 07:11:00 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1764482AbYBAMK2 (ORCPT ); Fri, 1 Feb 2008 07:10:28 -0500 Received: from relay1.sgi.com ([192.48.171.29]:55010 "EHLO relay.sgi.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1764355AbYBAMK0 (ORCPT ); Fri, 1 Feb 2008 07:10:26 -0500 Date: Fri, 1 Feb 2008 06:10:25 -0600 From: Robin Holt To: Christoph Lameter Cc: Andrea Arcangeli , Robin Holt , Avi Kivity , Izik Eidus , kvm-devel@lists.sourceforge.net, Peter Zijlstra , steiner@sgi.com, linux-kernel@vger.kernel.org, linux-mm@kvack.org, daniel.blueman@quadrics.com Subject: Re: Extending mmu_notifiers to handle __xip_unmap in a sleepable context? Message-ID: <20080201121024.GN26420@sgi.com> References: <20080201050439.009441434@sgi.com> <20080201115841.GM26420@sgi.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20080201115841.GM26420@sgi.com> User-Agent: Mutt/1.5.15+20070412 (2007-04-11) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Argh, Here is the correct one. Sorry On Fri, Feb 01, 2008 at 05:58:41AM -0600, Robin Holt wrote: > With this set of patches, I think we have enough to get xpmem working > with most types of mappings. In the past, we operated without any of > these callouts by significantly restricting why types of mappings could > remotely fault and what types of operations the user could do. With > this set, I am certain we can continue to meet the above assumptions. > > That said, I would like to discuss __xip_unmap in more detail. > > Currently, it is calling mmu_notifier _begin and _end under the > i_mmap_lock. I _THINK_ the following will make it so we could support > __xip_unmap (although I don't recall ever seeing that done on ia64 and > don't even know what the circumstances are for its use). Index: mmu_notifiers-cl-v5/mm/filemap_xip.c =================================================================== --- mmu_notifiers-cl-v5.orig/mm/filemap_xip.c 2008-02-01 05:38:32.000000000 -0600 +++ mmu_notifiers-cl-v5/mm/filemap_xip.c 2008-02-01 06:09:09.000000000 -0600 @@ -184,6 +184,10 @@ __xip_unmap (struct address_space * mapp if (!page) return; + if (unlikely(PageExternalRmap(page))) { + mmu_rmap_notifier(invalidate_page, page); + ClearPageExternalRmap(page); + } spin_lock(&mapping->i_mmap_lock); vma_prio_tree_foreach(vma, &iter, &mapping->i_mmap, pgoff, pgoff) { mm = vma->vm_mm; From mboxrd@z Thu Jan 1 00:00:00 1970 From: Robin Holt Subject: Re: Extending mmu_notifiers to handle __xip_unmap in a sleepable context? Date: Fri, 1 Feb 2008 06:10:25 -0600 Message-ID: <20080201121024.GN26420@sgi.com> References: <20080201050439.009441434@sgi.com> <20080201115841.GM26420@sgi.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: Andrea Arcangeli , Peter Zijlstra , linux-mm-Bw31MaZKKs3YtjvyW6yDsg@public.gmane.org, steiner-sJ/iWh9BUns@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Avi Kivity , kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org, daniel.blueman-xqY44rlHlBpWk0Htik3J/w@public.gmane.org, Robin Holt To: Christoph Lameter Return-path: Content-Disposition: inline In-Reply-To: <20080201115841.GM26420-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 Argh, Here is the correct one. Sorry On Fri, Feb 01, 2008 at 05:58:41AM -0600, Robin Holt wrote: > With this set of patches, I think we have enough to get xpmem working > with most types of mappings. In the past, we operated without any of > these callouts by significantly restricting why types of mappings could > remotely fault and what types of operations the user could do. With > this set, I am certain we can continue to meet the above assumptions. > > That said, I would like to discuss __xip_unmap in more detail. > > Currently, it is calling mmu_notifier _begin and _end under the > i_mmap_lock. I _THINK_ the following will make it so we could support > __xip_unmap (although I don't recall ever seeing that done on ia64 and > don't even know what the circumstances are for its use). Index: mmu_notifiers-cl-v5/mm/filemap_xip.c =================================================================== --- mmu_notifiers-cl-v5.orig/mm/filemap_xip.c 2008-02-01 05:38:32.000000000 -0600 +++ mmu_notifiers-cl-v5/mm/filemap_xip.c 2008-02-01 06:09:09.000000000 -0600 @@ -184,6 +184,10 @@ __xip_unmap (struct address_space * mapp if (!page) return; + if (unlikely(PageExternalRmap(page))) { + mmu_rmap_notifier(invalidate_page, page); + ClearPageExternalRmap(page); + } spin_lock(&mapping->i_mmap_lock); vma_prio_tree_foreach(vma, &iter, &mapping->i_mmap, pgoff, pgoff) { mm = vma->vm_mm; ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ From mboxrd@z Thu Jan 1 00:00:00 1970 Date: Fri, 1 Feb 2008 06:10:25 -0600 From: Robin Holt Subject: Re: Extending mmu_notifiers to handle __xip_unmap in a sleepable context? Message-ID: <20080201121024.GN26420@sgi.com> References: <20080201050439.009441434@sgi.com> <20080201115841.GM26420@sgi.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20080201115841.GM26420@sgi.com> Sender: owner-linux-mm@kvack.org Return-Path: To: Christoph Lameter Cc: Andrea Arcangeli , Robin Holt , Avi Kivity , Izik Eidus , kvm-devel@lists.sourceforge.net, Peter Zijlstra , steiner@sgi.com, linux-kernel@vger.kernel.org, linux-mm@kvack.org, daniel.blueman@quadrics.com List-ID: Argh, Here is the correct one. Sorry On Fri, Feb 01, 2008 at 05:58:41AM -0600, Robin Holt wrote: > With this set of patches, I think we have enough to get xpmem working > with most types of mappings. In the past, we operated without any of > these callouts by significantly restricting why types of mappings could > remotely fault and what types of operations the user could do. With > this set, I am certain we can continue to meet the above assumptions. > > That said, I would like to discuss __xip_unmap in more detail. > > Currently, it is calling mmu_notifier _begin and _end under the > i_mmap_lock. I _THINK_ the following will make it so we could support > __xip_unmap (although I don't recall ever seeing that done on ia64 and > don't even know what the circumstances are for its use). Index: mmu_notifiers-cl-v5/mm/filemap_xip.c =================================================================== --- mmu_notifiers-cl-v5.orig/mm/filemap_xip.c 2008-02-01 05:38:32.000000000 -0600 +++ mmu_notifiers-cl-v5/mm/filemap_xip.c 2008-02-01 06:09:09.000000000 -0600 @@ -184,6 +184,10 @@ __xip_unmap (struct address_space * mapp if (!page) return; + if (unlikely(PageExternalRmap(page))) { + mmu_rmap_notifier(invalidate_page, page); + ClearPageExternalRmap(page); + } spin_lock(&mapping->i_mmap_lock); vma_prio_tree_foreach(vma, &iter, &mapping->i_mmap, pgoff, pgoff) { mm = vma->vm_mm; -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org