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: Memory eviction in ttm
Date: Wed, 12 Sep 2012 15:28:36 +0200	[thread overview]
Message-ID: <50508E04.4090702@vmware.com> (raw)
In-Reply-To: <50508493.6060304@canonical.com>

On 09/12/2012 02:48 PM, Maarten Lankhorst wrote:
> Hey Thomas,
>
> I'm playing around with moving reservations from ttm to global, but how ttm
> ttm is handling reservations is getting in the way.  The code wants to move
> the bo from the lru lock at the same time a reservation is made, but that
> seems to be slightly too strict. It would really help me if that guarantee
> is removed.
Hi, Maarten.

Removing that restriction is not really possible at the moment.
Also the memory accounting code depends on this, and may cause reservations
in the most awkward places. Since these reservations don't have a ticket
they may and will cause deadlocks. So in short the restriction is there
to avoid deadlocks caused by ticketless reservations.

>
> Is it true that only the ttm_mem_evict code depends on it? And in that case
> wouldn't it be better to attempt to free any buffer that can be reserved
> without blocking first, instead of blocking on the first entry in the list?
Normally there is no reservation blocking, since the items on the LRU lists
are guaranteed not to be reserved, but if we reserve without taking off
LRU lists, the above may be a good optimization.

>
> This would make integration a lot easier, since I could wait with taking the
> lru lock until after reservation is complete, or any time before unreserving.
>
> ~Maarten
>
/Thomas

  reply	other threads:[~2012-09-12 13:42 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-12 12:48 Memory eviction in ttm Maarten Lankhorst
2012-09-12 13:28 ` Thomas Hellstrom [this message]
2012-09-12 15:27   ` Maarten Lankhorst
     [not found]   ` <5051F985.8020804@canonical.com>
     [not found]     ` <50520CB9.8000607@vmware.com>
     [not found]       ` <50521433.5070708@canonical.com>
     [not found]         ` <50524966.5080805@vmware.com>
     [not found]           ` <5052D8ED.7000206@canonical.com>
2012-09-14 10:50             ` Thomas Hellström
2012-09-14 13:36               ` Maarten Lankhorst
2012-09-17 21:35                 ` Thomas Hellstrom

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=50508E04.4090702@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.