[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-ia64-devel] Some things to be considered for ptc.ga emulation
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
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |