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-ia64-devel

Re: [Xen-ia64-devel] [PATCH] [RFC] domU destroy & page ref counter [2/2]

To: Masaki Kanno <kanno.masaki@xxxxxxxxxxxxxx>
Subject: Re: [Xen-ia64-devel] [PATCH] [RFC] domU destroy & page ref counter [2/2]
From: Isaku Yamahata <yamahata@xxxxxxxxxxxxx>
Date: Mon, 6 Mar 2006 17:36:20 +0900
Cc: xen-ia64-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Mon, 06 Mar 2006 08:36:53 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <200603021203.AA02333@xxxxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-ia64-devel-request@lists.xensource.com?subject=help>
List-id: Discussion of the ia64 port of Xen <xen-ia64-devel.lists.xensource.com>
List-post: <mailto:xen-ia64-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ia64-devel>, <mailto:xen-ia64-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ia64-devel>, <mailto:xen-ia64-devel-request@lists.xensource.com?subject=unsubscribe>
References: <200603021203.AA02333@xxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-ia64-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.4.2.1i

The below hunk should be 
+    while(unlikely(y = cmpxchg((u64*)&page->count_info, x, nx) != x) );
                                                                   ^^
(unlikely's closing paren)
I didn't check how different the compile result was, though.


 /* count_info and ownership are checked atomically. */
 static inline int get_page(struct page_info *page,
                            struct domain *domain)
 {
-#ifdef VALIDATE_VT
     u64 x, nx, y = *((u64*)&page->count_info);
     u32 _domain = pickle_domptr(domain);
 
@@ -172,14 +177,13 @@ static inline int get_page(struct page_i
            return 0;
        }
     }
-    while(unlikely(y = cmpxchg(&page->count_info, x, nx)) != x);
-#endif
+    while(unlikely(y = cmpxchg((u64*)&page->count_info, x, nx)) != x);
     return 1;
 }




On Thu, Mar 02, 2006 at 09:03:28PM +0900, Masaki Kanno wrote:
> Hi all,
> 
> We show below a summary of this patch. Please review this patch,
> and give us comment.
> 
> SUMMARY:
> diff -r b4f1084177cc xen/arch/ia64/xen/xenmisc.c
>       @@ -147,12 +147,17 @@ void init_percpu_info(void)
>       /****   only declare free_page_type() because 
>               put_page_type() is used ****/
>       /****   only declare alloc_page_type() because 
>               get_page_type() is used ****/
> 
>       @@ -415,3 +420,203 @@ void sync_split_caches(void)
>       /****   MEMLOG: porting from x86 becase 
>               get_page_type() is used ****/
>       /****   cleanup_writable_pagetable: only declare 
>               because get_page_type() is used ****/
>       /****   put_page_type: port from x86 as-is ****/
>       /****   get_page_type: port from x86 as-is ****/
> 
> diff -r b4f1084177cc xen/include/asm-ia64/mm.h
>       @@ -41,32 +41,33 @@ struct page
>       /****   struct page: moving the following place 
>               for avoiding non-alignment falut 
>               (the same as x86) ****/
>       /****   struct page: packed for alignment of 
>               cout_info and _domain (the same as x86) ****/
> 
>       @@ -94,8 +95,15 @@ struct page
>       /****   struct page: port from x86 as-is ****/
> 
>       @@ -138,7 +146,6 @@ extern unsigned long gmfn_to_mfn_foreign
>       /****   put_page(): delete #ifdef VALIDATE_VT ****/
> 
>       @@ -149,14 +156,12 @@ static inline void put_page(struct page_
>       /****   get_page(): delete #ifdef VALIDATE_VT ****/
> 
>       @@ -172,14 +177,13 @@ static inline int get_page(struct page_i
>       /****   get_page(): adding cast u64 due to use 
>               8byte cmpxchg ****/
> 
> Signed-off-by: Akio Takebe <takebe_akio@xxxxxxxxxxxxxx>
> Signed-off-by: Masaki Kanno <kanno.masaki@xxxxxxxxxxxxxx>
> 
> Best regards,
>  Kan, and Fujitsu team
> 


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

-- 
yamahata

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

<Prev in Thread] Current Thread [Next in Thread>