freebsd-nq/sys/powerpc/powerpc
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
..
altivec.c
autoconf.c
bcopy.c
bus_machdep.c Replace eieio; sync for creating bus-space memory barriers with sync. 2012-04-22 18:54:51 +00:00
busdma_machdep.c Reform the busdma API so that new types may be added without modifying 2013-02-12 16:57:20 +00:00
copystr.c
cpu.c MFcalloutng: 2013-02-28 10:46:54 +00:00
db_disasm.c
db_hwwatch.c
db_interface.c
db_trace.c Let us manage differences of Book-E PowerPC variations i.e. vendor / 2012-05-27 10:25:20 +00:00
dump_machdep.c Add the watchdogs patting during the (shutdown time) disk syncing and 2011-04-28 16:02:05 +00:00
elf32_machdep.c
elf64_machdep.c
exec_machdep.c Do not restore the register holding the TLS pointer when doing various 2012-04-11 00:00:40 +00:00
fpu.c
fuswintr.c
gdb_machdep.c Let us manage differences of Book-E PowerPC variations i.e. vendor / 2012-05-27 10:25:20 +00:00
genassym.c Let us manage differences of Book-E PowerPC variations i.e. vendor / 2012-05-27 10:25:20 +00:00
in_cksum.c
intr_machdep.c Mark MALLOC_DEFINEs static that have no corresponding MALLOC_DECLAREs. 2011-11-07 06:44:47 +00:00
iommu_if.m - Change contigmalloc() to use the vm_paddr_t type instead of an unsigned 2012-03-01 19:58:34 +00:00
mem.c
mmu_if.m Add pmap function pmap_copy_pages(), which copies the content of the 2013-03-14 20:18:12 +00:00
mp_machdep.c MFC 2011-06-24 16:35:40 +00:00
openpic_fdt.c Move OpenPIC FDT bus glue to a shared location, so that other PowerPC 2012-05-26 21:02:49 +00:00
openpic.c Make the intended change. 2011-05-10 13:48:21 +00:00
pic_if.m Add the powerpc support. 2011-05-09 16:16:15 +00:00
platform_if.m
platform.c Fix physical address type to vm_paddr_t. 2012-05-24 21:13:24 +00:00
pmap_dispatch.c Implement the concept of the unmapped VMIO buffers, i.e. buffers which 2013-03-19 14:13:12 +00:00
sc_machdep.c
setjmp.S This commit adds profiling support for powerpc64. Now we can do application 2012-01-20 22:34:19 +00:00
sigcode32.S
sigcode64.S
stack_machdep.c
suswintr.c
syncicache.c
sys_machdep.c
uio_machdep.c