Re: VM fixes [4/4]

From: Linus Torvalds
Date: Fri Dec 24 2004 - 18:42:37 EST




On Fri, 24 Dec 2004, Andrea Arcangeli wrote:
>
> If those old cpus really supported smp in linux, then fixing this bit is
> trivial, just change it to short. Do they support short at least?

It's not even about SMP. "byte" and "short" are not IRQ-safe or even
preemption-safe (although I guess alpha doesn't support CONFIG_PREEMPT
right now anyway) on pre-byte-access alphas.

Just don't do it. Maybe we'll never see another chip try what alpha did
(it was arguably the single biggest mistake the early alphas had, and
caused tons of system design trouble), but just use an "int".

That said, I'd suggest putting it in the thread structure instead. We
already have thread-safe flags there, just use one of the bits. Yes,
you'll need to use locked accesses to set it, but hey, how often does
something like this get set anyway? And then you just do ti _right_, using
set_thread_flag/clear_thread_flag etc..

Linus
-
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/