public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@linutronix.de>
To: Bill Huey <bhuey@lnxw.com>
Cc: dwalker@mvista.com, Ingo Molnar <mingo@elte.hu>,
	Andrew Morton <akpm@osdl.org>,
	amakarov@ru.mvista.com, ext-rt-dev@mvista.com,
	LKML <linux-kernel@vger.kernel.org>,
	Doug Niehaus <niehaus@ittc.ku.edu>
Subject: Re: [Ext-rt-dev] Re: [ANNOUNCE] Linux 2.6 Real Time Kernel
Date: Wed, 13 Oct 2004 01:10:34 +0200	[thread overview]
Message-ID: <1097622634.19549.235.camel@thomas> (raw)
In-Reply-To: <20041012223642.GB30966@nietzsche.lynx.com>

On Wed, 2004-10-13 at 00:36, Bill Huey wrote:
> On Wed, Oct 13, 2004 at 12:00:16AM +0200, Thomas Gleixner wrote:
> > On Tue, 2004-10-12 at 23:12, Bill Huey wrote:
> > > My tree is stable. I was able to hammer this machine for 2-3 days straight
> > > (no networking, that's another major can of worms) with deadlocking
> > > using multipule mass "find / -exec egrep" of some sort that stress both
> > > process creation and all parts of the IO system.
> > 
> > He, a system without networking is a real measurement ? Ever heard of
> > hackbench in combination with ping -f ?
> 
> The problem with doing this project is to create an identically
> functioning system that's correct. The current track taking by Monta Vista
> is highly unstable given the lack of locking throughout their kernel. It
> has all of the complexities of mutex style conventions without any debugging
> methodology attached to it. It's no longer the spinlock universe that
> Linux is using since a deadlock situation just leaves use running in
> cpu_idle wondering what is going on.
> 
> It's something that needs to be address in the large scheme of the project.

Ack.

> > > That graph that I saw from Lee is consistent with my results in that a
> > > deadlock prone system will have phenomenal latency performance at the
> > > expense of being absolutely incorrect. It's just a flat out broken
> > > system at this point that they've released.
> > 
> > Thats a major problem caused by "dumb" priority inheritence. The goal is
> > not priority inheritence at the very end. It's proxy execution, where
> > priority inheritence is a subset.
> 
> This has been articulate a couple of times by both me and Ingo (recent email).
> The MV's system is highly unstable, not because of priority inheritance,
> but because of basic lock violation in the lock graph itself. It's another kind
> of SMP granularity problem. The hard problem was just what Ingo was saying and
> it's higher, but higher in the graph.

Can you point me a bit more clear on what you are talking about ?

> > > Yes, I agree, but the convention needs to be standardized.
> > 
> > That's all I was talking about.
> 
> Yeah, it needs to be done. I like the "_" methodology that both Monta Vista
> and Ingo are using. I'll convert my stuff over to using it when I'm finished
> with a couple of large items here.

That's totaly fucked up. Compile XFS with that and you are toast. That's
ugly and not understandable/fixable for anybody in the universe without
more ugly and less understandable hacks. Yes I managed to get XFS up,
but I refuse to show the patch, because it's making me barf when I look
into it.

_spinlock = spinlock
spinlock = mutex
_mutex = semaphore
semphore = whatever
....

That's violating every single aspect of software design. That's messing
up the whole kernel.

What have we at the very end ? A endless mess of non understandable
macros, which are resolved by compiler magic ? Where nobody can see on
the first look, which kind of concurrency control you are using ? That's
a nice thing to do some proof of concept implementation, but it can not
be a solution for something what is targeted to go into mainline. The
frequency of T4-T7 patches including the small fixes posted on LKML is
just a proof of this.

> > I'm not talking about automatic conversion of rules. I'm talking about
> > automatic conversion of different concurrency controls into a
> > equivillance function, which lets you better identify the neccecary
> > manual changes and leaves room for simple and non intrusive replacement
> > implementations.
> 
> This is kind of a sketchy problem. So far all of what I've seen really needs
> to be done manually and can be done using the all of the normal Linux locking
> and scheduler/interrupt masking primitives. I'd hate to see another system
> added to this that solves a problem that may not exist. Please, correct
> me if I'm not understanding you.

We have spinlocks, mutexes, semaphores and preemption as types of
concurrency control implementations in the kernel. They represent
different grades of access exclusion control.

But all of them have one in common. Exclusive access to resources.

So the natural consequence is to convert _all_ concurrency control
mechanisms into a single identifiable one. That's a purely semantical
conversion, in terms of macro replacement, where no functional change
takes place.

After you have done this, it is much more easier to 

a) identify the nested places, as you have to look for exactly one
pattern instead of N
b) to easy experiment with replacment functions 
c) to make clear which changes to the code you are making

substituting

enter_critical_section(SPIN_LOCK,....) by
enter_critical_section(XYZ_MUTEX,....) is
understandable for most of the people. 

Changing it by hidden gcc magic is not.

The bad thing of hidden gcc magic is that you will not be able to
analyse nested concurrency controls in one go. You have to figure out
what the heck spin_lock vs. _spin_lock vs. semaphore vs. _semaphore vs.
mutex vs. _mutex means.

So cleaning up the purely semantical (clear wording sense) way is the
first step to go instead of changing a bunch of macros over the place
and break the half of the kernel compile.

tglx














  reply	other threads:[~2004-10-12 23:19 UTC|newest]

