summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python
diff options
context:
space:
mode:
authorAlexey Kardashevskiy <aik@amd.com>2022-10-31 19:13:27 +1100
committerChristoph Hellwig <hch@lst.de>2022-11-01 12:06:12 +0100
commit8d58aa484920c4f9be4834a7aeb446cdced21a37 (patch)
treed54fdd6ea0c3fae8362cc37a0ce4f3805f2fec75 /tools/perf/scripts/python
parent30a0b95b1335e12efef89dd78518ed3e4a71a763 (diff)
swiotlb: reduce the swiotlb buffer size on allocation failure
At the moment the AMD encrypted platform reserves 6% of RAM for SWIOTLB or 1GB, whichever is less. However it is possible that there is no block big enough in the low memory which make SWIOTLB allocation fail and the kernel continues without DMA. In such case a VM hangs on DMA. This moves alloc+remap to a helper and calls it from a loop where the size is halved on each iteration. This updates default_nslabs on successful allocation which looks like an oversight as not doing so should have broken callers of swiotlb_size_or_default(). Signed-off-by: Alexey Kardashevskiy <aik@amd.com> Reviewed-by: Pankaj Gupta <pankaj.gupta@amd.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions