public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>,
	Stefan Richter <stefanr@s5r6.in-berlin.de>,
	jmerkey@wolfmountaingroup.com, linux-kernel@vger.kernel.org,
	Nick Piggin <nickpiggin@yahoo.com.au>,
	David Howells <dhowells@redhat.com>
Subject: Re: [ANNOUNCE] mdb: Merkey's Linux Kernel Debugger 2.6.27-rc4 released
Date: Thu, 21 Aug 2008 09:43:39 -0700	[thread overview]
Message-ID: <20080821164339.GK6690@linux.vnet.ibm.com> (raw)
In-Reply-To: <alpine.LFD.1.10.0808210845280.3487@nehalem.linux-foundation.org>

On Thu, Aug 21, 2008 at 08:57:31AM -0700, Linus Torvalds wrote:
> 
> 
> On Thu, 21 Aug 2008, Paul E. McKenney wrote:
> > 
> > Let's face it, the C standard does not support concurrency, so we are
> > all in a state of sin in any case, forced to rely on combinations of
> > gcc-specific non-standard language extensions and assembly language.
> > 
> > Could be worse!!!
> 
> It _will_ be worse.

And not only that, it will be worse before the new standard is ratified.
Or to give the full version: "Could be worse, and probably soon will be."

> The C standard will eventually support concurrency (they are working on 
> it), and it will almost inevitably be a horrible pile of stinking sh*t, 
> and we'll continue to use the gcc inline asms instead, but then the gcc 
> people will ignore our complaints when they break the compiler, and say 
> that we should use the stinking-pile-of-sh*t ones that are built in.
> 
> No, I haven't seen the drafts, and maybe I'm overly pessimistic, but I'm 
> pretty sure that this is an area where (a) the kernel needs more support 
> than most normal pthread-like models and (b) any design-by-committee thing 
> simply won't be very good, because they'll have to try to make everybody 
> happy.

Let's see...

1.	Yes, the standard is being designed by a committee.

2.	No, it does not simply ratify the Linux kernel's memory-barrier
	API.  Yes, I did propose that.  No, the proposal did not go
	very far, but yes, it did get people's attention.  Yes, there
	were a number of people who asserted that Linux's approach was
	fundamentally broken/buggy/whatever.  Yes, they have changed
	their mind, most of them, anyway.  No, there is still zero
	chance of the standard simply ratifying smp_mb() and friends.

3.	Yes, we are working to get things closer to the Linux kernel's
	memory-barrier API into the spec.  No, they will likely not
	be exact.  Yes, getting some prominent committee members to
	countenance the idea of any sort of raw memory barrier (not
	connected directly to a load, store, or atomic operation)
	was a long-term project that finally made headway last May.
	Again, design by committee.

4.	No, the current Linux kernel memory-barrier API is not perfect.
	Yes, the proposed standard's preferred memory-barrier approach
	will make code easier to read and understand in many cases, and
	could potentially allow the compiler to do better optimizations
	(which, yes, might or might not be a good thing).  No, the
	proposed standard's preferred approach does not apply to all the
	cases in the Linux kernel.  No, I don't know whether or not it
	will be worthwhile to introduce the standard's preferred approach
	to the Linux kernel (though I suspect that it would be, but have
	to wait and see).  Either way, yes, the Linux kernel will likely
	continue to need to resort to non-standard gcc extensions and
	assembly language in at least some cases.  As you say, the kernel
	is not a garden-variety pthreads application.

But even if the Linux kernel never uses this stuff, user applications
will need it.  And there are a number of reasons why gcc extensions and
assembly language are even less welcome in many such applications than
they are in the Linux kernel.

> Oh, well.

Pretty much.  After all, if you wake up some morning and find that you
have absolutely no problems, your first action should be to check to
see if you are under six feet of earth.

							Thanx, Paul

      parent reply	other threads:[~2008-08-21 16:43 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-21  2:50 [ANNOUNCE] mdb: Merkey's Linux Kernel Debugger 2.6.27-rc4 released jmerkey
2008-08-21 10:07 ` Peter Zijlstra
2008-08-21 10:57   ` Stefan Richter
2008-08-21 11:02     ` Peter Zijlstra
2008-08-21 11:47       ` Paul E. McKenney
2008-08-21 12:03         ` Peter Zijlstra
2008-08-21 14:53           ` Paul E. McKenney
2008-08-21 14:58             ` jmerkey
2008-08-21 12:05         ` Stefan Richter
2008-08-21 12:26           ` jmerkey
     [not found]             ` <43593.166.70.238.46.1219321595.squirrel@webmail.wolfmountaingroup.com >
2008-08-21 12:35               ` jmerkey
2008-08-21 13:37             ` Nick Piggin
2008-08-21 14:09               ` Stefan Richter
2008-08-22  1:40                 ` Nick Piggin
2008-08-22  6:32                   ` Stefan Richter
2008-08-22 11:54                     ` jmerkey
2008-08-22 12:36                       ` Stefan Richter
2008-08-21 14:09               ` Peter Zijlstra
2008-08-21 14:30                 ` Paul E. McKenney
2008-08-21 14:14                   ` jmerkey
2008-08-21 14:48                   ` Peter Zijlstra
2008-08-21 16:21                 ` Avi Kivity
2008-08-21 21:06               ` Jeremy Fitzhardinge
2008-08-21 21:18                 ` Linus Torvalds
2008-08-21 21:21                   ` Jeremy Fitzhardinge
2008-08-24  4:25                   ` jmerkey
2008-08-26  8:26                     ` Andi Kleen
2008-08-27  1:49                       ` jmerkey
2008-08-22  1:37                 ` Nick Piggin
2008-08-21 14:02             ` Stefan Richter
2008-08-21 14:08               ` jmerkey
2008-08-21 15:22                 ` Stefan Richter
2008-08-21 15:02                   ` jmerkey
2008-08-21 15:57         ` Linus Torvalds
2008-08-21 16:18           ` Linus Torvalds
2008-08-21 16:48             ` Paul E. McKenney
2008-09-24  0:01               ` Paul E. McKenney
2008-08-21 16:43           ` Paul E. McKenney [this message]

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=20080821164339.GK6690@linux.vnet.ibm.com \
    --to=paulmck@linux.vnet.ibm.com \
    --cc=dhowells@redhat.com \
    --cc=jmerkey@wolfmountaingroup.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nickpiggin@yahoo.com.au \
    --cc=peterz@infradead.org \
    --cc=stefanr@s5r6.in-berlin.de \
    --cc=torvalds@linux-foundation.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox