Skip to contentSkip to conversation

Increasing swiotlb default

PATCH Andi Kleen 2 participants 2 messages Jun 24, 2004 – Jun 26, 2004

lore
Share & tools
lore

Andi Kleen

author
#0 lore raw

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
diff -u linux/arch/ia64/lib/swiotlb.c-o linux/arch/ia64/lib/swiotlb.c
@@ -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
#1 lore raw
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