From: Dario Faggioli <dario.faggioli@citrix.com>
To: xen-devel@lists.xenproject.org
Cc: George Dunlap <george.dunlap@eu.citrix.com>,
Andrew Cooper <andrew.cooper3@citrix.com>,
Meng Xu <mengxu@cis.upenn.edu>, Jan Beulich <JBeulich@suse.com>
Subject: Re: [PATCH v2 2/6] xen: sched: fix locking for insert_vcpu() in credit1 and RTDS
Date: Fri, 16 Oct 2015 18:25:22 +0200 [thread overview]
Message-ID: <1445012722.3009.89.camel@citrix.com> (raw)
In-Reply-To: <20151014155409.28642.67629.stgit@Solace.station>
[-- Attachment #1.1: Type: text/plain, Size: 1830 bytes --]
On Wed, 2015-10-14 at 17:54 +0200, Dario Faggioli wrote:
So, about this:
> Note that it is safe to get rid of the locking in
> schedule_cpu_switch() as the pCPU being switched is, at
> the time of the switch, not a valid member of any cpupool,
> so no scheduling event should be expected on it, locking
> or not.
>
I changed my mind about removing this locking.
In fact...
> @@ -1509,8 +1507,6 @@ int schedule_cpu_switch(unsigned int cpu,
> struct cpupool *c)
> return -ENOMEM;
> }
>
> - lock = pcpu_schedule_lock_irqsave(cpu, &flags);
> -
> SCHED_OP(old_ops, tick_suspend, cpu);
> vpriv_old = idle->sched_priv;
> idle->sched_priv = vpriv;
> @@ -1520,8 +1516,6 @@ int schedule_cpu_switch(unsigned int cpu,
> struct cpupool *c)
> SCHED_OP(new_ops, tick_resume, cpu);
> SCHED_OP(new_ops, insert_vcpu, idle);
>
> - pcpu_schedule_unlock_irqrestore(lock, flags, cpu);
> -
> SCHED_OP(old_ops, free_vdata, vpriv_old);
> SCHED_OP(old_ops, free_pdata, ppriv_old, cpu);
>
... while reworking and testing my other series (the one about Credit2
runqueues) I'm seeing some issues (even without the patches from that
series applied) that may be related to this lock not being taken any
longer.
Also (less strong an argument, but still), when splitting allocation and initialization of per-pCPU data (which is what that series does) I'd probably have to reinstate some similar locking again. :-/
I'll investigate more and respin this series.
Thanks and Regards,
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
next prev parent reply other threads:[~2015-10-16 16:25 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-14 15:53 [PATCH v2 0/6] xen: sched: fix locking of {insert, remove}_vcpu() Dario Faggioli
2015-10-14 15:54 ` [PATCH v2 1/6] xen: sched: fix locking of remove_vcpu() in credit1 Dario Faggioli
2015-10-14 15:54 ` [PATCH v2 2/6] xen: sched: fix locking for insert_vcpu() in credit1 and RTDS Dario Faggioli
2015-10-16 16:25 ` Dario Faggioli [this message]
2015-10-14 15:54 ` [PATCH v2 3/6] xen: sched: clarify use cases of schedule_cpu_switch() Dario Faggioli
2015-10-15 8:25 ` Juergen Gross
2015-10-15 8:53 ` Dario Faggioli
2015-10-21 17:10 ` Dario Faggioli
2015-10-23 13:42 ` Juergen Gross
2015-10-23 13:53 ` Dario Faggioli
2015-10-14 15:54 ` [PATCH v2 4/6] xen: sched: better handle (not) inserting idle vCPUs in runqueues Dario Faggioli
2015-10-14 15:54 ` [PATCH v2 5/6] xen: sched: get rid of the per domain vCPU list in RTDS Dario Faggioli
2015-10-23 1:50 ` Meng Xu
2015-10-14 15:54 ` [PATCH v2 6/6] xen: sched: get rid of the per domain vCPU list in Credit2 Dario Faggioli
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=1445012722.3009.89.camel@citrix.com \
--to=dario.faggioli@citrix.com \
--cc=JBeulich@suse.com \
--cc=andrew.cooper3@citrix.com \
--cc=george.dunlap@eu.citrix.com \
--cc=mengxu@cis.upenn.edu \
--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.