linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC v2 0/2] swiotlb performance optimizations
@ 2022-07-18  1:28 Chao Gao
  2022-07-18  1:28 ` [RFC v2 1/2] swiotlb: use bitmap to track free slots Chao Gao
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Chao Gao @ 2022-07-18  1:28 UTC (permalink / raw)
  To: linux-kernel, iommu
  Cc: dave.hansen, len.brown, tony.luck, rafael.j.wysocki,
	reinette.chatre, dan.j.williams, kirill.shutemov,
	sathyanarayanan.kuppuswamy, ilpo.jarvinen, ak,
	alexander.shishkin, Chao Gao

Intent of this post:
 Seek reviews from Intel reviewers and anyone else in the list
 interested in IO performance in confidential VMs. Need some acked-by
 reviewed-by tags before I can add swiotlb maintainers to "to/cc" lists
 and ask for a review from them.

Changes from v1 to v2:
- rebase to the latest dma-mapping tree.
- drop the duplicate patch for mitigating lock contention
- re-collect perf data

swiotlb is now widely used by confidential VMs. This series optimizes
swiotlb to reduce cache misses and lock contention during bounce buffer
allocation/free and memory bouncing to improve IO workload performance in
confidential VMs.

Here are some FIO tests we did to demonstrate the improvement.

Test setup
----------

A normal VM with 8vCPU and 32G memory, swiotlb is enabled by swiotlb=force.
FIO block size is 4K and iodepth is 256. Note that a normal VM is used so
that others lack of necessary hardware to host confidential VMs can reproduce
results below.

Results
-------

1 FIO job	read/write	IOPS (k)
vanilla		read		216 
		write		251 
optimized	read		250 
		write		270 

1-job FIO sequential read/write perf increase by 19% and 8% respectively.

Chao Gao (2):
  swiotlb: use bitmap to track free slots
  swiotlb: Allocate memory in a cache-friendly way

 include/linux/swiotlb.h |   8 ++-
 kernel/dma/swiotlb.c    | 127 +++++++++++++++++-----------------------
 2 files changed, 60 insertions(+), 75 deletions(-)

-- 
2.25.1


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-08-05 11:54 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-18  1:28 [RFC v2 0/2] swiotlb performance optimizations Chao Gao
2022-07-18  1:28 ` [RFC v2 1/2] swiotlb: use bitmap to track free slots Chao Gao
2022-07-18  1:28 ` [RFC v2 2/2] swiotlb: Allocate memory in a cache-friendly way Chao Gao
2022-08-05 19:55 ` [RFC v2 0/2] swiotlb performance optimizations Chao Gao

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).