Thread overview: 92+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-10-09  5:59 [ANNOUNCE] Linux 2.6 Real Time Kernel Sven-Thorsten Dietrich
2004-10-09  6:40 ` Lee Revell
2004-10-09  7:33   ` Daniel Walker
2004-10-09  7:42     ` Lee Revell
2004-10-09 23:40       ` Matthias Urlichs
2004-10-09  8:52     ` Lee Revell
2004-10-09 23:20     ` Dave Hansen
2004-10-09 23:24       ` Lee Revell
2004-10-09 10:51 ` Måns Rullgård
2004-10-09 13:15 ` Måns Rullgård
2004-10-09 21:20   ` Lee Revell
2004-10-09 21:35     ` Måns Rullgård
2004-10-09 21:37       ` Lee Revell
2004-10-09 21:45         ` Måns Rullgård
2004-10-09 21:55       ` Lee Revell
2004-10-09 22:21         ` Måns Rullgård
2004-10-09 23:52       ` Lee Revell
2004-10-10  0:05         ` Måns Rullgård
2004-10-10  0:45           ` Lee Revell
2004-10-10  1:05             ` Måns Rullgård
2004-10-10  1:09               ` Lee Revell
2004-10-10  0:43       ` Micha Feigin
2004-10-10  1:08         ` Måns Rullgård
2004-10-09 17:41 ` Karim Yaghmour
2004-10-09 18:30   ` Lee Revell
2004-10-09 21:26     ` stefan.eletzhofer
2004-10-09 19:30       ` Lee Revell
2004-10-09 19:38         ` Måns Rullgård
2004-10-09 21:38         ` stefan.eletzhofer
2004-10-09 19:47           ` Lee Revell
2004-10-09 20:11             ` Karim Yaghmour
2004-10-09 20:14               ` Lee Revell
2004-10-09 20:53                 ` Karim Yaghmour
2004-10-09 20:59                   ` Lee Revell
2004-10-09 20:20             ` Robert Love
2004-10-09 20:25               ` Lee Revell
2004-10-10  1:15 ` Lee Revell
2004-10-10  8:46 ` Ingo Molnar
2004-10-10 19:41   ` Daniel Walker
2004-10-10 19:46     ` Ingo Molnar
2004-10-10 21:20     ` Andrew Morton
2004-10-10 21:59       ` Ingo Molnar
2004-10-11 17:53         ` Daniel Walker
2004-10-11 20:49           ` Ingo Molnar
2004-10-11 21:44             ` Sven Dietrich
2004-10-11 21:54               ` Ingo Molnar
2004-10-11 23:05                 ` Sven Dietrich
2004-10-12  5:50                   ` Ingo Molnar
2004-10-14  5:09                     ` Dipankar Sarma
2004-10-14  7:18                       ` Ingo Molnar
2004-10-15 14:59                         ` Paul E. McKenney
2004-10-15 15:45                           ` Ingo Molnar
2004-10-15 16:40                             ` Paul E. McKenney
2004-10-15 16:45                               ` Paul E. McKenney
2004-10-17 17:12                       ` Ingo Molnar
2004-10-12 18:50             ` Daniel Walker
2004-10-12 19:46               ` [Ext-rt-dev] " Thomas Gleixner
2004-10-12 20:31                 ` Sven Dietrich
2004-10-12 20:37                   ` Thomas Gleixner
2004-10-13  0:30                   ` George Anzinger
2004-10-12 21:12                 ` Bill Huey
2004-10-12 21:24                   ` Bill Huey
2004-10-12 21:32                     ` Thomas Gleixner
2004-10-12 23:13                       ` Bill Huey
2004-10-12 21:41                   ` Sven Dietrich
2004-10-12 22:57                     ` Bill Huey
2004-10-12 23:17                       ` Adam Heath
2004-10-12 23:36                         ` Lee Revell
2004-10-12 23:25                       ` Thomas Gleixner
2004-10-13  2:02                       ` K.R. Foley
2004-10-13 13:39                       ` Martijn Sipkema
2004-10-13 13:26                         ` La Monte H.P. Yarroll
2004-10-13 15:04                           ` Martijn Sipkema
2004-10-13 14:55                             ` Kurt Wall
2004-10-13 14:52                               ` Christoph Hellwig
2004-10-13 15:56                         ` Lee Revell
2004-10-13 16:13                           ` Robert Love
2004-10-13 17:14                           ` Martijn Sipkema
2004-10-13  3:55                     ` Bill Huey
2004-10-12 22:00                   ` Thomas Gleixner
2004-10-12 22:36                     ` Bill Huey
2004-10-12 23:10                       ` Thomas Gleixner [this message]
2004-10-12 23:33                         ` Bill Huey
2004-10-12 23:37                           ` Thomas Gleixner
2004-10-12 23:52                             ` Bill Huey
2004-10-13  0:59                         ` Valdis.Kletnieks
2004-10-10 12:21 ` John Richard Moser
2004-10-10 17:26   ` Lee Revell
2004-10-10 18:45     ` John Richard Moser
2004-10-10 20:20       ` Ingo Molnar
2004-10-10 20:44         ` John Richard Moser
2004-10-10 17:29   ` Daniel Walker

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=1097622634.19549.235.camel@thomas \
    --to=tglx@linutronix.de \
    --cc=akpm@osdl.org \
    --cc=amakarov@ru.mvista.com \
    --cc=bhuey@lnxw.com \
    --cc=dwalker@mvista.com \
    --cc=ext-rt-dev@mvista.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=niehaus@ittc.ku.edu \
    /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