From: "Thomas Hellström" <thomas.hellstrom@linux.intel.com>
To: "Matthew Auld" <matthew.william.auld@gmail.com>,
"Christian König" <ckoenig.leichtzumerken@gmail.com>,
"Christian König" <christian.koenig@amd.com>
Cc: ML dri-devel <dri-devel@lists.freedesktop.org>
Subject: Re: i915 ttm_tt shmem backend
Date: Fri, 10 Sep 2021 09:46:38 +0200 [thread overview]
Message-ID: <c5edb73d-72fc-6cef-2735-9e6af55a8bd9@linux.intel.com> (raw)
In-Reply-To: <CAM0jSHO+vBwJmB=bsYcdjzHFfnaLYSDrPYWNUmEe1BqmrVOBxA@mail.gmail.com>
Hi,
On 9/9/21 4:56 PM, Matthew Auld wrote:
> Hi Christian,
>
> We are looking into using shmem as a ttm_tt backend in i915 for cached
> system memory objects. We would also like to make such objects visible
> to the i915-gem shrinker, so that they may be swapped out or discarded
> when under memory pressure.
>
> One idea for handling this is roughly something like:
> - Add a new TTM_PAGE_FLAG_SHMEM flag, or similar.
> - Skip the ttm_pages_allocated accounting on such objects, similar to
> how FLAG_SG is already handled.
> - Skip all the page->mapping and page->index related bits, like in
> tt_add_mapping, since it looks like these are set and used by shmem.
> Not sure what functionally this might break, but looks like it's maybe
> only driver specific?
IIrc the page->mapping and index is needed when doing dirty-tracking
using mkwrite and by vmwgfx at some point when doing fb_defio on top of
TTM buffers. I don't think vmwgfx does that anymore, but it still does
dirty-tracking.
/Thomas
prev parent reply other threads:[~2021-09-10 7:46 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-09 14:56 i915 ttm_tt shmem backend Matthew Auld
2021-09-09 16:43 ` AW: " Koenig, Christian
2021-09-09 16:56 ` Matthew Auld
2021-09-10 7:53 ` Christian König
2021-09-10 8:08 ` Thomas Hellström
2021-09-10 8:25 ` Christian König
2021-09-10 8:40 ` Thomas Hellström
2021-09-10 8:51 ` Christian König
2021-09-10 7:46 ` Thomas Hellström [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=c5edb73d-72fc-6cef-2735-9e6af55a8bd9@linux.intel.com \
--to=thomas.hellstrom@linux.intel.com \
--cc=christian.koenig@amd.com \
--cc=ckoenig.leichtzumerken@gmail.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=matthew.william.auld@gmail.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