All of lore.kernel.org
 help / color / mirror / Atom feed
From: Philippe Gerum <rpm@xenomai.org>
To: Jan Kiszka <jan.kiszka@domain.hid>
Cc: adeos-main <adeos-main@gna.org>
Subject: Re: [Adeos-main] [pull request] x86: critical fix for native_safe_halt
Date: Wed, 16 Dec 2009 15:51:44 +0100	[thread overview]
Message-ID: <1260975104.2216.383.camel@domain.hid> (raw)
In-Reply-To: <4B28F11B.3090400@domain.hid>

On Wed, 2009-12-16 at 15:39 +0100, Jan Kiszka wrote:
> Philippe Gerum wrote:
> > On Wed, 2009-12-16 at 15:19 +0100, Philippe Gerum wrote:
> >> On Wed, 2009-12-16 at 12:53 +0100, Jan Kiszka wrote:
> >>> Philippe Gerum wrote:
> >>>> On Sun, 2009-12-13 at 19:19 +0100, Jan Kiszka wrote:
> >>>>> Philippe Gerum wrote:
> >>>>>> On Sun, 2009-12-13 at 18:48 +0100, Jan Kiszka wrote:
> >>>>>>> Philippe Gerum wrote:
> >>>>>>>> On Sat, 2009-12-12 at 22:37 +0100, Jan Kiszka wrote:
> >>>>>>>>> Recent moving of ipipe_suspend_domain finally exposed a deeper flaw in
> >>>>>>>>> cpu_idle on x86: We failed to check the pipeline log before issuing the
> >>>>>>>>> real hlt. This caused IRQ latencies or even drops for Linux,
> >>>>>>>>> specifically on SMP. Credits go to plain QEMU whose slow SMP mode caused
> >>>>>>>>> ipipe_critical_enter to deadlock frequently enough.
> >>>>>>>>>
> >>>>>>>>> The first patch of this series fixes this (see below), the second one
> >>>>>>>>> simply removes the two useless ipipe_suspend_domain calls.
> >>>>>>>>>
> >>>>>>>> What your patch does as well, is killing the ability to run low priority
> >>>>>>>> domains below the root level.
> >>>>>>> Yes, I'm killing the dream.
> >>>>>>>
> >>>>>>> I heavily doubt that the functions I removed in the second patch ever
> >>>>>>> contributed something good to this. It's always the job of the lowest
> >>>>>>> domain to issue hardware halt, not of some arbitrary mid-prio domain.
> >>>> Actually, no it's not. You may use a low-priority domain to run idle
> >>>> level jobs outside of the linux infrastructure for that purpose (e.g.
> >>>> RCU). A high priority domain may want to post events for a low priority
> >>>> domain to act upon when a mid priority domain is about to enter the CPU
> >>>> idle state.
> >>> Even if all the related bugs were fixed: When you pass down control to
> >>> the lower domain on cpu_idle via ipipe_suspend_domain, you won't get a
> >>> Linux reschedule (without CONFIG_PREEMPT) until the low-prio domain
> >>> finally returns from its event handler - likely not what "low-prio"
> >>> suggests.
> >> low prio suggests nothing else than "runs whenever nothing else has to
> >> be done higher in the pipeline".
> > 
> > Nothing, meaning nothing interrupt-wise. For the rest, it's a deal
> > between all OSes there.
> > 
> 
> Right, and that deal was, well, fairly incomplete in the previous code.
> That's my whole point.

Nope. The missing code would have been provided by the low priority
domain, without requiring anything to be changed on the Linux side, if
that use was only about running (pre-)idle context code.

Which does not removes anything to the usefulness of actually fixing CPU
halt code this said, but that is unrelated. 

> 
> Jan
> 
> _______________________________________________
> Adeos-main mailing list
> Adeos-main@domain.hid
> https://mail.gna.org/listinfo/adeos-main


-- 
Philippe.




  reply	other threads:[~2009-12-16 14:51 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-12 21:37 [Adeos-main] [pull request] x86: critical fix for native_safe_halt Jan Kiszka
2009-12-13 17:02 ` Philippe Gerum
2009-12-13 17:48   ` Jan Kiszka
2009-12-13 18:05     ` Philippe Gerum
2009-12-13 18:19       ` Jan Kiszka
2009-12-16 11:26         ` Philippe Gerum
2009-12-16 11:53           ` Jan Kiszka
2009-12-16 14:19             ` Philippe Gerum
2009-12-16 14:30               ` Philippe Gerum
2009-12-16 14:39                 ` Jan Kiszka
2009-12-16 14:51                   ` Philippe Gerum [this message]
2009-12-16 14:32               ` Jan Kiszka
2009-12-16 14:41                 ` Philippe Gerum

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=1260975104.2216.383.camel@domain.hid \
    --to=rpm@xenomai.org \
    --cc=adeos-main@gna.org \
    --cc=jan.kiszka@domain.hid \
    /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.