From: Ian Campbell <Ian.Campbell@citrix.com>
To: Thomas Leonard <talex5@gmail.com>,
Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Cc: Samuel Thibault <samuel.thibault@ens-lyon.org>,
Stefano Stabellini <stefano.stabellini@eu.citrix.com>,
"xen-devel@lists.xenproject.org" <xen-devel@lists.xenproject.org>,
David Scott <Dave.Scott@eu.citrix.com>,
Anil Madhavapeddy <anil@recoil.org>
Subject: Re: [PATCH ARM v8 1/4] mini-os: arm: time
Date: Fri, 14 Nov 2014 10:29:26 +0000 [thread overview]
Message-ID: <1415960966.21321.30.camel@citrix.com> (raw)
In-Reply-To: <CAG4opy-bY4HCmGik1y2DRLamXk=Tgj2J0cfqHjFRcs9goM1wqw@mail.gmail.com>
On Thu, 2014-11-13 at 16:29 +0000, Thomas Leonard wrote:
> On 27 October 2014 10:34, Ian Campbell <Ian.Campbell@citrix.com> wrote:
> > On Sun, 2014-10-26 at 09:51 +0000, Thomas Leonard wrote:
> >> On 21 October 2014 11:50, Ian Campbell <Ian.Campbell@citrix.com> wrote:
> >> > On Fri, 2014-10-03 at 10:20 +0100, Thomas Leonard wrote:
> >> >> Based on an initial patch by Karim Raslan.
> >> >>
> >> >> Signed-off-by: Karim Allah Ahmed <karim.allah.ahmed@gmail.com>
> >> >> Signed-off-by: Thomas Leonard <talex5@gmail.com>
> >> >
> >> > Acked-by: Ian Campbell <ian.campbell@citrix.com>
> >> >
> >> >> +/* Wall-clock time is not currently available on ARM, so this is always zero for now:
> >> >> + * http://wiki.xenproject.org/wiki/Xen_ARM_TODO#Expose_Wallclock_time_to_guests
> >> >
> >> > I have some slightly hacky patches for this, I really should dust them
> >> > off and submit them...
> >> >
> >> >> +void block_domain(s_time_t until)
> >> >> +{
> >> >> + uint64_t until_count = ns_to_ticks(until) + cntvct_at_init;
> >> >> + ASSERT(irqs_disabled());
> >> >> + if (read_virtual_count() < until_count)
> >> >> + {
> >> >> + set_vtimer_compare(until_count);
> >> >> + __asm__ __volatile__("wfi");
> >> >> + unset_vtimer_compare();
> >> >> +
> >> >> + /* Give the IRQ handler a chance to handle whatever woke us up. */
> >> >> + local_irq_enable();
> >> >> + local_irq_disable();
> >> >> + }
> >> >
> >> > Just wondering, is this not roughly equivalent to a wfi loop with
> >> > interrupts enabled?
> >>
> >> I'm not quite sure what you mean.
> >>
> >> If we enable interrupts before the wfi then I think the following could occur:
> >>
> >> 1. Application checks for work, finds none and calls block_domain.
> >> 2. block_domain enables interrupts.
> >> 3. An interrupt occurs.
> >> 4. The interrupt handler sets a flag indicating work to do.
> >> 5. wfi is called, putting the domain to sleep, even though there is work to do.
> >>
> >> Enabling IRQs after block_domain ensures we can't sleep while we have
> >> work to do.
> >
> > Ah, yes.
>
> So, can this patch be applied as-is now?
We are now post-rc2 in the 4.5.0 release process, so the answer would be
"needs a release exception, but it's a feature so probably not" (and it
would have been a bit dubious towards the end of October too, which was
post rc1, and feature freeze was the end of September in any case).
However this is part of a new mini-os port which isn't even hooked into
the main build system yet (AFAICT), so in that sense it is utterly
harmless to apply. On the other hand there is a bunch more patches to
come which are needed to make the mini-os port actually useful, and I'm
not sure those are all utterly harmless e.g. to common or x86 code (as
in I've not gone looked at the diffstat for the remaining patches), so
in that sense there's no harm waiting for 4.6 development to open.
I defer to the release manager (Konrad, CCd) on this...
next prev parent reply other threads:[~2014-11-14 10:29 UTC|newest]
Thread overview: 47+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-03 9:20 [PATCH ARM v8 0/4] mini-os: initial ARM support Thomas Leonard
2014-10-03 9:20 ` [PATCH ARM v8 1/4] mini-os: arm: time Thomas Leonard
2014-10-21 10:50 ` Ian Campbell
2014-10-21 14:07 ` [PATCH incomplete] xen: arm: wallclock support (incomplete, needs work/refactoring) Ian Campbell
2014-10-26 9:51 ` [PATCH ARM v8 1/4] mini-os: arm: time Thomas Leonard
2014-10-27 10:34 ` Ian Campbell
2014-11-13 16:29 ` Thomas Leonard
2014-11-14 10:29 ` Ian Campbell [this message]
2014-11-19 20:57 ` Konrad Rzeszutek Wilk
2015-01-08 15:52 ` Ian Campbell
2015-01-08 15:58 ` Thomas Leonard
2015-01-08 16:04 ` Ian Campbell
2014-10-03 9:20 ` [PATCH ARM v8 2/4] mini-os: arm: interrupt controller Thomas Leonard
2014-10-21 11:00 ` Ian Campbell
2014-10-21 14:26 ` Julien Grall
2014-10-21 15:16 ` Ian Campbell
2014-10-21 15:22 ` Julien Grall
2014-10-21 15:35 ` Ian Campbell
2014-10-21 16:03 ` Julien Grall
2014-10-21 18:14 ` Anil Madhavapeddy
2014-10-21 19:18 ` Ian Campbell
2014-10-21 21:54 ` Samuel Thibault
2014-10-22 9:03 ` Ian Campbell
2014-10-22 13:06 ` Julien Grall
2014-10-22 13:14 ` Samuel Thibault
2014-10-28 15:15 ` Thomas Leonard
2014-10-28 15:25 ` Julien Grall
2014-10-28 15:43 ` Thomas Leonard
2014-10-28 15:51 ` Julien Grall
2014-11-14 10:22 ` Thomas Leonard
2014-11-14 11:33 ` Julien Grall
2014-11-14 11:42 ` Ian Campbell
2014-11-14 11:48 ` Julien Grall
2014-11-14 12:01 ` Ian Campbell
2014-10-03 9:20 ` [PATCH ARM v8 3/4] mini-os: arm: build system Thomas Leonard
2014-10-21 11:44 ` Ian Campbell
2014-10-21 21:50 ` Samuel Thibault
2014-10-22 9:01 ` Ian Campbell
2014-10-22 9:59 ` Samuel Thibault
2014-10-26 9:46 ` Thomas Leonard
2014-10-26 9:55 ` Samuel Thibault
2014-10-26 10:25 ` Thomas Leonard
2014-11-17 11:42 ` Thomas Leonard
2014-11-17 11:45 ` Ian Campbell
2014-11-17 11:47 ` Andrew Cooper
2014-11-17 11:47 ` Samuel Thibault
2014-10-03 9:20 ` [PATCH ARM v8 4/4] mini-os: arm: show registers, stack and exception vector on fault Thomas Leonard
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=1415960966.21321.30.camel@citrix.com \
--to=ian.campbell@citrix.com \
--cc=Dave.Scott@eu.citrix.com \
--cc=anil@recoil.org \
--cc=konrad.wilk@oracle.com \
--cc=samuel.thibault@ens-lyon.org \
--cc=stefano.stabellini@eu.citrix.com \
--cc=talex5@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.