Re: VM fixes [1/4]

From: Andrea Arcangeli
Date: Fri Dec 24 2004 - 13:22:43 EST


On Fri, Dec 24, 2004 at 10:00:16AM -0800, David S. Miller wrote:
> On Fri, 24 Dec 2004 18:35:19 +0100
> Andrea Arcangeli <andrea@xxxxxxx> wrote:
>
> > I made used_math a char at the light of later patches. per-cpu atomicity
> > with byte granularity is provided by all archs AFIK.
>
> Older Alpha's need to read-modify-write a word to implement
> byte ops.

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.

The race is extremely tiny anyway, you'd need to write to the
/proc/<pid>/ file at the same time that used_math is toggled.

Or alternatively you'd need to kill the task due oom at the same time
used_math is toggled.

The race in PF_MEMDIE is more serious.

And false sharing with memdie and oomkilladj is zero, since they're
pratically readonly.
-
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/