Re: smp_rmb in mm/memory.c in 2.6.10

Andrea Arcangeli
2005-01-14T22:34:11Z

> > As to the smp_rmb() part, I believe it is required; we
> > are not talking about compiler reorderings,
On Fri, Jan 14, 2005 at 10:09:17PM +0000, Hugh Dickins wrote:
> Did need to be considered, but I still agree with
> myself that the function call makes it no problem.

I believe gcc is learning how to get around function calls, in this case
it's a different file that we're calling so it's very unlikely to get us
compiler problems.

But the real reason of the smp_rmb is the cpu, the compiler not.

> as I did when posting the patch to remove it).

Woops ... I must have missed it sorry, I owe you an apology! It has been
a failry busy week here around (some kernel testing stuff has been going
on here, eventually the kernel was not to blame so all completed well ;).

> Unless someone sees this differently, I should send a patch to
> restore the smp_rmb(), with a longer code comment on what it's for.

Sure go ahead. I was thinking the same. Originally the code was more
obvious when I did it with two counters, and then Paul improved it with
a single counter but now it deserves a bit more of commentary.

Thanks Hugh and Kanoj!