All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ian Campbell <Ian.Campbell@citrix.com>
To: Jan Beulich <JBeulich@suse.com>
Cc: George Dunlap <george.dunlap@eu.citrix.com>,
	Andrew Cooper <andrew.cooper3@citrix.com>,
	Julien Grall <julien.grall@linaro.org>,
	Denys Drozdov <denys.drozdov@globallogic.com>,
	xen-devel@lists.xen.org
Subject: Re: [PATCH] xen/arm: Fix rtds scheduler for arm
Date: Mon, 2 Feb 2015 12:16:40 +0000	[thread overview]
Message-ID: <1422879400.18204.6.camel@citrix.com> (raw)
In-Reply-To: <54CF7045020000780005BDF7@mail.emea.novell.com>

On Mon, 2015-02-02 at 11:40 +0000, Jan Beulich wrote:
> >>> On 02.02.15 at 12:14, <Ian.Campbell@citrix.com> wrote:
> > On Mon, 2015-02-02 at 12:49 +0200, Denys Drozdov wrote:
> >> The issue observed on credit2 scheduler is similar to the rt scheduler
> >> on arm platform. The root cause is that interrupts are disabled in the
> >> beginning of arm context_switch, thus spin_lock_irq is failing in
> >> ASSERT(local_irq_is_enabled()). I propose to change both credit2 and
> >> rt scheduler to run on arm platform as well and re-run the regression
> >> with scheduler patches.
> > 
> > I'd like to hear from the scheduler and other $arch folks regarding
> > whether we think the rtds and credit2 schedulers are wrong or whether it
> > is actually the ARM arch code which needs fixing before considering any
> > change.
> 
> The aspect to be understood first is why ARM needs IRQs disabled
> past __context_switch() into schedule_tail() (and there until after
> ctxt_switch_from() and ctxt_switch_to()). If that's indeed necessary,
> there's no question that the schedulers need to be adjusted to
> accommodate for this.

I don't think it's *necessary*, but we do seem to have ended up with the
context switch having that requirement today (and relying on it in
several places in switch from/to (mostly to).

I'm pretty sure we could rework things more along the lines of how x86
does it if needed, but it would be a non-trivial refactoring I think.

>  X86 calls context_saved() before
> schedule_tail() and has no need for IRQs to be disabled after
> __context_switch() returned.

In fact from the comment ("...which may fault...") I think it requires
that they are not disabled?

>  Otoh some roughly equivalent stuff
> ARM does in ctxt_switch_{from,to}() is being done in
> __context_switch() on x86 (and in the context here the restore
> parts seem to be of most interest) - maybe the call to
> context_saved() could be deferred on ARM until after IRQs got
> re-enabled?

Is it allowable to have the context_saved of prev be after (most of) the
state of next has been restored?

Ian.

  reply	other threads:[~2015-02-02 12:16 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-30 12:30 [PATCH] xen/arm: Fix rtds scheduler for arm Denis Drozdov
2015-01-30 12:38 ` Jan Beulich
2015-01-30 15:40   ` Denis Drozdov
2015-01-30 15:46     ` Julien Grall
2015-01-30 15:56       ` Andrew Cooper
2015-01-30 16:10         ` Julien Grall
2015-01-30 16:19           ` Denys Drozdov
2015-01-30 16:29             ` Julien Grall
2015-01-31 10:50             ` Ian Campbell
2015-02-02 10:49               ` Denys Drozdov
2015-02-02 11:14                 ` Ian Campbell
2015-02-02 11:40                   ` Jan Beulich
2015-02-02 12:16                     ` Ian Campbell [this message]
2015-02-02 12:59                       ` Julien Grall
2015-02-02 13:06                         ` Ian Campbell
2015-02-04 15:04                         ` Stefano Stabellini
2015-02-04 15:09                           ` Ian Campbell
2015-02-02 13:07                       ` Jan Beulich
2015-02-02 18:03                         ` Denis Drozdov
2015-02-04 15:13                           ` Ian Campbell
2015-02-04 16:19                             ` Dario Faggioli
2015-02-04 16:45                             ` Julien Grall
2015-02-04 17:13                               ` [PATCH] xen/arm: Call context_saved() with interrupts enabled during context switch Denis Drozdov
2015-02-05 12:48                                 ` Ian Campbell

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=1422879400.18204.6.camel@citrix.com \
    --to=ian.campbell@citrix.com \
    --cc=JBeulich@suse.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=denys.drozdov@globallogic.com \
    --cc=george.dunlap@eu.citrix.com \
    --cc=julien.grall@linaro.org \
    --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.