* IOMMU keeping mapping over long period of time
@ 2011-10-18 15:48 Jerome Glisse
2011-10-18 15:56 ` Andi Kleen
2011-10-20 8:00 ` Benjamin Herrenschmidt
0 siblings, 2 replies; 4+ messages in thread
From: Jerome Glisse @ 2011-10-18 15:48 UTC (permalink / raw)
To: linux-kernel; +Cc: iommu
Hi,
For GPU we are entertaining the idea of keeping pci/dma mapping of page
around for the whole life span of GPU object (which can be as long as
the computer uptime). Here we are talking about possibly several GB of
data.
GPU for which we are interested have dma mask of 40bits at least, thus
they can work with high mem page. My main concern is when an iommu is
active, such amount of continuously mapped page might exhaust the iommu
address space. My understanding is that Intel & AMD iommu are capable of
growing their address space but is it somethings we can rely on ?
Cheers,
Jerome
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: IOMMU keeping mapping over long period of time
2011-10-18 15:48 IOMMU keeping mapping over long period of time Jerome Glisse
@ 2011-10-18 15:56 ` Andi Kleen
2011-10-18 16:09 ` Jerome Glisse
2011-10-20 8:00 ` Benjamin Herrenschmidt
1 sibling, 1 reply; 4+ messages in thread
From: Andi Kleen @ 2011-10-18 15:56 UTC (permalink / raw)
To: Jerome Glisse; +Cc: linux-kernel, iommu
Jerome Glisse <j.glisse@gmail.com> writes:
>
> GPU for which we are interested have dma mask of 40bits at least, thus
> they can work with high mem page. My main concern is when an iommu is
> active, such amount of continuously mapped page might exhaust the iommu
> address space. My understanding is that Intel & AMD iommu are capable of
> growing their address space but is it somethings we can rely on ?
I don't think relying on this is very wise. Better add some way to unmap
when space is running short.
-Andi
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: IOMMU keeping mapping over long period of time
2011-10-18 15:56 ` Andi Kleen
@ 2011-10-18 16:09 ` Jerome Glisse
0 siblings, 0 replies; 4+ messages in thread
From: Jerome Glisse @ 2011-10-18 16:09 UTC (permalink / raw)
To: Andi Kleen; +Cc: linux-kernel, iommu
On Tue, Oct 18, 2011 at 11:56 AM, Andi Kleen <andi@firstfloor.org> wrote:
> Jerome Glisse <j.glisse@gmail.com> writes:
>>
>> GPU for which we are interested have dma mask of 40bits at least, thus
>> they can work with high mem page. My main concern is when an iommu is
>> active, such amount of continuously mapped page might exhaust the iommu
>> address space. My understanding is that Intel & AMD iommu are capable of
>> growing their address space but is it somethings we can rely on ?
>
> I don't think relying on this is very wise. Better add some way to unmap
> when space is running short.
>
> -Andi
>
Maybe i should have add that the usecase involve the driver never knowing when
the GPU will make use of the mapped memory and this can happen anytime.
Cheers,
Jerome
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: IOMMU keeping mapping over long period of time
2011-10-18 15:48 IOMMU keeping mapping over long period of time Jerome Glisse
2011-10-18 15:56 ` Andi Kleen
@ 2011-10-20 8:00 ` Benjamin Herrenschmidt
1 sibling, 0 replies; 4+ messages in thread
From: Benjamin Herrenschmidt @ 2011-10-20 8:00 UTC (permalink / raw)
To: Jerome Glisse; +Cc: linux-kernel, iommu
On Tue, 2011-10-18 at 11:48 -0400, Jerome Glisse wrote:
> Hi,
>
> For GPU we are entertaining the idea of keeping pci/dma mapping of page
> around for the whole life span of GPU object (which can be as long as
> the computer uptime). Here we are talking about possibly several GB of
> data.
>
> GPU for which we are interested have dma mask of 40bits at least, thus
> they can work with high mem page. My main concern is when an iommu is
> active, such amount of continuously mapped page might exhaust the iommu
> address space. My understanding is that Intel & AMD iommu are capable of
> growing their address space but is it somethings we can rely on ?
This will be problematic on other platforms. Also keep in mind that
objects mapped in the iommu can no longer be swapped out.
It might be useful to have a more 'lazy' mechanism where objects are
kept mapped but with a callback to unmap them in case of iommu pressure.
The problem of course with such a scheme is that it requires iommu
object tracking and horrible locking issues.
Ben.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2011-10-20 8:02 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-10-18 15:48 IOMMU keeping mapping over long period of time Jerome Glisse
2011-10-18 15:56 ` Andi Kleen
2011-10-18 16:09 ` Jerome Glisse
2011-10-20 8:00 ` Benjamin Herrenschmidt
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.