All of lore.kernel.org
 help / color / mirror / Atom feed
* i915 ttm_tt shmem backend
@ 2021-09-09 14:56 Matthew Auld
  2021-09-09 16:43 ` AW: " Koenig, Christian
  2021-09-10  7:46 ` Thomas Hellström
  0 siblings, 2 replies; 9+ messages in thread
From: Matthew Auld @ 2021-09-09 14:56 UTC (permalink / raw)
  To: Christian König, Christian König
  Cc: Thomas Hellström, ML dri-devel

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?
- Skip calling into ttm_bo_swap_out/in and just have
ttm_populate/unpopulate handle this directly for such objects.
- Make such objects visible to the i915-gem shrinker.

Does this approach look acceptable?

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2021-09-10  8:51 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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 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.