xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Chao Gao <chao.gao@intel.com>
To: Jan Beulich <JBeulich@suse.com>
Cc: Andrew Cooper <andrew.cooper3@citrix.com>,
	Xuquan <xuquan8@huawei.com>,
	osstest-admin@xenproject.org, Kevin Tian <kevin.tian@intel.com>,
	xen-devel <xen-devel@lists.xenproject.org>
Subject: Re: [xen-unstable test] 106504: regressions - FAIL
Date: Wed, 5 Apr 2017 09:49:49 +0800	[thread overview]
Message-ID: <20170405014949.GA11738@skl-2s3.sh.intel.com> (raw)
In-Reply-To: <58E4BD66020000780014D04C@prv-mh.provo.novell.com>

On Wed, Apr 05, 2017 at 01:48:22AM -0600, Jan Beulich wrote:
>>>> On 05.04.17 at 01:57, <chao.gao@intel.com> wrote:
>> On Wed, Mar 22, 2017 at 06:47:33AM -0600, Jan Beulich wrote:
>> 
>> Hi, Jan.
>> 
>> I plan to do the following changes:
>> 1. get the vector set in vIRR to avoid getting a wrong interrupt vector
>>  I think there are two appoaches. One is to extend hvm_isa_irq_assert()
>>  to return the vector set in vIRR. Several functions in call trees are
>>  also involved. The other is to make vIOAPIC support disabling
>>  write operations to RTE. In this case, a rwlock_t is introduced to 
>>  protect RTE. pt_update_irq() will disable write operations
>>  at first, then get the vector and assert the vector, at last enable
>>  write operations. Which one do you think is better?
>
>That's hard to tell without seeing the changes each actually involves.
>On the surface I'd probably prefer the 2nd, provided the locking can
>be got into a shape where there's no meaningful risk of missing an
>unlock on some path.

Thanks your opinion. I will try to add the lock.

>
>> 2. let pt_update_irq() pass the periodic timer
>>  whose interrupt is to be injected to vmx_intr_assit() which
>>  in turn can pass it to pt_intr_post(). After this, pt_intr_post()
>>  needn't search the periodic timer that matches the interrupt has
>>  been injected. Through this, we can avoid reading the RTE there.
>
>If the RTE can't be changed behind your back, why would you
>need this?

Yes. With the first change described above, the second change is needless
theoretically. But If the lock is acquired in vmx_intr_assist(), the lock is
also acquired in major cases (using LAPIC timer) in which getting lock is
useless.  If the lock is acquired in pt_update_irq(), it would better be
released there. Thus the lock can't protect pt_intr_post(). Also the second
change would reduce the time spends in locked region. I am worried about adding
a lock here (very critical path) may hurt the performance.

Also I admit making this change should be very careful. Changing less decreases
the possibility of introducing errors.

Thanks
Chao

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

  reply	other threads:[~2017-04-05  8:52 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-07  5:52 [xen-unstable test] 106504: regressions - FAIL osstest service owner
2017-03-07  9:16 ` Jan Beulich
2017-03-07  4:24   ` Chao Gao
2017-03-07 14:11     ` Jan Beulich
2017-03-22  4:53       ` Chao Gao
2017-03-22 12:47         ` Jan Beulich
2017-03-22  6:13           ` Chao Gao
2017-03-22 13:40             ` Jan Beulich
2017-03-29  3:28             ` Xuquan (Quan Xu)
2017-03-28 20:48               ` Chao Gao
2017-03-24  7:48           ` Tian, Kevin
2017-03-24  8:17             ` Jan Beulich
2017-03-24  8:25               ` Tian, Kevin
     [not found]               ` <AADFC41AFE54684AB9EE6CBC0274A5D190C7CFB9@SHSMSX101.ccr.corp.intel.com>
2017-03-24  8:49                 ` Tian, Kevin
2017-03-24  9:00               ` Andrew Cooper
2017-04-04 23:57           ` Chao Gao
2017-04-05  7:48             ` Jan Beulich
2017-04-05  1:49               ` Chao Gao [this message]
2017-04-07  8:56             ` Xuquan (Quan Xu)
2017-03-08  3:16     ` Xuquan (Quan Xu)

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=20170405014949.GA11738@skl-2s3.sh.intel.com \
    --to=chao.gao@intel.com \
    --cc=JBeulich@suse.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=kevin.tian@intel.com \
    --cc=osstest-admin@xenproject.org \
    --cc=xen-devel@lists.xenproject.org \
    --cc=xuquan8@huawei.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).