All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Jan Beulich" <JBeulich@suse.com>
To: Feng Wu <feng.wu@intel.com>
Cc: kevin.tian@intel.com, keir@xen.org, george.dunlap@eu.citrix.com,
	andrew.cooper3@citrix.com, xen-devel@lists.xen.org,
	yang.z.zhang@intel.com
Subject: Re: [RFC v2 11/15] vmx: Add a global wake-up vector for VT-d Posted-Interrupts
Date: Tue, 09 Jun 2015 16:20:26 +0100	[thread overview]
Message-ID: <5577205A0200007800082BFB@mail.emea.novell.com> (raw)
In-Reply-To: <1431076038-7497-12-git-send-email-feng.wu@intel.com>

>>> On 08.05.15 at 11:07, <feng.wu@intel.com> wrote:
> @@ -3262,6 +3271,28 @@ void vmx_vmenter_helper(const struct cpu_user_regs *regs)
>  }
>  
>  /*
> + * Handle VT-d posted-interrupt when VCPU is blocked.
> + */
> +void pi_wakeup_interrupt(struct cpu_user_regs *regs)

static (and perhaps move it up so you don't need to forward declare it).

> +{
> +    struct vcpu *v;
> +    unsigned int cpu = smp_processor_id();
> +
> +    spin_lock(&per_cpu(blocked_vcpu_lock, cpu));
> +    list_for_each_entry(v, &per_cpu(blocked_vcpu, cpu),
> +                    blocked_vcpu_list) {

How long do you think such a list can grow? I'm afraid you might
be adding quite a bit of latency here to the system.

> +        struct pi_desc *pi_desc = &v->arch.hvm_vmx.pi_desc;
> +
> +        if ( pi_desc->on == 1 )

Isn't this a single-bit (i.e. boolean) field? In which case - no reason
to compare with 1.

I also don't see the value of the local variable - it's being used only
once, and without it the line wouldn't get overly long or unreadable.

> --- a/xen/include/xen/sched.h
> +++ b/xen/include/xen/sched.h
> @@ -148,6 +148,8 @@ struct vcpu
>  
>      struct vcpu     *next_in_list;
>  
> +    struct list_head blocked_vcpu_list;

Again - why here instead of in VT-d/VMX specific structures?

Jan

  reply	other threads:[~2015-06-09 15:20 UTC|newest]

Thread overview: 61+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-08  9:07 [RFC v2 00/15] Add VT-d Posted-Interrupts support Feng Wu
2015-05-08  9:07 ` [RFC v2 01/15] Vt-d Posted-intterrupt (PI) design Feng Wu
2015-05-08  9:07 ` [RFC v2 02/15] iommu: Add iommu_intpost to control VT-d Posted-Interrupts feature Feng Wu
2015-06-09 14:10   ` Jan Beulich
2015-05-08  9:07 ` [RFC v2 03/15] vt-d: VT-d Posted-Interrupts feature detection Feng Wu
2015-06-09 14:15   ` Jan Beulich
2015-05-08  9:07 ` [RFC v2 04/15] vmx: Extend struct pi_desc to support VT-d Posted-Interrupts Feng Wu
2015-06-09 14:17   ` Jan Beulich
2015-05-08  9:07 ` [RFC v2 05/15] vmx: Initialize VT-d Posted-Interrupts Descriptor Feng Wu
2015-06-09 14:20   ` Jan Beulich
2015-05-08  9:07 ` [RFC v2 06/15] vt-d: Extend struct iremap_entry to support VT-d Posted-Interrupts Feng Wu
2015-06-09 14:25   ` Jan Beulich
2015-06-16  6:18     ` Wu, Feng
2015-06-16  7:48       ` Jan Beulich
2015-05-08  9:07 ` [RFC v2 07/15] vt-d: Add API to update IRTE when VT-d PI is used Feng Wu
2015-06-09 14:32   ` Jan Beulich
2015-06-12  9:40     ` Wu, Feng
2015-06-12 10:33       ` Jan Beulich
2015-06-10  6:17   ` Jan Beulich
2015-06-12  9:40     ` Wu, Feng
2015-06-12 10:34       ` Jan Beulich
2015-05-08  9:07 ` [RFC v2 08/15] Update IRTE according to guest interrupt config changes Feng Wu
2015-06-09 15:06   ` Jan Beulich
2015-06-16  8:08     ` Wu, Feng
2015-06-16  8:17       ` Jan Beulich
2015-05-08  9:07 ` [RFC v2 09/15] Add a new per-vCPU tasklet to wakeup the blocked vCPU Feng Wu
2015-06-09 15:08   ` Jan Beulich
2015-06-12  9:40     ` Wu, Feng
2015-06-12 10:41       ` Jan Beulich
2015-05-08  9:07 ` [RFC v2 10/15] vmx: Define two per-cpu variables Feng Wu
2015-06-09 15:12   ` Jan Beulich
2015-05-08  9:07 ` [RFC v2 11/15] vmx: Add a global wake-up vector for VT-d Posted-Interrupts Feng Wu
2015-06-09 15:20   ` Jan Beulich [this message]
2015-06-12  9:40     ` Wu, Feng
2015-06-12 10:44       ` Jan Beulich
2015-05-08  9:07 ` [RFC v2 12/15] vmx: Properly handle notification event when vCPU is running Feng Wu
2015-06-09 16:12   ` Jan Beulich
2015-05-08  9:07 ` [RFC v2 13/15] Update Posted-Interrupts Descriptor during vCPU scheduling Feng Wu
2015-06-10  6:43   ` Jan Beulich
2015-06-16  0:17     ` Wu, Feng
2015-06-16  7:53       ` Jan Beulich
2015-06-16  8:13         ` Wu, Feng
2015-06-16  8:29           ` Jan Beulich
2015-06-16  8:56             ` Wu, Feng
2015-06-16  9:24               ` Jan Beulich
2015-06-17  6:52                 ` Wu, Feng
2015-06-17  6:54     ` Wu, Feng
2015-06-17  7:56       ` Jan Beulich
2015-06-17  8:46         ` Wu, Feng
2015-06-17  8:59           ` Jan Beulich
2015-06-17  9:14             ` Wu, Feng
2015-06-17  7:00     ` Wu, Feng
2015-06-17  7:59       ` Jan Beulich
2015-05-08  9:07 ` [RFC v2 14/15] Suppress posting interrupts when 'SN' is set Feng Wu
2015-06-10  6:48   ` Jan Beulich
2015-05-08  9:07 ` [RFC v2 15/15] Add a command line parameter for VT-d posted-interrupts Feng Wu
2015-06-10  6:52   ` Jan Beulich
2015-05-13  5:11 ` [RFC v2 00/15] Add VT-d Posted-Interrupts support Wu, Feng
2015-05-13  6:50   ` Jan Beulich
2015-05-13  7:04     ` Wu, Feng
2015-05-18  5:33 ` Tian, Kevin

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=5577205A0200007800082BFB@mail.emea.novell.com \
    --to=jbeulich@suse.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=feng.wu@intel.com \
    --cc=george.dunlap@eu.citrix.com \
    --cc=keir@xen.org \
    --cc=kevin.tian@intel.com \
    --cc=xen-devel@lists.xen.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.