Skip to content
  • Linas Vepstas's avatar
    5d2efba6
    [POWERPC] Use 4kB iommu pages even on 64kB-page systems · 5d2efba6
    Linas Vepstas authored
    
    
    The 10Gigabit ethernet device drivers appear to be able to chew
    up all 256MB of TCE mappings on pSeries systems, as evidenced by
    numerous error messages:
    
     iommu_alloc failed, tbl c0000000010d5c48 vaddr c0000000d875eff0 npages 1
    
    Some experimentation indicates that this is essentially because
    one 1500 byte ethernet MTU gets mapped as a 64K DMA region when
    the large 64K pages are enabled. Thus, it doesn't take much to
    exhaust all of the available DMA mappings for a high-speed card.
    
    This patch changes the iommu allocator to work with its own
    unique, distinct page size. Although the patch is long, its
    actually quite simple: it just #defines a distinct IOMMU_PAGE_SIZE
    and then uses this in all the places that matter.
    
    As a side effect, it also dramatically improves network performance
    on platforms with H-calls on iommu translation inserts/removes (since
    we no longer call it 16 times for a 1500 bytes packet when the iommu HW
    is still 4k).
    
    In the future, we might want to make the IOMMU_PAGE_SIZE a variable
    in the iommu_table instance, thus allowing support for different HW
    page sizes in the iommu itself.
    
    Signed-off-by: default avatarLinas Vepstas <linas@austin.ibm.com>
    Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
    Acked-by: default avatarOlof Johansson <olof@lixom.net>
    Acked-by: default avatarStephen Rothwell <sfr@canb.auug.org.au>
    Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
    5d2efba6
    [POWERPC] Use 4kB iommu pages even on 64kB-page systems
    Linas Vepstas authored
    
    
    The 10Gigabit ethernet device drivers appear to be able to chew
    up all 256MB of TCE mappings on pSeries systems, as evidenced by
    numerous error messages:
    
     iommu_alloc failed, tbl c0000000010d5c48 vaddr c0000000d875eff0 npages 1
    
    Some experimentation indicates that this is essentially because
    one 1500 byte ethernet MTU gets mapped as a 64K DMA region when
    the large 64K pages are enabled. Thus, it doesn't take much to
    exhaust all of the available DMA mappings for a high-speed card.
    
    This patch changes the iommu allocator to work with its own
    unique, distinct page size. Although the patch is long, its
    actually quite simple: it just #defines a distinct IOMMU_PAGE_SIZE
    and then uses this in all the places that matter.
    
    As a side effect, it also dramatically improves network performance
    on platforms with H-calls on iommu translation inserts/removes (since
    we no longer call it 16 times for a 1500 bytes packet when the iommu HW
    is still 4k).
    
    In the future, we might want to make the IOMMU_PAGE_SIZE a variable
    in the iommu_table instance, thus allowing support for different HW
    page sizes in the iommu itself.
    
    Signed-off-by: default avatarLinas Vepstas <linas@austin.ibm.com>
    Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
    Acked-by: default avatarOlof Johansson <olof@lixom.net>
    Acked-by: default avatarStephen Rothwell <sfr@canb.auug.org.au>
    Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
Loading