From mboxrd@z Thu Jan 1 00:00:00 1970 From: Keir Fraser Subject: Re: Fwd: Re: struct page field arrangement Date: Thu, 01 Mar 2007 12:12:13 +0000 Message-ID: References: <45E6CB06.76E4.0078.0@novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <45E6CB06.76E4.0078.0@novell.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Jan Beulich , Keir Fraser Cc: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org On 1/3/07 11:45, "Jan Beulich" wrote: >> Can we confident that the mm_pin/mm_unpin code (which walks pagetables and >> has to find every page to make every one read-only or writable) is safe? >> Presumably for this to be true we need to be sure that noone can meanwhile >> concurrently be populating the pagetable we are walking with extra >> pgds/puds/pmds/ptes... > > Since the pin/unpin walking only cares about pgd/pud/pmd entries, > synchronization > is guaranteed through mm->page_table_lock. The pte lock is used only for leaf > entries, which are of no concern to (un)pinning. Oh yes, of course. By the way, I think your proposed patch looks okay. However we already use page->index for foreign pages, in netback. Perhaps page->lru is also fair game? :-) K.