All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Hellstrom <thellstrom@vmware.com>
To: Maarten Lankhorst <maarten.lankhorst@canonical.com>
Cc: dri-devel@lists.freedesktop.org
Subject: Re: [PATCH] drm/ttm: do not check if list is empty in ttm_bo_force_list_clean, v2
Date: Fri, 30 Nov 2012 12:55:10 +0100	[thread overview]
Message-ID: <50B89E9E.8070904@vmware.com> (raw)
In-Reply-To: <50B88790.6010208@canonical.com>

On 11/30/2012 11:16 AM, Maarten Lankhorst wrote:
> Op 30-11-12 10:04, Thomas Hellstrom schreef:
>> On 11/30/2012 09:05 AM, Maarten Lankhorst wrote:
>>> Just use the return error from ttm_mem_evict_first instead.
>>>
>>> Changes since v1:
>>> - Add warning if list is not empty, nothing else we can do here.
>> Marten, when this function is called, all cross-device reservers have been shut out with the TTM lock or whatever similar
>> mechanism is in place. It's a critical function that must succeed, unless there is a hardware failure to evict.
>>
>> As mentioned in the comments on the previous patch, ttm_bo_evict_first() may return 0 (OK) if it failed to reclaim the
>> trylock in cleanup_refs_and_unlock(), with the assumption that another process will destroy the bo anyway
>> (possibly at a later time which we know nothing about). The lru list needs to be empty when this function returns.
>>
>> This means we must either keep the while(list_empty) or perhaps better, retry instead of WARN if list_empty() is detected at the end of list.
> As long as evict_first returns 0, that function is called over and over again

Ah, ok. You're right.

Reviewed-by: Thomas Hellstrom<thellstrom@vmware.com>

      reply	other threads:[~2012-11-30 11:55 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-30  8:05 [PATCH] drm/ttm: do not check if list is empty in ttm_bo_force_list_clean, v2 Maarten Lankhorst
2012-11-30  9:04 ` Thomas Hellstrom
2012-11-30 10:16   ` Maarten Lankhorst
2012-11-30 11:55     ` 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=50B89E9E.8070904@vmware.com \
    --to=thellstrom@vmware.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=maarten.lankhorst@canonical.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.