the bitrig master branch has been updated by pedro with 4 new commits:

commit a7ba181d36c429592754ee52619043f3cfff2a2b
diff: https://github.com/bitrig/bitrig/commit/a7ba181
author: Stefan Fritsch <[email protected]>
date: Mon Oct 6 20:34:59 2014 +0000

Make amd64 pmap more efficient on multi-processor

With the current implementation, when accessing an inactive pmap, its
ptes are mapped in the APTE range. This has the problem that the APTE
range is mapped on all CPUs and changes to the APTE must therefore be
followed by a remote TLB flush on all CPUs. This is very inefficient
because the costs increase quadratically with the number of CPUs.

Therefore, the code is changed to remove the APTE mechanism completely
and instead switch the pmap locally. A remote TLB flush is then only
done if the pmap is in use on the remote CPU. In the common case, this
will replace one TLB flush on all CPUs with two local TLB flushes.

An additional optimization is done in cases where only a single PTE of
an inactive pmap is accessed: The requested PTE is found by walking the
page tables manually via the direct mapping. This makes some more TLB
flushes unnecessary.

Furthermore, some code is reordered so that the TLB-shootdown-IPIs are
sent first, then more local processing takes place, and only afterwards
the CPU waits for the remote TLB-shootdowns to finish.

This diff is based on a patch for i386 by Artur Grabowski <art blahonga org>
from 2008. Some additional bits were taken from a different patch by
Artur from 2005.

Tested by many. OK mlarkin@

Adaptation to Bitrig + locking bits by pedro@

No objections.

M       sys/arch/amd64/amd64/pmap.c
M       sys/arch/amd64/include/pmap.h

commit fca87c4b5475c0746b26114e63bf2cb83cd984b4
diff: https://github.com/bitrig/bitrig/commit/fca87c4
author: Mike Larkin <[email protected]>
date: Wed Oct 1 19:41:07 2014 +0000

Move some hibernate #defines to pte.h and eliminate some duplicate defines
from hibernate code that were already defined in pte.h (with different
names). No functional change.

ok sf@, deraadt@

M       sys/arch/amd64/amd64/hibernate_machdep.c
M       sys/arch/amd64/include/hibernate_var.h
M       sys/arch/amd64/include/pte.h

commit 3274ee7014bb1ab360b48ec9b1b5be698631a04d
diff: https://github.com/bitrig/bitrig/commit/3274ee7
author: Stefan Fritsch <[email protected]>
date: Tue Sep 16 18:57:52 2014 +0000

Simple cleanups for amd64 pmap

- use __func__ in panics/printfs (fixes some out of sync function names)
- tell the compiler that code paths where we print diagnostics are unlikely
- use pmap_valid_entry() in some places
- remove KERNSPACE, which is not used anywhere

OK guenther@ mlarkin@ kettenis@

M       sys/arch/amd64/amd64/pmap.c
M       sys/arch/amd64/include/pmap.h

commit 4d86f0c66cf7ab16e0d5e0b3cd33ae5bec2facfc
diff: https://github.com/bitrig/bitrig/commit/4d86f0c
author: Stefan Fritsch <[email protected]>
date: Sun Aug 24 17:55:15 2014 +0000

remove trailing whitespace

M       sys/arch/amd64/amd64/pmap.c

Reply via email to