summaryrefslogtreecommitdiffstats
path: root/sys/dev/isa/ast.c
diff options
context:
space:
mode:
authorpatrick <patrick@openbsd.org>2021-03-06 19:25:27 +0000
committerpatrick <patrick@openbsd.org>2021-03-06 19:25:27 +0000
commitb9720b9301f9fad471d9173d1cfb4d603d95aa5f (patch)
treef2073a93eef97ed40d198523722c4b9dac0ad3b3 /sys/dev/isa/ast.c
parentImplement last remaining bits to update from RFC 4941 to RFC 8981. (diff)
downloadwireguard-openbsd-b9720b9301f9fad471d9173d1cfb4d603d95aa5f.tar.xz
wireguard-openbsd-b9720b9301f9fad471d9173d1cfb4d603d95aa5f.zip
One major issue talked about in research papers is reducing the overhead
of the IOVA allocation. As far as I can see the current "best solution" is to cache IOVA ranges in percpu magazines. I don't think we have this issue at all thanks to bus_dmamap_create(9). The map is created ahead of time, and we know the maximum size of the DMA transfer. Since with smmu(4) we have IOVA per domain, allocating IOVA 'early' is essentially free. But pagetable mapping also incurs a performance penalty, since we allocate pagetable entry descriptors through pools. Since we have the IOVA early, we can allocate those early as well. This allocation is a bit more expensive though, but can be optimized further. All this means that there is no allocation overhead in hot code paths. The "only" thing remaining is assigning IOVA to the segments, adjusting the pagetable mappings, and flushing the IOTLB on unload. Maybe there's a way to do a combined flush for NICs, because we give a list of mbufs to the network stack and we could do the IOTLB invalidation only once right before we hand over the mbuf list to the upper layers.
Diffstat (limited to 'sys/dev/isa/ast.c')
0 files changed, 0 insertions, 0 deletions