mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Bill Huey (hui) <bhuey@lnxw.com>
To: Esben Nielsen <simlo@phys.au.dk>
Cc: linux-kernel@vger.kernel.org, Ingo Molnar <mingo@elte.hu>
Subject: Re: Priority Inheritance Test (Real-Time Preemption)
Date: Mon, 22 Nov 2004 01:23:02 -0800	[thread overview]
Message-ID: <20041122092302.GA7210@nietzsche.lynx.com> (raw)
In-Reply-To: <Pine.OSF.4.05.10411212107240.29110-100000@da410.ifa.au.dk>

On Sun, Nov 21, 2004 at 09:29:23PM +0100, Esben Nielsen wrote:
> Hi,
>  From realfeel I wrote a small, simple test to test how well priority
> inheritance mechanism works. 
> 
> Basicly it samples how long a real-time task have to wait to get into a
> protected region while non-real-time tasks also try to get into the
> region (a character device). Their "job" in the region is to busy-loop for
> 1 ms. This ought to mimic how drivers and other parts of the kernel would
> work in a real real-time application: Real time tasks using the driver
> while non-real-time tasks also use the same driver.
> 
> With an ideal PI mutex the time the real-time task has to wait to get the
> lock should be between 0 and 1 ms. 0 when the mutex is uncongested and 1
> ms when one of the non-real-time tasks just got the mutex.

[private reply cut and pastes to the list as requested]

IMO, their needs to be statistical code in the mutex itself so that it can
measure the frequency of PI events as well as depth of the inheritance
chains and all data structure traversals. The problem with writing that
stuff now is that there isn't proper priority propagation through the entire
dependency chain in any mutex code that I've publically seen yet. Patching
this instrumentation in a mutex require a mutex with this built in
functionality. IMO, PI should be considered a kind of contention overload
condition and really a kind of fallback device to deal with these kind
of exceptional circumstances.

Turning this into a "priority inheritance world" is just going to turn
this project into the FreeBSD SMP project where nobody is working on fixing
the actual contention problems in the kernel and everybody is dependent on
overloading an already half-overloaded scheduler with priority calculations.
This eventually leads the kernel doing little effective work and is the main
technical reason why DragonFly BSD exists, a vastly superior BSD development
group (for many reasons).

http://citeseer.nj.nec.com/yodaiken01dangers.html

IMO, is a pretty fair assessment some of the failures of using a "late" PI.
It's not the whole story, but a pretty solid view of how it's been misunderstood,
overused and then flat out abused. There might be places where, if algorithmically
bounded somehow, reverting some of the heavy hammered sleeping locks back to
spinlocks would make the system faster and more controlled. rtc_lock possibly
could be one of those places and other places that are as heavily as used as
that.

That's my take on it.

bill


  parent reply	other threads:[~2004-11-22  9:24 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-11-21 20:29 Esben Nielsen
2004-11-22  0:27 ` Ingo Molnar
2004-11-23 13:34   ` Ingo Molnar
2004-11-23 15:47     ` Esben Nielsen
2004-11-23 23:03     ` Esben Nielsen
2004-11-24  3:42       ` Ingo Molnar
2004-11-24  7:51         ` Ingo Molnar
2004-11-24  8:07       ` Ingo Molnar
2004-11-24  8:33         ` Esben Nielsen
2004-11-24  9:55           ` Ingo Molnar
2004-11-24 10:18       ` Ingo Molnar
2004-11-25 15:46         ` Esben Nielsen
2004-11-25 16:58           ` Ingo Molnar
2004-11-25 16:08             ` Esben Nielsen
2004-11-25 17:14               ` Ingo Molnar
2004-11-25 22:08             ` Esben Nielsen
2004-11-26  1:08               ` Ingo Molnar
2004-11-26  0:34                 ` Ingo Molnar
2004-11-26  0:37                   ` Ingo Molnar
2004-11-26  8:52                     ` Esben Nielsen
2004-11-26 16:26                 ` Esben Nielsen
2004-11-26 20:41                   ` Ingo Molnar
2004-11-26 21:05                     ` Ingo Molnar
2004-11-27 23:05                       ` Esben Nielsen
2004-11-28  8:42                         ` Ingo Molnar
2004-11-28 15:55                           ` Esben Nielsen
2004-11-29  9:59                             ` Ingo Molnar
2004-11-29 15:07                               ` Esben Nielsen
2004-11-29 15:56                                 ` Ingo Molnar
2004-11-29 15:57                                   ` Ingo Molnar
2004-11-29 16:50                                     ` Esben Nielsen
2004-11-30  8:49                                       ` Ingo Molnar
2004-11-22  9:23 ` Bill Huey [this message]
2004-11-22 12:37   ` Ingo Molnar
2004-11-22 21:25     ` Bill Huey
2004-11-22 14:16   ` john cooper
2004-11-22 15:24     ` Ingo Molnar
2004-11-23  1:19       ` john cooper
2004-11-23  8:13         ` Esben Nielsen
2004-11-23  9:21         ` Ingo Molnar
2004-11-22 21:30     ` Bill Huey
2004-11-23  1:34       ` john cooper
2004-11-22 16:12   ` Esben Nielsen

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=20041122092302.GA7210@nietzsche.lynx.com \
    --to=bhuey@lnxw.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=simlo@phys.au.dk \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome