freebsd-skq/sys
Hans Petter Selasky 65b017b420 Avoid use of contiguous memory allocations in busdma when possible.
This patch improves the boundary checks in busdma to allow more cases
using the regular page based kernel memory allocator. Especially in
the case of having a non-zero boundary in the parent DMA tag. For
example AMD64 based platforms set the PCI DMA tag boundary to
PCI_DMA_BOUNDARY, 4GB, which before this patch caused contiguous
memory allocations to be preferred when allocating more than PAGE_SIZE
bytes. Even if the required alignment was less than PAGE_SIZE bytes.

This patch also fixes the nsegments check for using kmem_alloc_attr()
when the maximum segment size is less than PAGE_SIZE bytes.

Updated some comments describing the code in question.

Differential Revision:	https://reviews.freebsd.org/D10645
Reviewed by:		kib, jhb, gallatin, scottl
MFC after:		1 week
Sponsored by:		Mellanox Technologies
2017-05-16 14:21:37 +00:00
..
amd64 Ensure that resume path on amd64 only accesses page tables for normal 2017-05-15 20:52:43 +00:00
arm Avoid use of contiguous memory allocations in busdma when possible. 2017-05-16 14:21:37 +00:00
arm64 Avoid use of contiguous memory allocations in busdma when possible. 2017-05-16 14:21:37 +00:00
boot Set the right variable when overriding the default console speed. 2017-05-11 18:53:28 +00:00
bsm
cam Add basic programmable early warning error injection to the sa(4) driver. 2017-05-05 20:00:53 +00:00
cddl Ensure that profile and tick probes provide a non-zero PC value. 2017-05-15 21:44:40 +00:00
compat Fix init order in the LinuxKPI for RCU support. 2017-05-09 12:51:42 +00:00
conf [iwm] Factor out firmware station handling into if_iwm_sta.c. 2017-05-12 06:03:23 +00:00
contrib Add necessary bits to get FreeBSD booting on the Unifi Security Gateway 2017-05-07 22:04:12 +00:00
crypto
ddb
dev Add the Marvell SDHCI controller to the list of supported devices in 2017-05-16 05:10:15 +00:00
fs Make nfscl_mtofh() return ENXIO when *nfhpp == NULL. 2017-05-15 13:14:13 +00:00
gdb
geom Synchronize unclean mirrors before adding them to a running gmirror. 2017-05-02 23:29:42 +00:00
gnu [mips] [rt2880] Add oldest Ralink MIPS SOC RT2880 support code. 2017-05-06 06:20:34 +00:00
i386
isa
kern mnt_vnode_next_active: use conventional lock order when trylock fails. 2017-05-15 10:02:45 +00:00
kgssapi
libkern
mips Avoid use of contiguous memory allocations in busdma when possible. 2017-05-16 14:21:37 +00:00
modules [iwm] Factor out firmware station handling into if_iwm_sta.c. 2017-05-12 06:03:23 +00:00
net Persistently store NIC's hardware MAC address, and add a way to retrive it 2017-05-11 06:46:39 +00:00
net80211
netgraph
netinet Reduce in_pcbinfo_init() by two params. No users supply any flags to this 2017-05-15 21:58:36 +00:00
netinet6 Add missing braces around MCAST_EXCLUDE check when KTR support is 2017-05-13 18:41:24 +00:00
netipsec
netpfil pf: Fix vnet initialisation 2017-05-07 14:33:58 +00:00
netsmb
nfs
nfsclient
nfsserver
nlm
ofed
opencrypto Use const with some read-only buffers in opencrypto APIs. 2017-05-09 18:28:42 +00:00
powerpc Correct pa argument type for pmap_kenter_attr() 2017-05-16 03:31:49 +00:00
riscv
rpc Fix the client side krpc from doing TCP reconnects for ERESTART from sosend(). 2017-05-07 12:12:45 +00:00
security
sparc64 Fix a bug introduced as part of r287726; use the right device_t for 2017-04-29 00:53:17 +00:00
sys Persistently store NIC's hardware MAC address, and add a way to retrive it 2017-05-10 22:13:47 +00:00
teken
tests style(9): sort headers 2017-05-09 05:08:47 +00:00
tools
ufs Remove spl() calls from UFS code. 2017-05-07 14:59:45 +00:00
vm Emulate pre-r317061 ABI. 2017-05-02 18:40:41 +00:00
x86 Avoid use of contiguous memory allocations in busdma when possible. 2017-05-16 14:21:37 +00:00
xdr
xen
Makefile Fix "make cscope-clean" when .OBJDIR already exists 2017-05-01 05:59:52 +00:00