All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Michel Dänzer" <michel@daenzer.net>
To: "dri-devel@lists.freedesktop.org" <dri-devel@lists.freedesktop.org>
Subject: Re: ttm_bo_add_to_lru mystery
Date: Wed, 10 Feb 2016 18:57:27 +0900	[thread overview]
Message-ID: <56BB0987.8050208@daenzer.net> (raw)
In-Reply-To: <56BB02C2.7090004@daenzer.net>

On 10.02.2016 18:28, Michel Dänzer wrote:
> 
> I recently came to realize that nothing seems to be ensuring that BOs
> which are unpinned in the amdgpu/radeon drivers get added to the TTM
> LRU list. I thought that should be easy enough to fix, but I ran into
> an issue that has me scratching my head.
> 
> See the attached patch for the current debugging state, and the
> corresponding dmesg output below. The BO's lru member is considered
> empty (i.e. it's not hooked up to the LRU list) in radeon_bo_unpin,
> as expected. However, calling ttm_bo_add_to_lru in that case, the lru
> member is suddenly not considered empty (i.e. it seems to be hooked up
> to the LRU list, which would normally trigger the BUG_ON). And indeed,
> the prev/next pointers are different between the two functions. But I
> have no idea how they could be modified between those two points, or
> why else they would be seeing different values...
> 
> *Any* ideas for what might be going on here would be much appreciated.

Okay, so it was just me being stupid and missing that ttm_bo_unreserve
already calls ttm_bo_add_to_lru. Thanks to olesalscheider for
enlightening me on IRC.


-- 
Earthling Michel Dänzer               |               http://www.amd.com
Libre software enthusiast             |             Mesa and X developer
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

      reply	other threads:[~2016-02-10  9:57 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-10  9:28 ttm_bo_add_to_lru mystery Michel Dänzer
2016-02-10  9:57 ` Michel Dänzer [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=56BB0987.8050208@daenzer.net \
    --to=michel@daenzer.net \
    --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 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.