Re: Memory Barrier Definitions

From: Rusty Russell (rusty@rustcorp.com.au)
Date: Mon May 13 2002 - 18:28:19 EST


In message <Pine.LNX.4.44.0205130938380.19524-100000@home.transmeta.com> you wr
ite:
> We're _not_ going to make up a complicated, big fancy new model. We might
> tweak the current one a bit. And if that means that some architectures get
> heavier barriers than they strictly need, then so be it. There are two
> overriding concerns:
>
> - sanity: maybe it's better to have one mb() that is a sledgehammer but
> obvious, than it is to have many subtle variations that are just asking
> for subtle bugs.

NO NO NO. Look at what actually happens now:

        void init_bh(int nr, void (*routine)(void))
        {
                bh_base[nr] = routine;
                mb();
        }

Now, what is this mb() for? Are you sure?

If we can come up with a better fit between the macros and what the
code are trying to actually do, we win, even if they all map to the
same thing *today*. While we're there, if we can get something that
fits with different architectures, great.

Clearer?
Rusty.

--
  Anyone who quotes me in their sig is an idiot. -- Rusty Russell.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Tue May 14 2002 - 12:00:21 EST