mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Richard B. Johnson" <root@chaos.analogic.com>
To: Helge Hafting <helgehaf@aitel.hist.no>
Cc: Robert White <rwhite@casabyte.com>,
	Linux kernel <linux-kernel@vger.kernel.org>
Subject: Re: recursive spinlocks. Shoot.
Date: Tue, 20 May 2003 08:23:29 -0400 (EDT)	[thread overview]
Message-ID: <Pine.LNX.4.53.0305200809060.3996@chaos> (raw)
In-Reply-To: <3ECA189A.30300@aitel.hist.no>

On Tue, 20 May 2003, Helge Hafting wrote:

> Robert White wrote:
> > Er..
> >
> > The gnome wields a morality stick, the morality stick wields itself to the
> > gnome's hand...
> > ---more---
> > The gnome hits you... you feel better...
> >
> >
> > Your "moral position"...
> >
> > (quote) I want them to either learn to comprehend locking _properly_, or
> > take up gardening instead. (unquote)
> >
> > ...is critically flawed.
> >
> > In point of fact, "proper" locking, when combined with "proper" definitions
> > of an interface dictate that recursive locking is "better".  Demanding that
> > a call_EE_ know what locks a call_ER_ (and all antecedents of caller) will
> > have taken is not exactly good design.
>
> That depends on how big the total system is.  You can break things
> down into independent modules and submodules that don't know each other, but
> at some point people need to know a whole module to do it properly.
>
[SNIPPED...]

Recursive locking is a misnomer. It does during run-time that which
should have been done during design-time. In fact, there cannot
be any recursion associated with locking. A locking mechanism that
allows reentry or recursion is defective, both in design, and
implementation.

The nature of a lock is required to be such that if the locked object
is in use, no access to that object is allowed. Recursive locking
implies that if the lock is in use by the same thread that locked
it before, then access to that object is allowed. In other words,
if the coder (as opposed to designer) screwed up, the locking
mechanism will allow it. If this is the way students are being
taught to write code at the present time, all software will
be moved off-shore in the not too distant future. There is
absolutely no possible justification for such garbage. Just
because some idiot wrote an article and got it published,
doesn't mean this diatribe has any value at all.

Cheers,
Dick Johnson
Penguin : Linux version 2.4.20 on an i686 machine (797.90 BogoMips).
Why is the government concerned about the lunatic fringe? Think about it.


  reply	other threads:[~2003-05-20 12:08 UTC|newest]

Thread overview: 58+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-05-18  9:21 Peter T. Breuer
2003-05-18 16:30 ` Martin J. Bligh
2003-05-18 16:35   ` William Lee Irwin III
2003-05-18 16:49     ` Arjan van de Ven
2003-05-18 16:54       ` William Lee Irwin III
2003-05-18 17:14         ` Martin J. Bligh
2003-05-18 17:24     ` Peter T. Breuer
2003-05-18 22:34       ` David Woodhouse
2003-05-19 13:37         ` Peter T. Breuer
2003-05-19 13:45           ` Jens Axboe
2003-05-19 13:47           ` Arjan van de Ven
     [not found]           ` <mailman.1053352200.24653.linux-kernel2news@redhat.com>
2003-05-19 23:54             ` Pete Zaitcev
2003-05-20  0:03               ` viro
2003-05-20  0:03               ` Johannes Erdfelt
2003-05-20  3:12         ` Robert White
2003-05-20 11:59           ` Helge Hafting
2003-05-20 12:23             ` Richard B. Johnson [this message]
2003-05-20 21:05               ` Robert White
2003-05-20 21:42                 ` Richard B. Johnson
2003-05-20 23:06                   ` Robert White
2003-05-21 14:01                     ` Richard B. Johnson
2003-05-21 21:56                       ` Robert White
2003-05-22  0:13                         ` viro
2003-05-22  0:32                           ` Robert White
2003-05-22  0:46                         ` Carl-Daniel Hailfinger
2003-05-21  5:48                   ` Nikita Danilov
2003-05-22  1:00           ` Rik van Riel
2003-05-22  3:11             ` Robert White
2003-05-22  4:04               ` Nick Piggin
2003-05-22  4:42                 ` Peter T. Breuer
2003-05-22  5:09                   ` Nick Piggin
2003-05-23  0:19                 ` Robert White
2003-05-23  7:22                   ` Nikita Danilov
2003-05-23  9:07                     ` Helge Hafting
2003-05-23 12:18                     ` William Lee Irwin III
2003-05-24  2:39                       ` Robert White
2003-05-28 16:50                         ` Timothy Miller
2003-05-19  2:05       ` Kevin O'Connor
2003-05-19  6:19       ` Jan Hudec
2003-05-19 10:29       ` Helge Hafting
2003-05-19 11:37         ` Nikita Danilov
2003-05-22  1:21           ` Daniel Phillips
2003-05-19 14:28       ` Martin J. Bligh
2003-05-18 18:13 ` Davide Libenzi
     [not found] <20030518182010$0541@gated-at.bofh.it>
2003-05-18 19:09 ` Peter T. Breuer
2003-05-18 19:31   ` Davide Libenzi
2003-05-18 19:49     ` Peter T. Breuer
2003-05-18 20:13       ` Davide Libenzi
2003-05-19 20:47   ` Jan Hudec
     [not found] <20030518202013$5297@gated-at.bofh.it>
2003-05-18 23:15 ` Peter T. Breuer
2003-05-18 23:26   ` Davide Libenzi
2003-05-19 12:48     ` Peter T. Breuer
2003-05-19 17:15       ` Davide Libenzi
2003-05-19 17:27         ` Peter T. Breuer
2003-05-19 17:57           ` Alan Cox
2003-05-19 19:51         ` Peter T. Breuer
2003-05-19 20:22   ` Robert White
     [not found] <20030520231013$3d77@gated-at.bofh.it>
2003-05-21 14:16 ` Peter T. Breuer

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=Pine.LNX.4.53.0305200809060.3996@chaos \
    --to=root@chaos.analogic.com \
    --cc=helgehaf@aitel.hist.no \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rwhite@casabyte.com \
    /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

all inboxes | Powered by JetHome®