the bitrig amd64_pmap branch has been created by pedro.

it is 0 commits behind master, and 4 commits ahead.

commit 91d415804cf7bf4ea923fecf5d5a1ed4bb888015
diff: https://github.com/bitrig/bitrig/commit/91d4158
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@

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

commit 8d5d0d4b5223d0ca479503ba04750fc80359dbe9
diff: https://github.com/bitrig/bitrig/commit/8d5d0d4
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 9e15c1f7e6c37b49c3d899443608bfc0df92a027
diff: https://github.com/bitrig/bitrig/commit/9e15c1f
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 bb06dec0ed29b58289c65a083261fe135e90f2c5
diff: https://github.com/bitrig/bitrig/commit/bb06dec
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