All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dario Faggioli <dario.faggioli@citrix.com>
To: Justin Weaver <jtweaver@hawaii.edu>
Cc: George Dunlap <george.dunlap@eu.citrix.com>,
	Henri Casanova <henric@hawaii.edu>,
	xen-devel@lists.xen.org
Subject: Re: [PATCH 1/2] sched: credit2: respect per-vcpu hard affinity
Date: Mon, 2 Feb 2015 11:12:49 +0000	[thread overview]
Message-ID: <1422875569.6247.7.camel@Abyss> (raw)
In-Reply-To: <CA+o8iRUB_Jg1TwzYKEOkDnmZMS2dx-B27DisDpegDaNVAjGYRQ@mail.gmail.com>


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

On Sat, 2015-01-31 at 20:51 -1000, Justin Weaver wrote:
> On Mon, Jan 19, 2015 at 9:21 PM, Justin Weaver <jtweaver@hawaii.edu> wrote:

> > Like I said above, I will look at this again. My VMs were getting
> > stuck after certain hard affinity changes. I'll roll back some of
> > these changes and test it out again.
> 
> I discovered that SCHED_OP(VCPU2OP(v), wake, v); in function vcpu_wake
> in schedule.c is not being called because v's pause flags has
> _VPF_blocked set.
> 
> For example...
> I start a guest with one vcpu with hard affinity 8 - 15 and xl
> vcpu-list says it's running on pcpu 15
> I run xl vcpu-pin 1 0 8 to change it to hard affinity only with pcpu 8
> When it gets to vcpu_wake, it tests vcpu_runnable(v) which is false
> because _VPF_blocked is set, so it skips the call to
> SCHED_OP(VCPU2OP(v), wake, v); and so does not get a runq_tickle
> xl vcpu-list now shows --- for the state and I cannot console into it
> What I don't understand though is if I then enter xl vcpu-pin 1 0 15
> it reports that _VPF_blocked is NOT set, vcpu_wake calls credit2's
> wake, it gets a runq_tickle and everything is fine again
> Why did the value of the _VPF_blocked flag change after I entered xl
> vcpu-pin the second time?? I dove deep in the code and could not
> figure it out.
> 
> So that is why v1 of my patch worked because I let it run migrate
> during an affinity change even if the current and destination run
> queues were the same, so it would do the processor assignment and
> runq_tickle regardless. I think you'll have to tell me if that's a
> hack or a good solution!
> 
Ok, thanks for the analysis. I shall have a look and let you know.

Dario

-- 
<<This happens because I choose it to happen!>> (Raistlin Majere)
-----------------------------------------------------------------
Dario Faggioli, Ph.D, http://about.me/dario.faggioli
Senior Software Engineer, Citrix Systems R&D Ltd., Cambridge (UK)


[-- 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-02-02 11:12 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-30  0:33 [PATCH 0/2] Credit2: introduce per-vcpu hard and soft affinity Justin T. Weaver
2014-11-30  0:33 ` [PATCH 1/2] sched: credit2: respect per-vcpu hard affinity Justin T. Weaver
2015-01-12 18:05   ` Dario Faggioli
2015-01-20  7:21     ` Justin Weaver
2015-02-01  6:51       ` Justin Weaver
2015-02-02 11:12         ` Dario Faggioli [this message]
2015-02-02 14:24         ` Dario Faggioli
2015-02-03  9:09           ` Justin Weaver
2015-03-03  3:13       ` Dario Faggioli
2014-11-30  0:33 ` [PATCH 2/2] sched: credit2: consider per-vcpu soft affinity Justin T. Weaver
2015-01-12 18:07   ` Dario Faggioli
2015-01-13 13:06   ` Dario Faggioli
2015-02-11  8:38     ` Justin Weaver
2015-01-02 16:33 ` [PATCH 0/2] Credit2: introduce per-vcpu hard and " Dario Faggioli
2015-01-04 21:32   ` Justin Weaver

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=1422875569.6247.7.camel@Abyss \
    --to=dario.faggioli@citrix.com \
    --cc=george.dunlap@eu.citrix.com \
    --cc=henric@hawaii.edu \
    --cc=jtweaver@hawaii.edu \
    --cc=xen-devel@lists.xen.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.