All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dario Faggioli <dario.faggioli@citrix.com>
To: "JBeulich@suse.com" <JBeulich@suse.com>
Cc: "xen-devel@lists.xenproject.org" <xen-devel@lists.xenproject.org>,
	George Dunlap <George.Dunlap@citrix.com>
Subject: Re: [PATCH] credit: generalize __vcpu_has_soft_affinity()
Date: Wed, 4 Mar 2015 12:08:28 +0000	[thread overview]
Message-ID: <1425470906.2614.41.camel@citrix.com> (raw)
In-Reply-To: <54F6DB6602000078000660F3@mail.emea.novell.com>


[-- Attachment #1.1: Type: text/plain, Size: 876 bytes --]

On Wed, 2015-03-04 at 09:16 +0000, Jan Beulich wrote:
> --- a/xen/common/sched_credit.c
> +++ b/xen/common/sched_credit.c
> @@ -292,11 +292,9 @@ __runq_remove(struct csched_vcpu *svc)
>  static inline int __vcpu_has_soft_affinity(const struct vcpu *vc,
>                                             const cpumask_t *mask)
>  {
> -    if ( cpumask_full(vc->cpu_soft_affinity)
> -         || !cpumask_intersects(vc->cpu_soft_affinity, mask) )
> -        return 0;
> -
> -    return 1;
> +    return !cpumask_subset(&cpu_online_map, vc->cpu_soft_affinity) &&
>
This can use VCPU2ONLINE(vc). Or do you think the impact of one more if
(the ?: in cpupool_online_cpumask) would be too much?

> +           !cpumask_subset(vc->cpu_soft_affinity, vc->cpu_hard_affinity) &&
> +           cpumask_intersects(vc->cpu_soft_affinity, mask);
>  }
>  

Regards,
Dario

[-- Attachment #1.2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 181 bytes --]

[-- Attachment #2: Type: text/plain, Size: 126 bytes --]

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

  reply	other threads:[~2015-03-04 12:08 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-04  9:16 [PATCH] credit: generalize __vcpu_has_soft_affinity() Jan Beulich
2015-03-04 12:08 ` Dario Faggioli [this message]
2015-03-04 12:53   ` Jan Beulich

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=1425470906.2614.41.camel@citrix.com \
    --to=dario.faggioli@citrix.com \
    --cc=George.Dunlap@citrix.com \
    --cc=JBeulich@suse.com \
    --cc=xen-devel@lists.xenproject.org \
    /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.