dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Hellstrom <thomas@shipmail.org>
To: dri-devel@lists.freedesktop.org
Subject: Re: GEM - radeon cs ioctl deadlock
Date: Mon, 18 Oct 2010 17:16:07 +0200	[thread overview]
Message-ID: <4CBC64B7.7000200@shipmail.org> (raw)
In-Reply-To: <1287020839.812.2.camel@nisroch>

On 10/14/2010 03:47 AM, Ben Skeggs wrote:
> On Thu, 2010-10-14 at 08:14 +1000, Dave Airlie wrote:
>    
>> On Wed, 2010-10-13 at 17:57 -0400, Jerome Glisse wrote:
>>      
>>> So we are facing a deadlock with the radeon cs ioctl. When a buffer is given
>>> a name (with flink) we could endup with 2 handle pointing to the same
>>> object (flink object and open it from same file descriptor). Would it be ok
>>> if i change gem open to first look if we already have an handle for the
>>> object and to use that handle instead of creating a new one ? Or could
>>> this break intel driver ?
>>>        
>> I think r300g worked around this already, maybe we should just avoid
>> doing it from userspace if possible.
>>      
> We had this in nouveau at some point.  In the end, I prevented the
> deadlock from occuring by checking that a process doesn't reserve the
> same buffer twice (we store file_priv in a reserved_by field in the bo
> as we reserve the buffers), and then just fixed userspace.
>
> Ben.
>    
>>      
Hi, Ben,

Without knowing the exact details, that sounds a little dangerous? It 
would be better to use a process identifier rather than a file 
identifier since multiple threads in a single client can and should use 
the same file descriptor.

/Thomas


>> Dave.
>>
>>
>> _______________________________________________
>> dri-devel mailing list
>> dri-devel@lists.freedesktop.org
>> http://lists.freedesktop.org/mailman/listinfo/dri-devel
>>      
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/dri-devel
>    

      reply	other threads:[~2010-10-18 15:16 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-13 21:57 GEM - radeon cs ioctl deadlock Jerome Glisse
2010-10-13 22:14 ` Dave Airlie
2010-10-14  1:47   ` Ben Skeggs
2010-10-18 15:16     ` Thomas Hellstrom [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4CBC64B7.7000200@shipmail.org \
    --to=thomas@shipmail.org \
    --cc=dri-devel@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox