On Tue, 2008-07-15 at 11:24 -0400, Mikulas Patocka wrote:
I don't think that's true ... otherwise parisc would be falling over
left right and centre.
This isn't really true either. A lot of devices with a high sg slot
count are still less efficient than an iommu for programming.
Even if they're not, on parisc we have to program the iommu, we can't
bypass, so it still makes sense to only have one large sg list (in the
iommu) and one small one (in the device). Having two large ones reduces
our I/O throughput because of the extra overhead.
It's not about fitting a request, it's about efficient processing.
Yes there is. Both the iommu and the device have to traverse large SG
lists. This is where the inefficiency lies. On PA, we use exactly the
same number of iotlb slots whether virtual merging is in effect or not,
but the device has an internal loop to go over the list. It's that loop
that virtual merging reduces.
Since the virtual merge computation is in line when the request is built
(by design) it doesn't really detract from the throughput and the cost
is pretty small.
It's not about accounting, it's about performance. There's a cost in
every device to traversing large count sg lists. If you have to bear it
in the iommu (which is usually more efficient because the iotlb tends to
follow mmtlb optimisations) you can reduce the cost by eliminating it
from the device.
James
--