WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] Re: [PATCH] Fix performance problems with mprotect()

To: "Andi Kleen" <andi@xxxxxxxxxxxxxx>
Subject: [Xen-devel] Re: [PATCH] Fix performance problems with mprotect()
From: "Bruce Rogers" <BROGERS@xxxxxxxxxx>
Date: Mon, 07 Jan 2008 09:16:40 -0700
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Mon, 07 Jan 2008 08:17:19 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <p73d4sdsly4.fsf@xxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <477EAC09.5C6B.0048.1@xxxxxxxxxx><477EAC09.5C6B.0048.1@xxxxxxxxxx> (Bruce Rogers's message of "Fri\, 04 Jan 2008 21\:49\:41 -0700") <p73d4sdsly4.fsf@xxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
I'm not sure how this BUG_ON would get triggered with current x86 paging 
semantics, and probably isn't needed I think.
Am I missing something?
The code is almost exactly the same as the existing update_intpte, which has 
the same BUG_ON, and so I just left it in.
(BTW:I considered merging the new functions into the non "sync" versions but 
opted not to.)

- Bruce

>>> On 1/7/2008 at 8:18 AM, in message <p73d4sdsly4.fsf@xxxxxxxxxxxxxx>, Andi 
>>> Kleen
<andi@xxxxxxxxxxxxxx> wrote:
> "Bruce Rogers" <brogers@xxxxxxxxxx> writes:
>> +
>> +        /* Allowed to change in Accessed/Dirty flags only. */
>> +        BUG_ON((t ^ old) & ~(intpte_t)(_PAGE_ACCESSED|_PAGE_DIRTY));
> 
> 
> Are you sure that BUG_ON can't be triggered from the hypercall?
> It should error out in this case I think.
> 
> -Andi


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel