freebsd-dev/sys/x86
Konstantin Belousov 6b7c46afec Right now, for non-coherent DMARs, page table update code flushes the
cache for whole page containing modified pte, and more, only last page
in the series of the consequtive pages is flushed (i.e. the affected
mappings should be larger than 2MB).

Avoid excessive flushing and do missed neccessary flushing, by
splitting invalidation and unmapping.  For now, flush exactly the
range of the changed pte.  This is still somewhat bigger than
neccessary, since pte is 8 bytes, while cache flush line is at least
32 bytes.

The originator of the issue reports that after the change,
'dmar_bus_dmamap_unload went from 13,288 cycles down to
3,257. dmar_bus_dmamap_load_buffer went from 9,686 cycles down to
3,517.  and I am now able to get line 1GbE speed with Netperf TCP
(even with 1K message size).'

Diagnosed and tested by:	Nadav Amit <nadav.amit@gmail.com>
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2015-01-11 20:27:15 +00:00
..
acpica Create a cpuset mask for each NUMA domain that is available in the 2015-01-08 15:53:13 +00:00
bios Add missing header needed by free(9). 2012-09-30 15:42:20 +00:00
cpufreq Pull in r267961 and r267973 again. Fix for issues reported will follow. 2014-06-28 03:56:17 +00:00
include Update Features2 to display SDBG capability of processor. This is 2015-01-08 16:50:35 +00:00
iommu Right now, for non-coherent DMARs, page table update code flushes the 2015-01-11 20:27:15 +00:00
isa Virtual machines can easily have more than 16 option ROMs and 2014-10-22 01:37:32 +00:00
pci Pull in r267961 and r267973 again. Fix for issues reported will follow. 2014-06-28 03:56:17 +00:00
x86 Update Features2 to display SDBG capability of processor. This is 2015-01-08 16:50:35 +00:00
xen Fix warning about possible use of uninitialized variable. 2015-01-02 08:42:44 +00:00