All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Jan Beulich" <JBeulich@suse.com>
To: Quan Xu <quan.xu@intel.com>, Yang Z Zhang <yang.z.zhang@intel.com>
Cc: "andrew.cooper3@citrix.com" <andrew.cooper3@citrix.com>,
	Kevin Tian <kevin.tian@intel.com>,
	DonaldD Dugger <donald.d.dugger@intel.com>,
	xen-devel <xen-devel@lists.xenproject.org>
Subject: Re: FW: VT-d async invalidation for Device-TLB.
Date: Tue, 16 Jun 2015 09:11:36 +0100	[thread overview]
Message-ID: <557FF658020000780008547F@mail.emea.novell.com> (raw)
In-Reply-To: <A9667DDFB95DB7438FA9D7D576C3D87E0AD07C68@SHSMSX104.ccr.corp.intel.com>

>>> On 16.06.15 at 09:59, <yang.z.zhang@intel.com> wrote:
> Jan Beulich wrote on 2015-06-16:
>>>>> On 16.06.15 at 05:07, <yang.z.zhang@intel.com> wrote:
>>> Jan Beulich wrote on 2015-06-15:
>>>>>>> On 13.06.15 at 16:44, <quan.xu@intel.com> wrote:
>>>>>> On 12.06.15 at 14:47, <JBeulich@suse.com> wrote:
>>>>>>>>> On 12.06.15 at 04:40, <quan.xu@intel.com> wrote:
>>>>>>> I tested it by a Myri-10G Dual-Protocol NIC, which is an ATS device.
>>>>>>> for an invalidation:
>>>>>>>  By sync way, it takes about 1.4 ms.
>>>>>>>  By async way, it takes about 4.3 ms.
>>> 
>>> It is a typo for the time: should be 1.4 us and 4.3 us.
>>> 
>>>>>> 
>>>>>> What's the theory on why this is? After all, it shouldn't matter
>>>>>> how the completion of the invalidation gets signaled.
>>>>>> 
>>>>> 
>>>>> Let me introduce more about how I get these test data.
>>>>> 
>>>>> For sync way, I get the time by NOW() macro, when I update Queue Tail
>>>>> Register  (qinval_update_qtail()). Then get time by NOW() macro in
>>>>> current spinning when it has wrote the value in the Status Data field
>>>>> to the address specified in the Status Address. The difference of
>>>>> these 2 value is the time of an sync invalidation.
>>>>> 
>>>>> 
>>>>> For async way, as the previous email, I have introduced the IF bit
>>>>> of Invalidation Wait Descriptor.
>>>>> (IF: Indicate the invalidation wait descriptor completion by
>>>>> generating an invalidation completion event per the programing of
>>>>> the Invalidation Completion Event Registers.) I have implemented
>>>>> an interrupt for invalidation completion event.
>>>>> Also I get the time by NOW() macro, when I update Queue Tail
>>>>> Register (by qinval_update_qtail()).
>>>>> Then get time by NOW() macro in invalidation completion event handler.
>>>>> The difference of these 2 value is the time of an async invalidation.
>>>> 
>>>> Okay, thanks for the explanation. As this includes the time it
>>>> takes to deliver and (partly) handle the interrupt, the difference
>>>> is of course within what one would expect (and also of what would
>>>> seem
>>> acceptable).
>>> 
>>> The time doesn't include the cost of handling of interrupt. We just
>>> record it at the entry of interrupt handler. So the cost should bigger
>>> than 4.3 us if taking the handing cost into consideration. And the
>>> costs will much bigger if there are more pass-through VMs runs. We can
>>> start from ATS case firstly. And apply it to non-ATS case later if the
>>> async approach doesn't hurt the performance.
>> 
>> In which case we're back to the question I raised originally: How do
>> you explain the time difference if the interrupt delivery overhead isn't 
> included?
> 
> which one? 1.4us for sync case and 4.3us for async case?

The difference between the two (i.e. why is the async variant
three times as long).

Jan

  reply	other threads:[~2015-06-16  8:11 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-03  7:49 VT-d async invalidation for Device-TLB Xu, Quan
2015-06-10  8:04 ` Jan Beulich
2015-06-12  2:40   ` Xu, Quan
2015-06-12  6:46     ` Jan Beulich
2015-06-13 14:44       ` FW: " Xu, Quan
2015-06-15  7:03         ` Jan Beulich
2015-06-16  3:07           ` Zhang, Yang Z
2015-06-16  7:55             ` Jan Beulich
2015-06-16  7:59               ` Zhang, Yang Z
2015-06-16  8:11                 ` Jan Beulich [this message]
2015-06-18  8:09                   ` Xu, Quan
2015-06-18  9:18                     ` Jan Beulich
2015-06-18 11:31                       ` Xu, Quan
2015-06-18 11:39                         ` Jan Beulich
2015-06-18 12:02                           ` Xu, Quan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=557FF658020000780008547F@mail.emea.novell.com \
    --to=jbeulich@suse.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=donald.d.dugger@intel.com \
    --cc=kevin.tian@intel.com \
    --cc=quan.xu@intel.com \
    --cc=xen-devel@lists.xenproject.org \
    --cc=yang.z.zhang@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.