freebsd-dev/sys/powerpc/aim
Konstantin Belousov ee75e7de7b Implement the concept of the unmapped VMIO buffers, i.e. buffers which
do not map the b_pages pages into buffer_map KVA.  The use of the
unmapped buffers eliminate the need to perform TLB shootdown for
mapping on the buffer creation and reuse, greatly reducing the amount
of IPIs for shootdown on big-SMP machines and eliminating up to 25-30%
of the system time on i/o intensive workloads.

The unmapped buffer should be explicitely requested by the GB_UNMAPPED
flag by the consumer.  For unmapped buffer, no KVA reservation is
performed at all. The consumer might request unmapped buffer which
does have a KVA reserve, to manually map it without recursing into
buffer cache and blocking, with the GB_KVAALLOC flag.

When the mapped buffer is requested and unmapped buffer already
exists, the cache performs an upgrade, possibly reusing the KVA
reservation.

Unmapped buffer is translated into unmapped bio in g_vfs_strategy().
Unmapped bio carry a pointer to the vm_page_t array, offset and length
instead of the data pointer.  The provider which processes the bio
should explicitely specify a readiness to accept unmapped bio,
otherwise g_down geom thread performs the transient upgrade of the bio
request by mapping the pages into the new bio_transient_map KVA
submap.

The bio_transient_map submap claims up to 10% of the buffer map, and
the total buffer_map + bio_transient_map KVA usage stays the
same. Still, it could be manually tuned by kern.bio_transient_maxcnt
tunable, in the units of the transient mappings.  Eventually, the
bio_transient_map could be removed after all geom classes and drivers
can accept unmapped i/o requests.

Unmapped support can be turned off by the vfs.unmapped_buf_allowed
tunable, disabling which makes the buffer (or cluster) creation
requests to ignore GB_UNMAPPED and GB_KVAALLOC flags.  Unmapped
buffers are only enabled by default on the architectures where
pmap_copy_page() was implemented and tested.

In the rework, filesystem metadata is not the subject to maxbufspace
limit anymore. Since the metadata buffers are always mapped, the
buffers still have to fit into the buffer map, which provides a
reasonable (but practically unreachable) upper bound on it. The
non-metadata buffer allocations, both mapped and unmapped, is
accounted against maxbufspace, as before. Effectively, this means that
the maxbufspace is forced on mapped and unmapped buffers separately.
The pre-patch bufspace limiting code did not worked, because
buffer_map fragmentation does not allow the limit to be reached.

By Jeff Roberson request, the getnewbuf() function was split into
smaller single-purpose functions.

Sponsored by:	The FreeBSD Foundation
Discussed with:	jeff (previous version)
Tested by:	pho, scottl (previous version), jhb, bf
MFC after:	2 weeks
2013-03-19 14:13:12 +00:00
..
clock.c MFcalloutng: 2013-02-28 13:46:03 +00:00
copyinout.c Use the ABI-mandated thread pointer register (r2 for ppc32, r13 for ppc64) 2011-06-23 22:21:28 +00:00
interrupt.c Remove some dead code: unnecessary isyncs and memory sorting, which are 2011-06-02 14:15:44 +00:00
locore32.S Setup BAT0 and BAT1 on the Wii. 2012-11-21 08:04:21 +00:00
locore64.S Implement DTrace for PowerPC. This includes both 32-bit and 64-bit. 2012-11-07 23:45:09 +00:00
locore.S MFppc64: 2010-07-13 05:32:19 +00:00
machdep.c Switch the vm_object mutex to be a rwlock. This will enable in the 2013-03-09 02:32:23 +00:00
mmu_oea64.c Implement the concept of the unmapped VMIO buffers, i.e. buffers which 2013-03-19 14:13:12 +00:00
mmu_oea64.h Add an abstraction layer to the 64-bit AIM MMU's page table manipulation 2010-12-04 02:42:52 +00:00
mmu_oea.c Add pmap function pmap_copy_pages(), which copies the content of the 2013-03-14 20:18:12 +00:00
moea64_if.m Add an abstraction layer to the 64-bit AIM MMU's page table manipulation 2010-12-04 02:42:52 +00:00
moea64_native.c Merge from vmobj-rwlock branch: 2013-02-26 01:00:11 +00:00
mp_cpudep.c Use a global __pure2 function instead of a global register variable for 2011-11-17 15:49:42 +00:00
nexus.c - There's no need to overwrite the default device method with the default 2011-11-22 21:28:20 +00:00
slb.c Flip the semantic of M_NOWAIT to only require the allocation to not 2012-11-14 20:01:40 +00:00
swtch32.S Fix final bugs in memory barriers on PowerPC: 2012-05-04 16:00:22 +00:00
swtch64.S Fix final bugs in memory barriers on PowerPC: 2012-05-04 16:00:22 +00:00
trap_subr32.S Add FBT for PowerPC DTrace. Also, clean up the DTrace assembly code, 2013-03-18 05:30:18 +00:00
trap_subr64.S Add FBT for PowerPC DTrace. Also, clean up the DTrace assembly code, 2013-03-18 05:30:18 +00:00
trap.c Add FBT for PowerPC DTrace. Also, clean up the DTrace assembly code, 2013-03-18 05:30:18 +00:00
uma_machdep.c Flip the semantic of M_NOWAIT to only require the allocation to not 2012-11-14 20:01:40 +00:00
vm_machdep.c For architectures not using direct map , and requiring real KVA page for 2011-01-18 21:57:02 +00:00