All of lore.kernel.org
 help / color / mirror / Atom feed
* Questions / Comments about hard / soft affinity in Credit 2
@ 2013-12-10  8:08 Justin Weaver
  2013-12-10  8:14 ` Fwd: " Justin Weaver
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Justin Weaver @ 2013-12-10  8:08 UTC (permalink / raw)
  To: xen-devel; +Cc: george.dunlap, Dario Faggioli, esb, Henri Casanova


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

Hello,

On Sat, Nov 30, 2013 at 10:18 PM, Dario Faggioli
<dario.faggioli@citrix.com>wrote:

> I'll have to re-look at the details of credit2 about load balance and
> migration between CPUs/runqueues but it looks like we need to have
> something allowing us to honour pinning/affinity _within_ the same
> runqueue, anyway, don't we? I mean, even if you implement per-L2
> runqueues, that would still span more than one CPU, and the user may
> well want to pin a vCPU to only one (or in general a subset) of them.


Yes, I agree. Just looking for some feedback before I attempt a patch. Some
of the functions I think need updating for hard/soft affinity...

runq_candidate needs to be updated. It decides which vcpu from the run
queue to run next on a given pcpu. Currently it only takes credit into
account. Considering hard affinity should be simple enough. For soft, what
if it first looked through the run queue in credit order at only vcpus that
prefer to run on the given processor and had a certain amount of credit,
and if none were found it then considered the whole run queue considering
only hard affinity and credit?

runq_assign assumes that the run queue associated with vcpu->processor is
OK for vcpu to run on. If considering affinity, I'm not sure if that can be
assumed. I probably need to dig further into schedule.c to see where
vcpu->processor is being assigned initially. Anyway, with only one run
queue this doesn't matter for now.

choose_cpu / migrate will need to be updated, but currently migrate never
gets called because there's only one run queue.

Please let me know what you think.

Thanks,
Justin

[-- Attachment #1.2: Type: text/html, Size: 2206 bytes --]

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

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

^ permalink raw reply	[flat|nested] 5+ messages in thread
* Questions / Comments about hard / soft affinity in Credit 2
@ 2013-12-10  8:31 Justin Weaver
  0 siblings, 0 replies; 5+ messages in thread
From: Justin Weaver @ 2013-12-10  8:31 UTC (permalink / raw)
  To: xen-devel

Hello,

On Sat, Nov 30, 2013 at 10:18 PM, Dario Faggioli
<dario.faggioli@citrix.com> wrote:
>
> I'll have to re-look at the details of credit2 about load balance and
> migration between CPUs/runqueues but it looks like we need to have
> something allowing us to honour pinning/affinity _within_ the same
> runqueue, anyway, don't we? I mean, even if you implement per-L2
> runqueues, that would still span more than one CPU, and the user may
> well want to pin a vCPU to only one (or in general a subset) of them.


Yes, I agree. Just looking for some feedback before I attempt a patch.
Some of the functions I think need updating for hard/soft affinity...

runq_candidate needs to be updated. It decides which vcpu from the run
queue to run next on a given pcpu. Currently it only takes credit into
account. Considering hard affinity should be simple enough. For soft,
what if it first looked through the run queue in credit order at only
vcpus that prefer to run on the given processor and had a certain
amount of credit, and if none were found it then considered the whole
run queue considering only hard affinity and credit?

runq_assign assumes that the run queue associated with vcpu->processor
is OK for vcpu to run on. If considering affinity, I'm not sure if
that can be assumed. I probably need to dig further into schedule.c to
see where vcpu->processor is being assigned initially. Anyway, with
only one run queue this doesn't matter for now.

choose_cpu / migrate will need to be updated, but currently migrate
never gets called because there's only one run queue.

Please let me know what you think.

Thanks,
Justin

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2013-12-13 18:43 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-12-10  8:08 Questions / Comments about hard / soft affinity in Credit 2 Justin Weaver
2013-12-10  8:14 ` Fwd: " Justin Weaver
2013-12-10 13:17 ` Dario Faggioli
2013-12-13 18:43 ` Dario Faggioli
2013-12-10  8:31 Justin Weaver

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.