Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1764169AbXJEUfu (ORCPT ); Fri, 5 Oct 2007 16:35:50 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1760724AbXJEUfm (ORCPT ); Fri, 5 Oct 2007 16:35:42 -0400 Received: from gw.goop.org ([64.81.55.164]:54276 "EHLO mail.goop.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1760057AbXJEUfl (ORCPT ); Fri, 5 Oct 2007 16:35:41 -0400 Message-ID: <4706A013.6080003@goop.org> Date: Fri, 05 Oct 2007 13:35:31 -0700 From: Jeremy Fitzhardinge User-Agent: Thunderbird 2.0.0.5 (X11/20070727) MIME-Version: 1.0 To: Keir Fraser CC: Hugh Dickins , Andrew Morton , David Rientjes , Zachary Amsden , Linus Torvalds , Rusty Russell , Jan Beulich , Andi Kleen , Ken Chen , Linux Kernel Mailing List Subject: Re: race with page_referenced_one->ptep_test_and_clear_young and pagetable setup/pulldown References: In-Reply-To: X-Enigmail-Version: 0.95.3 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 982 Lines: 21 Keir Fraser wrote: > The PREEMPT_BITS limitation is a good argument for at least taking the pte > locks in small batches though (small batches is preferable to one-by-one > since we will want to batch the make-readonly-and-pin hypercall requests to > amortise the cost of the hypervisor trap). Hm, I don't see how we can avoid holding locks for the whole pagetable at once. We need to hold the locks from between marking a particular pte page RO until the whole pagetable is pinned; if we don't, pte updates can come in from other cpus, which will fault on the RO but won't be fixed up by Xen. Could we avoid it by doing a series of partial pins, locking and unlocking each one in the process, and then pin the whole pagetable? J - 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/