Re: VM fixes [1/4]

From: Andrea Arcangeli
Date: Fri Dec 24 2004 - 13:50:14 EST


On Fri, Dec 24, 2004 at 01:41:03PM -0500, Lee Revell wrote:
> On Fri, 2004-12-24 at 19:20 +0100, Andrea Arcangeli wrote:
> > Yep, I remeber this was the case in some old alpha. But did they
> > support smp too? I can't see how that old hardware could support smp.
> > If they're UP they're fine.
>
> Isn't there still a race with PREEMPT? Or am I missing something?

I was thinking the same right now, OTOH used_math is most important
during exceptions and sure preempt can't affect exceptions.

There are a few corner cases that you'd need to check to know if
used_math can be changed during normal kernel context and not only
during exceptions. Probably it's racy though. But what's the point of
enabling preempt in such an ancient hardare?

I'm not against fixing it up though, but at least we'd need a

#define _HAVE_BYTE_ATOMIC_GRANULARITY
#define _HAVE_SHORT_ATOMIC_GRANULARITY

(assuming short is the minimal smp atomic granularity we support in
linux)

to be able to write optimal code for anything that 99.999% of the
userbase would be using.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/