mm->context[NR_CPUS] and pci fix check [was Re: Alpha SCSI error on 2.4.0-test11]

From: Andrea Arcangeli (andrea@suse.de)
Date: Fri Dec 01 2000 - 09:18:42 EST


On Fri, Dec 01, 2000 at 02:56:19PM +0300, Ivan Kokshaysky wrote:
> Andrea, could you try this?

that's the right fix thanks (please send to Linus).

BTW, here is a preview of the asn SMP race fix for 2.4.x:

        ftp://ftp.us.kernel.org/pub/linux/kernel/people/andrea/patches/v2.4/2.4.0-test12-pre2/alpha-ASN-SMP-races-2.4.x-1

I'm still left the #ifdef __alpha__ around the context[NR_CPUS] to avoid
breakage of other archs but that should be probably removed: any CPU with
per-CPU ASNs like alpha needs per-CPU per-MM context information to avoid
wasting ASNs when the task migrate CPU or with threads.

The ASN race fix for 2.4.x is implemented differently than the 2.2.x previous
version, in 2.4.x I'm avoiding the __cli, so the whole context switch runs with
irq _enabled_ as usual (unlike in the 2.2.x version). I'm also taking care not
to waste any ASN than strictly necessary while doing the race-check after the
context switch completed.

And here a new version of the 2.2.x one (I was clearing all other cpu context
from activate_context, and that wasn't necessary but it couldn't hurt so
it's a minor update):

        ftp://ftp.us.kernel.org/pub/linux/kernel/people/andrea/patches/v2.2/2.2.18pre23/alpha-ASN-SMP-races-3

(the cli-less logic could be backported to 2.2.x but OTOH the cli way looks
simpler so more appropriate for 2.2.x)

Andrea
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Thu Dec 07 2000 - 21:00:07 EST