All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC] TTM shrinking revisited
@ 2022-12-30 11:11 Thomas Hellström
  2022-12-30 11:11 ` [RFC PATCH 1/1] mm: Add interfaces to back up and recover folio contents using swap Thomas Hellström
  2023-01-04 10:31 ` [RFC] TTM shrinking revisited Christian König
  0 siblings, 2 replies; 11+ messages in thread
From: Thomas Hellström @ 2022-12-30 11:11 UTC (permalink / raw)
  To: dri-devel, christian.koenig

Hi, Christian, others.

I'm starting to take a look at the TTM shrinker again. We'll probably be
needing it at least for supporting integrated hardware with the xe driver.

So assuming that the last attempt failed because of the need to allocate
shmem pages and lack of writeback at shrink time, I was thinking of the
following approach: (A rough design sketch of the core support for the
last bullet is in patch 1/1. It of course needs polishing if the interface
is at all accepted by the mm people).

Before embarking on this, any feedback or comments would be greatly
appreciated:

*) Avoid TTM swapping when no swap space is available. Better to adjust the
   TTM swapout watermark, as no pages can be freed to the system anyway.
*) Complement the TTM swapout watermark with a shrinker.
   For cached pages, that may hopefully remove the need for the watermark.
   Possibly a watermark needs to remain for wc pages and / or dma pages,
   depending on how well shrinking them works.
*) Trigger immediate writeback of pages handed to the swapcache / shmem,
   at least when the shrinker is called from kswapd.
*) Hide ttm_tt_swap[out|in] details in the ttm_pool code. In the pool code
   we have more details about the backing pages and can split pages,
   transition caching state and copy as necessary. Also investigate the
   possibility of reusing pool pages in a smart way if copying is needed.
*) See if we can directly insert pages into the swap-cache instead of
   taking the shmem detour, something along with the attached patch 1 RFC.

Thanks,
Thomas


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

end of thread, other threads:[~2023-01-23 16:15 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-12-30 11:11 [RFC] TTM shrinking revisited Thomas Hellström
2022-12-30 11:11 ` [RFC PATCH 1/1] mm: Add interfaces to back up and recover folio contents using swap Thomas Hellström
2022-12-30 13:38   ` kernel test robot
2022-12-30 13:48   ` kernel test robot
2022-12-30 14:19   ` kernel test robot
2023-01-04 10:31 ` [RFC] TTM shrinking revisited Christian König
2023-01-09  9:14   ` Thomas Hellström
2023-01-09 19:49     ` Christian König
2023-01-23 14:59   ` Thomas Hellström
2023-01-23 16:07     ` Christian König
2023-01-23 16:15       ` 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.