From: Juergen Gross <jgross@suse.com>
To: Dario Faggioli <dfaggioli@suse.com>, xen-devel@lists.xenproject.org
Cc: Steven Haigh <netwiz@crc.id.au>,
George Dunlap <george.dunlap@citrix.com>,
Jan Beulich <JBeulich@suse.com>
Subject: Re: [PATCH] xen: sched/Credit2: fix bug when moving CPUs between two Credit2 cpupools
Date: Fri, 14 Sep 2018 14:41:42 +0200 [thread overview]
Message-ID: <79a05586-7059-e432-604c-a99cdc6c1e20@suse.com> (raw)
In-Reply-To: <153683962932.12063.15985092124725980082.stgit@Palanthas.fritz.box>
On 13/09/18 13:53, Dario Faggioli wrote:
> Whether or not a CPU is assigned to a runqueue (and, if yes, to which
> one) within a Credit2 scheduler instance must be both a per-cpu and
> per-scheduler instance one.
>
> In fact, when we move a CPU between cpupools, we first setup its per-cpu
> data in the new pool, and then cleanup its per-cpu data from the old
> pool. In Credit2, when there currently is no per-scheduler, per-cpu
> data (as the cpu-to-runqueue map is stored on a per-cpu basis only),
> this means that the cleanup of the old per-cpu data can mess with the
> new per-cpu data, leading to crashes like this:
>
> https://www.mail-archive.com/xen-devel@lists.xenproject.org/msg23306.html
> https://www.mail-archive.com/xen-devel@lists.xenproject.org/msg23350.html
>
> Basically, when csched2_deinit_pdata() is called for CPU 13, for fully
> removing the CPU from Pool-0, per_cpu(13,runq_map) already contain the
> id of the runqueue to which the CPU has been assigned in the scheduler
> of Pool-1, which means wrong runqueue manipulations happen in Pool-0's
> scheduler. Furthermore, at the end of such call, that same runq_map is
> updated with -1, which is what causes the BUG_ON in csched2_schedule(),
> on CPU 13, to trigger.
>
> So, instead of reverting a2c4e5ab59d "xen: credit2: make the cpu to
> runqueue map per-cpu" (as we don't want to go back to having the huge
> array in struct csched2_private) add a per-cpu scheduler specific data
> structure, like, for instance, Credit1 has already. That (for now) only
> contains one field: the id of the runqueue the CPU is assigned to.
>
> Signed-off-by: Dario Faggioli <dfaggioli@suse.com>
Reviewed-by: Juergen Gross <jgross@suse.com>
Juergen
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
next prev parent reply other threads:[~2018-09-14 12:41 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-13 11:53 [PATCH] xen: sched/Credit2: fix bug when moving CPUs between two Credit2 cpupools Dario Faggioli
2018-09-14 12:41 ` Juergen Gross [this message]
2018-09-18 11:09 ` George Dunlap
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=79a05586-7059-e432-604c-a99cdc6c1e20@suse.com \
--to=jgross@suse.com \
--cc=JBeulich@suse.com \
--cc=dfaggioli@suse.com \
--cc=george.dunlap@citrix.com \
--cc=netwiz@crc.id.au \
--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 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).