Linux-kernel mailing list archive 2000-06,: [patch] smp-2.3.43-B5, x86 SMP fixes

# [patch] smp-2.3.43-B5, x86 SMP fixes

Ingo Molnar (mingo@chiara.csoma.elte.hu)
Tue, 8 Feb 2000 13:27:36 +0100 (CET)

- Messages sorted by: [ date ][ thread ][ subject ][ author ]
- Next message: Adrian Bunk: "Re: 2.3.42: error when compiling"
- Previous message: Thomas Sailer: "Re: pci_alloc_consistent"
- Next in thread: Manfred Spraul: "Re: [patch] smp-2.3.43-B5, x86 SMP fixes"
- Reply: Manfred Spraul: "Re: [patch] smp-2.3.43-B5, x86 SMP fixes"

This message is in MIME format. The first part should be readable text,
while the remaining parts are likely unreadable without MIME-aware tools.
Send mail to mime@docserver.cac.washington.edu for more info.

--79888902-700850814-950008202=:1929
Content-Type: TEXT/PLAIN; CHARSET=US-ASCII
Content-ID: <Pine.LNX.4.10.10002081318582.2946@chiara.csoma.elte.hu>

SMP pre2-2.3.43 is pretty unstable due to the x86 SMP TLB flush changes.
This patch fixes these bugs and cleans up the TLB changes so that it fits
nicer into the existing x86/SMP framework.

Changes in smp-2.3.43-B5:

- send IPIs only to CPUs which are affected. This ment that
send_IPI_single() was replaced by send_IPI_mask() (no slowdown at all
in smp_send_reschedule()), and that send_IPI_mask() from now on can
send IPIs to an arbitrary group of CPUs. This change was enabled by
the mm->cpu_vm_mask & recent TLB-changes and by the transition to
logical APIC addressing mode. Quad and 8-way systems should see a
noticeable cross-CPU TLB-flush cost reduction from this.

- got rid of the cpu_online_mask check - with the above change it's
unnecessery. (not online CPUs cannot have bits set in any
mm->cpu_vm_mask.)

- exported the check for cpu_mask into the global flush functions.
!cpu_mask is actually the common case, no need to call
flush_tlb_others() just to discover in 99% of the cases that we have
to return immediately. (inlining flush_tlb_others() is not good
either, it's a rather long function and is called from several
functions.)

- (small cleanups)

pre2-2.3.43 is now completely stable here.

-- mingo

Changes in smp-2.3.43-B1:

- reverses parts of the pgtable.h flush_tlb optimization. It's just too
complex to try to be too smart about flushing TLBs in an IRQ context.
This bug causes frequent SMP crashes on vanilla 2.3.42 and
pre2-2.3.43.

- adds Linus' suggested 'fuzzy parsing' fix to
IO_APIC_get_PCI_irq_vector() - this should fix some of the SMP + USB
problems reported. It might also introduce problems on other systems
so we'll see.

-- mingo

--79888902-700850814-950008202=:1929
Content-Type: TEXT/PLAIN; CHARSET=US-ASCII; NAME="smp-2.3.43-B1"
Content-Transfer-Encoding: BASE64
Content-ID: <Pine.LNX.4.10.10002081210020.1929@chiara.csoma.elte.hu>
Content-Description:
Content-Disposition: ATTACHMENT; FILENAME="smp-2.3.43-B1"

LS0tIGxpbnV4L2luY2x1ZGUvYXNtLWkzODYvcGd0YWJsZS5oLm9yaWcyCVR1
ZSBGZWIgIDggMDI6MzA6MTMgMjAwMA0KKysrIGxpbnV4L2luY2x1ZGUvYXNt
LWkzODYvcGd0YWJsZS5oCVR1ZSBGZWIgIDggMDI6NTY6MzIgMjAwMA0KQEAg
LTI5LDEyICsyOSwxMyBAQA0KIA0KICNkZWZpbmUgX19mbHVzaF90bGIoKQkJ
CQkJCQlcDQogCWRvIHsJCQkJCQkJCVwNCi0JCV9fYXNtX18gX192b2xhdGls
ZV9fCQkJCQlcDQotCQkJKCJtb3ZsICUwLCAlJWNyMzsiCQkJCVwNCi0JCQkJ
OgkJCQkJXA0KLQkJCQk6ICJyIiBfX3BhKGN1cnJlbnQtPmFjdGl2ZV9tbS0+
cGdkKQlcDQotCQkJCTogIm1lbW9yeSIJCQkJXA0KLQkJKTsJCQkJCQkJXA0K
KwkJdW5zaWduZWQgaW50IHRtcHJlZzsJCQkJCVwNCisJCQkJCQkJCQlcDQor
CQlfX2FzbV9fIF9fdm9sYXRpbGVfXygJCQkJCVwNCisJCQkibW92bCAlJWNy
MywgJTA7ICAjIGZsdXNoIFRMQiBcbiIJCVwNCisJCQkibW92bCAlMCwgJSVj
cjM7ICAgICAgICAgICAgICBcbiIJCVwNCisJCQk6ICI9ciIgKHRtcHJlZykJ
CQkJCVwNCisJCQ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IDAgJiYgZGV2LT5idXMtPnBhcmVudCkg
eyAvKiBnbyBiYWNrIHRvIHRoZSBicmlkZ2UgKi8NCiAJCQkJCXN0cnVjdCBw
Y2lfZGV2ICogYnJpZGdlID0gZGV2LT5idXMtPnNlbGY7DQogDQpAQCAtMTE0
Miw2ICsxMTQ2LDcgQEANCiAJCQkJCQlwcmludGsoS0VSTl9XQVJOSU5HICJQ
Q0k6IHVzaW5nIFBQQihCJWQsSSVkLFAlZCkgdG8gZ2V0IGlycSAlZFxuIiwg
DQogCQkJCQkJCWJyaWRnZS0+YnVzLT5udW1iZXIsIFBDSV9TTE9UKGJyaWRn
ZS0+ZGV2Zm4pLCBwaW4sIGlycSk7DQogCQkJCX0NCisjZW5kaWYNCiAJCQkJ
aWYgKGlycSA+PSAwKSB7DQogCQkJCQlwcmludGsoIlBDSS0+QVBJQyBJUlEg
dHJhbnNmb3JtOiAoQiVkLEklZCxQJWQpIC0+ICVkXG4iLA0KIAkJCQkJCWRl
di0+YnVzLT5udW1iZXIsIFBDSV9TTE9UKGRldi0+ZGV2Zm4pLCBwaW4sIGly
cSk7DQo=
--79888902-700850814-950008202=:1929--

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

- Next message: Adrian Bunk: "Re: 2.3.42: error when compiling"
- Previous message: Thomas Sailer: "Re: pci_alloc_consistent"
- Next in thread: Manfred Spraul: "Re: [patch] smp-2.3.43-B5, x86 SMP fixes"
- Reply: Manfred Spraul: "Re: [patch] smp-2.3.43-B5, x86 SMP fixes"