public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>,
	Joonas Lahtinen <joonas.lahtinen@linux.intel.com>,
	intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH] drm/i915: Remove temporary allocation of dma addresses when rotating
Date: Mon, 27 Feb 2017 10:14:12 +0000	[thread overview]
Message-ID: <fccb328e-6ed5-70a7-8218-bb1efae01f5d@linux.intel.com> (raw)
In-Reply-To: <20170227100613.GF13095@nuc-i3427.alporthouse.com>


On 27/02/2017 10:06, Chris Wilson wrote:
> On Mon, Feb 27, 2017 at 09:55:10AM +0000, Tvrtko Ursulin wrote:
>>
>> On 22/02/2017 08:44, Chris Wilson wrote:
>>> I also think that's an argument for improving the general cache rather
>>> than arguing against using it.
>>
>> Well I wasn't concerned about the cache per se, but about whether it
>> is completely appropriate (best choice) to use it in this particular
>> case.
>>
>> Because as I said before, for 1920x1080x32 we are talking about a
>> 16KiB extremely short lived temporary allocation, vs the similar
>> size for the sg radix cache. But radix cache sticks around the the
>> lifetime of obj->mm.pages and it wouldn't otherwise be there since
>> AFAICS in practice no one really touches frame buffers in a way to
>> trigger its creation.
>>
>> Those amounts of memory are not a concern, but again, is the
>> simplification of the code worth the conceptual downsides mentioned
>> above? Even if we considered 4K frame buffers, when both allocations
>> go to ~64KiB, would that change anything? I am not sure, probably
>> not for me.
>>
>> So I am still unsure that we should go with this change.
>
> Again, the complaint you have here are general concerns about caching
> the mapping. Avoiding using the cache instead of improving the cache
> seems the wrong approach.

Depends what kind of improvments to the cache you have in mind. If you 
are thinking about size then I disagree, I think it is efficient enough 
already. But if you are thinking about the lifetime management then it 
is obvious from all that I have written so far that I would agree with 
that. Since the core of my "complaint" is the lifetime mismatch, and not 
the size.

For lifetime I am not sure what you could do. Exposing the size of it, 
with maybe some other bits attached the the object, to the shrinker I 
think doesn't make much sense since the sizes are so small compared to 
the backing store sizes.

Perhaps you could add an explicit reset of the cache after the rotation 
is done with it, but then the only remaining benefit will be avoiding 
greater than zero order allocations. I say the only one.. it would still 
be a good one. Just have no idea if this level of cache usage would 
satisfy you!

Perhaps you could say what kind of optimisation you have in mind to save 
me guessing? :)

Regards,

Tvrtko
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2017-02-27 10:14 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-17 15:10 [PATCH] drm/i915: Remove temporary allocation of dma addresses when rotating Chris Wilson
2017-02-17 18:22 ` ✓ Fi.CI.BAT: success for drm/i915: Remove temporary allocation of dma addresses when rotating (rev2) Patchwork
2017-02-21 15:01 ` [PATCH] drm/i915: Remove temporary allocation of dma addresses when rotating Joonas Lahtinen
2017-02-22  8:29   ` Tvrtko Ursulin
2017-02-22  8:44     ` Chris Wilson
2017-02-27  9:55       ` Tvrtko Ursulin
2017-02-27 10:06         ` Chris Wilson
2017-02-27 10:14           ` Tvrtko Ursulin [this message]
2017-02-27 10:21             ` Chris Wilson
2017-02-27 12:52               ` Joonas Lahtinen
2017-02-27 14:31               ` Tvrtko Ursulin
2017-11-14 18:14                 ` Chris Wilson
2017-11-15  9:18                   ` Tvrtko Ursulin
2017-11-15 10:03                     ` Chris Wilson
  -- strict thread matches above, loose matches on Subject: below --
2017-02-17 15:07 Chris Wilson

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=fccb328e-6ed5-70a7-8218-bb1efae01f5d@linux.intel.com \
    --to=tvrtko.ursulin@linux.intel.com \
    --cc=chris@chris-wilson.co.uk \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=joonas.lahtinen@linux.intel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox