<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Tue, Oct 8, 2013 at 10:45 AM, Maarten Lankhorst <span dir="ltr"><<a href="mailto:maarten.lankhorst@canonical.com" target="_blank">maarten.lankhorst@canonical.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">op 08-10-13 16:33, Jerome Glisse schreef:<br>
<div class="im">> On Tue, Oct 08, 2013 at 04:14:40PM +0200, Maarten Lankhorst wrote:<br>
>> Allocate and copy all kernel memory before doing reservations. This prevents a locking<br>
>> inversion between mmap_sem and reservation_class, and allows us to drop the trylocking<br>
>> in ttm_bo_vm_fault without upsetting lockdep.<br>
>><br>
>> Signed-off-by: Maarten Lankhorst <<a href="mailto:maarten.lankhorst@canonical.com">maarten.lankhorst@canonical.com</a>><br>
> I would say NAK. Current code only allocate temporary page in AGP case.<br>
> So AGP case is userspace -> temp page -> cs checker -> radeon ib.<br>
><br>
> Non AGP is directly memcpy to radeon IB.<br>
><br>
> Your patch allocate memory memcpy userspace to it and it will then be<br>
> memcpy to IB. Which means you introduce an extra memcpy in the process<br>
> not something we want.<br>
><br>
</div>Can we move up the call to radeon_ib_get then to be done before calling radeon_cs_parser_relocs?<br>
<span class="HOEnZb"><font color="#888888"><br>
~Maarten<br>
</font></span></blockquote></div><br></div><div class="gmail_extra">No won't work with the AGP case where we copy one page at a time while cs checker is processing.<br></div><div class="gmail_extra">For AGP we could however go to the 2 memcpy and temp buffer case.<br>
<br></div><div class="gmail_extra">For other, we don't know upfront the ib size or the number of ib we want.<br></div><div class="gmail_extra"><br>Cheers,<br>Jerome<br></div></div>