[RFC PATCH] drm/radeon: fixup locking inversion between mmap_sem and reservations
Jerome Glisse
j.glisse at gmail.com
Tue Oct 8 16:57:42 CEST 2013
On Tue, Oct 8, 2013 at 10:45 AM, Maarten Lankhorst <
maarten.lankhorst at canonical.com> wrote:
> op 08-10-13 16:33, Jerome Glisse schreef:
> > On Tue, Oct 08, 2013 at 04:14:40PM +0200, Maarten Lankhorst wrote:
> >> Allocate and copy all kernel memory before doing reservations. This
> prevents a locking
> >> inversion between mmap_sem and reservation_class, and allows us to drop
> the trylocking
> >> in ttm_bo_vm_fault without upsetting lockdep.
> >>
> >> Signed-off-by: Maarten Lankhorst <maarten.lankhorst at canonical.com>
> > I would say NAK. Current code only allocate temporary page in AGP case.
> > So AGP case is userspace -> temp page -> cs checker -> radeon ib.
> >
> > Non AGP is directly memcpy to radeon IB.
> >
> > Your patch allocate memory memcpy userspace to it and it will then be
> > memcpy to IB. Which means you introduce an extra memcpy in the process
> > not something we want.
> >
> Can we move up the call to radeon_ib_get then to be done before calling
> radeon_cs_parser_relocs?
>
> ~Maarten
>
No won't work with the AGP case where we copy one page at a time while cs
checker is processing.
For AGP we could however go to the 2 memcpy and temp buffer case.
For other, we don't know upfront the ib size or the number of ib we want.
Cheers,
Jerome
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/dri-devel/attachments/20131008/1d380186/attachment.html>
More information about the dri-devel
mailing list