[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [Xen-devel] TPR write optimization (even improves 2003 sp2)


  • To: "Keir Fraser" <keir.fraser@xxxxxxxxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxx>
  • From: "James Harper" <james.harper@xxxxxxxxxxxxxxxx>
  • Date: Wed, 7 Jan 2009 23:35:29 +1100
  • Cc:
  • Delivery-date: Wed, 07 Jan 2009 04:35:56 -0800
  • List-id: Xen developer discussion <xen-devel.lists.xensource.com>
  • Thread-index: AclwbQESFc81qMn2SR2vAjv2yU5MgQABpemAAAyUQdEAAFfuQAAAdgGuAAA1Q7AAAPb/BAAAN9OgAADpQpkABCI/MA==
  • Thread-topic: [Xen-devel] TPR write optimization (even improves 2003 sp2)

> > From memory, there is a register somewhere that says what the
highest
> > interrupt level that is currently blocked is... I'll look at that.
This
> > doesn't actually sound that hard...
> 
> An interrupt is delivered if:
>   highest_prio(IRR) > max(highest_prio(ISR), TPR).
> 
> Where highest_prio() is based on a backwards bitmap scan.
> 
> If you go down the route of setting a TPR threshold for vmexit, that
would
> be (hp = highest_prio):
>   TPR_thresh = ((hp(IRR) > hp(ISR)) && (hp(IRR) < TPR)) ? hp(IRR) : 0
> 
> Where VMEXIT occurs if TPR is updated to a value less than the
threshold.
> 

I really need to get xentrace working... if there are lots of reads and
writes to the IRR and ISR registers that all involve VMEXIT's then it
may well be worth mapping the entire APIC register range into the DomU's
memory space (somehow).

Otherwise I can make sure that each write to IRR and ISR (by xen or
domU) gets echo's into DomU's memory in such a form that I can calculate
the value of TPR_thresh that you have given above in my kernel patch and
VMEXIT when necessary from there...

I think I should figure out why xentrace isn't telling me what I want to
know as there are too many conditionals at the moment to know what the
right solution is...

James


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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.