Re: [RFC 1/3 v3] mm: iommu: An API to unify IOMMU, CPU and device memory management

2010-07-21 Thread stepanm
> * >> > This is difficult to achieve without remapping kernel memory using L2 >> > page tables, so we can unmap pages on 4K page granularity. That's >> > going to increase TLB overhead and result in lower system performance >

Re: [RFC 1/3 v3] mm: iommu: An API to unify IOMMU, CPU and device memory management

2010-07-20 Thread stepanm
> What is the problem about mapping a 1MB buffer with the DMA API? > > Possibly, an IOMMU can't find space for 1MB but it's not the problem of the DMA API. As you have pointed out, one of the issues is that allocation can fail. While technically VCMM allocations can fail as well, these allocations

Re: [RFC 1/3 v3] mm: iommu: An API to unify IOMMU, CPU and device memory management

2010-07-20 Thread stepanm
Russell- If a driver wants to allow a device to access memory (and cache coherency is off/not present for device addesses), the driver needs to remap that memory as non-cacheable. Suppose there exists a chunk of physically-contiguous memory (say, memory reserved for device use) that happened to be