From: Maarten Lankhorst <maarten.lankhorst@canonical.com>
To: dri-devel@lists.freedesktop.org,
Thomas Hellstrom <thellstrom@vmware.com>
Subject: buggy/weird behavior in ttm
Date: Thu, 11 Oct 2012 16:50:21 +0200 [thread overview]
Message-ID: <5076DCAD.6070606@canonical.com> (raw)
I was trying to clean ttm up a little so my changes would be less invasive, and simplify
the code for debuggability. During testing I noticed the following weirdnesses:
- ttm_mem_evict_first ignores no_wait_gpu if the buffer is on the ddestroy list.
If you follow the code, it will effectively spin in ttm_mem_evict_first if a bo
is on the list and no_wait_gpu is true.
This makes it very hard to change this function around to something more sane, what is the
desired effect? Could this perhaps be changed to something more sane?
I was working on a commit that removes fence_lock since I was killing off the
fence lock, but that requires some kind of defined behavior for this. Unless
we leave this in place as expected behavior..
- no_wait_reserve is ignored if no_wait_gpu is false
ttm_bo_reserve_locked can only return true if no_wait_reserve is true, but
subsequently it will do a wait_unreserved if no_wait_gpu is false.
I'm planning on removing this argument and act like it is always true, since
nothing on the lru list should fail to reserve currently.
- effectively unlimited callchain between some functions that all go through
ttm_mem_evict_first:
/------------------------\
ttm_mem_evict_first - ttm_bo_evict - -ttm_bo_mem_space - ttm_bo_mem_force_space - ttm_mem_evict_first
\ ttm_bo_handle_move_mem /
I'm not surprised that there was a deadlock before, it seems to me it would
be pretty suicidal to ever do a blocking reserve on any of those lists,
lockdep would be all over you for this.
Also it seems ttm_bo_move_ttm, ttm_bo_move_memcpy and ttm_bo_move_accel_cleanup
don't use some of their arguments, so could those be dropped?
~Maarten
next reply other threads:[~2012-10-11 14:50 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-11 14:50 Maarten Lankhorst [this message]
2012-10-11 16:57 ` buggy/weird behavior in ttm Thomas Hellstrom
2012-10-11 18:42 ` Maarten Lankhorst
2012-10-11 19:26 ` Thomas Hellstrom
2012-10-11 19:35 ` Thomas Hellstrom
2012-10-11 20:55 ` Maarten Lankhorst
2012-10-12 5:57 ` Thomas Hellstrom
2012-10-12 7:49 ` Maarten Lankhorst
2012-10-15 12:14 ` Thomas Hellstrom
2012-10-12 10:09 ` Maarten Lankhorst
2012-10-15 12:27 ` Thomas Hellstrom
2012-10-15 15:37 ` Maarten Lankhorst
2012-10-15 18:34 ` Maarten Lankhorst
2012-10-15 19:44 ` Jerome Glisse
2012-10-15 18:40 ` Thomas Hellstrom
2012-10-15 19:32 ` Maarten Lankhorst
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=5076DCAD.6070606@canonical.com \
--to=maarten.lankhorst@canonical.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=thellstrom@vmware.com \
/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 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.