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] Some things to be considered for ptc.ga emulation

To: "Xu, Anthony" <anthony.xu@xxxxxxxxx>, "Tian, Kevin" <kevin.tian@xxxxxxxxx>, <xen-ia64-devel@xxxxxxxxxxxxxxxxxxx>
Subject: Re: [Xen-ia64-devel] Some things to be considered for ptc.ga emulation
From: Tristan Gingold <Tristan.Gingold@xxxxxxxx>
Date: Fri, 7 Apr 2006 09:35:12 +0100
Delivery-date: Fri, 07 Apr 2006 01:31:25 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <2BF508F394C196468CCBEC031320DCDF3809B4@pdsmsx405>
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: <2BF508F394C196468CCBEC031320DCDF3809B4@pdsmsx405>
Sender: xen-ia64-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: KMail/1.5
Le Vendredi 07 Avril 2006 10:07, Xu, Anthony a écrit :
> > Tristan Gingold
> >Sent: 2006?4?6? 15:28
> >+void vhpt_flush_address_remote(int cpu,
> >+                           unsigned long vadr, unsigned long addr_range)
> >+{
> >+    while ((long)addr_range > 0) {
> >+            /* Get the VHPT entry.  */
> >+            unsigned int off = ia64_thash(vadr) - VHPT_ADDR;
> >+            volatile struct vhpt_lf_entry *v;
> >+            v =__va(per_cpu(vhpt_paddr, cpu) + off);
> >+            v->ti_tag = INVALID_TI_TAG;
> >             addr_range -= PAGE_SIZE;
> >             vadr += PAGE_SIZE;
> >     }
>
> I have a concern about this,
> This method seems be Ok if only modifying v->ti_tag, which is an atomic
> operation on bus.
> The possible optimization maybe check tag before setting it to invalid,
> (this is unreasonable to purge a irrelevant tlb mapping)
> There is a time between checking tag and setting it to invalid, this may
> cause race condition.
The race is we don't invalidate while we had to.  This means a ptc.ga is 
concurrent to an itc.
For me there is no race: the itc wins.  Of course, it may loose to do the cpu 
itc, but it doesn't matter.

Tristan.



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