All of lore.kernel.org
 help / color / mirror / Atom feed
From: George Dunlap <george.dunlap@eu.citrix.com>
To: Jan Beulich <JBeulich@suse.com>,
	Andrew Cooper <andrew.cooper3@citrix.com>
Cc: xen-devel <xen-devel@lists.xenproject.org>,
	Juergen Gross <juergen.gross@ts.fujitsu.com>,
	Keir Fraser <keir.xen@gmail.com>,
	David Vrabel <david.vrabel@citrix.com>
Subject: Re: [PATCH] sched: fix race between sched_move_domain() and vcpu_wake()
Date: Fri, 11 Oct 2013 15:39:44 +0100	[thread overview]
Message-ID: <52580DB0.3070002@eu.citrix.com> (raw)
In-Reply-To: <5258094502000078000FA917@nat28.tlf.novell.com>

On 11/10/13 13:20, Jan Beulich wrote:
>>>> On 11.10.13 at 11:32, "Jan Beulich" <JBeulich@suse.com> wrote:
>> I suppose you scanned the code for other cases like this, and
>> there are none?
> Actually I did just now, and I think there's a similar issue in
> credit2's init_pcpu(): After taking pcpu_schedule_lock(cpu) it
> alters schedule_lock and hence effectively drops the locking,
> yet continues to do other stuff before in fact releasing it.
>
> What is being done prior to unlocking, however, looks to be
> unrelated to the lock being held, and rather independently
> (of the effective releasing) wanting &rqd->lock held.

I can't quite make out what you mean in the last sentence; but setting 
the cpu in rqd->idle and rqd->active should certainly be protected by 
rqd->lock, and it certainly looks like it's not being grabbed at the moment.

Hmm -- I think we may need to do some kind of fancy looping thing like 
we do in vcpu_migrate, to lock both the current schedule lock and 
rqd->lock; with the difference, I suppose, that rqd lock won't change 
(since the assignment of cpu->runqueue at the moment is static).

Let me put this on my list of things to do before the release.

  -George

  reply	other threads:[~2013-10-11 14:39 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-10 17:29 [PATCH] sched: fix race between sched_move_domain() and vcpu_wake() David Vrabel
2013-10-10 18:01 ` Andrew Cooper
2013-10-10 18:27   ` Keir Fraser
2013-10-11  7:12     ` Jan Beulich
2013-10-11  8:07       ` Keir Fraser
2013-10-11  9:02         ` Andrew Cooper
2013-10-11  9:32           ` Jan Beulich
2013-10-11  9:36             ` David Vrabel
2013-10-11  9:37               ` Jan Beulich
2013-10-11 12:20             ` Jan Beulich
2013-10-11 14:39               ` George Dunlap [this message]
2013-10-11 14:45               ` George Dunlap
2013-10-11 15:00                 ` Processed: " xen
2013-10-11 10:36       ` George Dunlap
2013-10-11  6:37 ` Juergen Gross
2013-10-11 10:32 ` George Dunlap
2013-10-11 11:15   ` Dario Faggioli
2013-10-11 11:32     ` George Dunlap
2013-10-11 11:49       ` Dario Faggioli
2013-10-11 12:03         ` Jan Beulich
2013-10-11 11:47 ` Keir Fraser

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=52580DB0.3070002@eu.citrix.com \
    --to=george.dunlap@eu.citrix.com \
    --cc=JBeulich@suse.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=david.vrabel@citrix.com \
    --cc=juergen.gross@ts.fujitsu.com \
    --cc=keir.xen@gmail.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.