Increasing swiotlb default
Hallo,
I discovered that swiotlb defaults to using only 2MB of RAM by default. That's IMHO far too small, especially since the consequences of overflow are so severe (panic) x86-64 has the same problem because it shares this code.
This patch increases it to 64MB by default.
-Andi
arch/ia64/lib/swiotlb.c renamed from arch/ia64/lib/swiotlb.c-o +1 -1
@@ -44,7 +44,7 @@/* * log of the size of each IO TLB slab. The number of slabs is command line controllable. */ -#define IO_TLB_SHIFT 11 +#define IO_TLB_SHIFT 16/* * Used to do a quick range check in swiotlb_unmap_single and swiotlb_sync_single_*, to see
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line · Andi Kleen
Andi> I discovered that swiotlb defaults to using only 2MB of RAM by Andi> default. That's IMHO far too small, especially since the Andi> consequences of overflow are so severe (panic) x86-64 has the Andi> same problem because it shares this code.
Andi> This patch increases it to 64MB by default.
You haven't actually tested this, have you? swiotlb.c has code which assumes that IO_TLB_SHIFT <= PAGE_SHIFT.
Also, 64MB could be a fairly significant fraction of a system's memory. Perhaps the default value should take the amount of system memory into account?
--david