Re: PATCH: Further aacraid work

From: James Bottomley
Date: Thu Jun 17 2004 - 16:17:17 EST


On Thu, 2004-06-17 at 15:54, Alan Cox wrote:
> I would rather see it below the I/O layer for things like AMD64. The
> reason I say this is that many drivers would suffer from iommu merging not
> gain, and others may have limits.
>
> Something like
>
> new_sglist = sg_squash(old_sglist, [target max segments], [max per seg])
>
> could be used by drivers when appropriate to hand back a better sg list
> (or if not possible the existing one). That would put control rather closer
> to the driver.

You can't quite do it like this. The problem is that IOMMU merging is
an input to the bio routines. If you tell it you can merge, it will
spit out a nice list which will merge down to your card segment limit.

If you don't merge though, the list will be way over the number of SG
segments you are allowed.

There was an infrastructure proposed a year ago to allow a "bypass mode"
per device which would do something like you want.

This is also a separate problem from the IOMMU running out of
resources...

James


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/