Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1760271AbYBABs3 (ORCPT ); Thu, 31 Jan 2008 20:48:29 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754372AbYBABsV (ORCPT ); Thu, 31 Jan 2008 20:48:21 -0500 Received: from relay2.sgi.com ([192.48.171.30]:60930 "EHLO relay.sgi.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1754309AbYBABsU (ORCPT ); Thu, 31 Jan 2008 20:48:20 -0500 Date: Thu, 31 Jan 2008 17:48:19 -0800 (PST) From: Christoph Lameter X-X-Sender: clameter@schroedinger.engr.sgi.com To: Andrea Arcangeli cc: 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: mmu_notifier: close hole in fork In-Reply-To: <20080201000158.GT7185@v2.random> Message-ID: References: <20080131045750.855008281@sgi.com> <20080131045812.785269387@sgi.com> <20080131123118.GK7185@v2.random> <20080201000158.GT7185@v2.random> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1088 Lines: 30 On Fri, 1 Feb 2008, Andrea Arcangeli wrote: > Good catch! This was missing also in my #v5 (KVM doesn't need that > because the only possible cows on sptes can be generated by ksm, but > it would have been a problem for GRU). The more I think about it, the How do you think the GRU should know when to drop the refcount? There is no page table and thus no way of tracking that a refcount was taken. Without the refcount you cannot defer the freeing of the page. So shootdown on invalidate_range_begin and lock out until invalidate_range_end seems to be the only workable solution. BTW what do you think about adding a flag parameter to the invalidate calls that allows shooting down writable ptes only? That could be useful for COW and page_mkclean. So #define MMU_ATOMIC 1 #define MMU_WRITABLE 2 insted of the atomic parameter? -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/