public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Rusty Russell <rusty@rustcorp.com.au>
To: Jamie Lokier <jamie@shareable.org>
Cc: Felipe W Damasio <felipewd@terra.com.br>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] kernel/futex.c: Uneeded memory barrier
Date: Mon, 15 Sep 2003 13:41:30 +1000	[thread overview]
Message-ID: <20030915054300.947EB2C290@lists.samba.org> (raw)
In-Reply-To: Your message of "Sun, 14 Sep 2003 15:08:39 +0100." <20030914140839.GC16525@mail.jlokier.co.uk>

In message <20030914140839.GC16525@mail.jlokier.co.uk> you write:
> Rusty Russell wrote:
> > I personally *HATE* the set_task_state()/__set_task_state() macros.
> > Simple assignments shouldn't be hidden behind macros, unless there's
> > something really subtle involved.
> 
> There _is_ something subtle involved.  Back in ye olde days, folk

This is what I hate about EMail.  You had two choices here: either I
don't understand you, or you don't understand me.  You chose wrong,
and wasted a lot of time on an (excellent, BTW) explanation.

I wasn't clear: __set_task_state() and __set_current_state() should
not exist, they are assignments.  set_task_state() should not exist,
since it's only used for current anyway.  set_current_state should be
split into set_current_interruptible() and
set_current_uninterruptible(), except...

> Sprinkling special kinds of memory barrier into all the drivers is not
> the kind of thing driver writers get right.  Also if you look at the

....hiding the subtlety in wrapper functions is the wrong approach.  We
have excellent wait_event, wait_event_interruptible and
wait_event_interruptible_timeout macros in wait.h which these drivers
should be using, which would make them simpler, less buggy and
smaller.

Hope that clarifies?
Rusty.
--
  Anyone who quotes me in their sig is an idiot. -- Rusty Russell.

  reply	other threads:[~2003-09-15  5:43 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-09-12 18:20 [PATCH] kernel/futex.c: Uneeded memory barrier Felipe W Damasio
2003-09-12 18:33 ` Felipe W Damasio
2003-09-15  9:39   ` Rusty Russell
2003-09-16 12:05     ` Jamie Lokier
2003-09-13 19:02 ` Jamie Lokier
2003-09-15  1:36   ` Rusty Russell
2003-09-14 11:39 ` Rusty Russell
2003-09-14 14:08   ` Jamie Lokier
2003-09-15  3:41     ` Rusty Russell [this message]
2003-09-15  9:23       ` Russell King
2003-09-15 16:32         ` Rusty Russell

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=20030915054300.947EB2C290@lists.samba.org \
    --to=rusty@rustcorp.com.au \
    --cc=felipewd@terra.com.br \
    --cc=jamie@shareable.org \
    --cc=linux-kernel@vger.kernel.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