On Tue, 2008-07-15 at 23:20 +0900, FUJITA Tomonori wrote:
That's correct. The size and boundary depend on the type of IOMMU (ccio
or sba) so the vmerge boundary parameters are set up in the iommu driver
code.
Actually, it's code I did.
There are plusses and minusses to all of this. The original vmerge code
was done for sparc ... mainly because the benefits of virtual merging
can offset the cost of having to use the iommu. However, most
architectures didn't use it. When I fixed it up to work for parisc (and
introduced the parameters) we were trying to demonstrate that using it
was feasible.
The idea behind vmerging is that assembling and programming sg lists is
expensive, so you want to do it once. Either in the iommu or in the
driver sg list, but not in both. There is evidence that it saves around
7% or so on drivers. However, for architectures that can do it, better
savings are made simply by lifting the iommu out of the I/O path (so
called bypass mode).
I suspect with IOMMUs coming back (and being unable to be bypassed) with
virtualisation, virtual merging might once more become a significant
value.
James
--