<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/include/drm/ttm/ttm_memory.h, branch linux-6.18.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.</subtitle>
<id>https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-6.18.y</id>
<link rel='self' href='https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-6.18.y'/>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/'/>
<updated>2021-02-09T16:27:33Z</updated>
<entry>
<title>drm/ttm: move memory accounting into vmwgfx v4</title>
<updated>2021-02-09T16:27:33Z</updated>
<author>
<name>Christian König</name>
<email>christian.koenig@amd.com</email>
</author>
<published>2020-11-17T12:52:28Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=f07069da6b4c5f937d6df2de6504394845513964'/>
<id>urn:sha1:f07069da6b4c5f937d6df2de6504394845513964</id>
<content type='text'>
This is just another feature which is only used by VMWGFX, so move
it into the driver instead.

I've tried to add the accounting sysfs file to the kobject of the drm
minor, but I'm not 100% sure if this works as expected.

v2: fix typo in KFD and avoid 64bit divide
v3: fix init order in VMWGFX
v4: use pdev sysfs reference instead of drm

Signed-off-by: Christian König &lt;christian.koenig@amd.com&gt;
Reviewed-by: Zack Rusin &lt;zackr@vmware.com&gt; (v3)
Tested-by: Nirmoy Das &lt;nirmoy.das@amd.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20210208133226.36955-2-christian.koenig@amd.com
</content>
</entry>
<entry>
<title>drm/ttm: remove superflous extern attribute from funcs</title>
<updated>2020-09-17T14:14:42Z</updated>
<author>
<name>Christian König</name>
<email>christian.koenig@amd.com</email>
</author>
<published>2020-09-16T13:31:28Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=67d6a8b358eac488112a4775f77dc3dbf63bea88'/>
<id>urn:sha1:67d6a8b358eac488112a4775f77dc3dbf63bea88</id>
<content type='text'>
Extern is the default attribute for functions anyway.

Signed-off-by: Christian König &lt;christian.koenig@amd.com&gt;
Reviewed-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Link: https://patchwork.freedesktop.org/patch/390972/
</content>
</entry>
<entry>
<title>drm/ttm: some cleanups</title>
<updated>2020-09-17T09:44:04Z</updated>
<author>
<name>Christian König</name>
<email>christian.koenig@amd.com</email>
</author>
<published>2020-09-15T14:29:26Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=36183150e086977cadcffba84ecd84cbbeec9324'/>
<id>urn:sha1:36183150e086977cadcffba84ecd84cbbeec9324</id>
<content type='text'>
Unexport ttm_check_under_lowerlimit.
Make ttm_bo_acc_size static and unexport it.
Remove ttm_get_kernel_zone_memory_size.

Signed-off-by: Christian König &lt;christian.koenig@amd.com&gt;
Reviewed-by: Dave Airlie &lt;airlied@redhat.com&gt;
Link: https://patchwork.freedesktop.org/patch/390515/
</content>
</entry>
<entry>
<title>drm/ttm: remove pointers to globals</title>
<updated>2019-10-25T09:40:51Z</updated>
<author>
<name>Christian König</name>
<email>christian.koenig@amd.com</email>
</author>
<published>2019-09-25T09:38:50Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=97588b5b9a6b330dc2e3fbf3dea987e37d30194e'/>
<id>urn:sha1:97588b5b9a6b330dc2e3fbf3dea987e37d30194e</id>
<content type='text'>
As the name says global memory and bo accounting is global. So it doesn't
make to much sense having pointers to global structures all around the code.

Signed-off-by: Christian König &lt;christian.koenig@amd.com&gt;
Reviewed-by: Thomas Hellström &lt;thellstrom@vmware.com&gt;
Link: https://patchwork.freedesktop.org/patch/332879/
</content>
</entry>
<entry>
<title>drm/ttm: use a static ttm_mem_global instance</title>
<updated>2018-11-05T19:21:18Z</updated>
<author>
<name>Christian König</name>
<email>christian.koenig@amd.com</email>
</author>
<published>2018-10-19T11:49:05Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=27eb1fa9130a98edd2b321d4dbce5c8b244ee7af'/>
<id>urn:sha1:27eb1fa9130a98edd2b321d4dbce5c8b244ee7af</id>
<content type='text'>
As the name says we only need one global instance of ttm_mem_global.

Drop all the driver initialization and just use a single exported
instance which is initialized during BO global initialization.

Signed-off-by: Christian König &lt;christian.koenig@amd.com&gt;
Reviewed-by: Junwei Zhang &lt;Jerry.Zhang@amd.com&gt;
Signed-off-by: Alex Deucher &lt;alexander.deucher@amd.com&gt;
</content>
</entry>
<entry>
<title>drm/ttm: check if free mem space is under the lower limit</title>
<updated>2018-02-27T04:09:46Z</updated>
<author>
<name>Roger He</name>
<email>Hongbo.He@amd.com</email>
</author>
<published>2018-02-05T09:57:07Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=ec3fe391bdb321b1629cfb0ddbb9fcc114b579bc'/>
<id>urn:sha1:ec3fe391bdb321b1629cfb0ddbb9fcc114b579bc</id>
<content type='text'>
the free mem space and the lower limit both include two parts:
system memory and swap space.

For the OOM triggered by TTM, that is the case as below:
first swap space is full of swapped out pages and soon
system memory also is filled up with ttm pages. and then
any memory allocation request will run into OOM.

to cover two cases:
a. if no swap disk at all or free swap space is under swap mem
   limit but available system mem is bigger than sys mem limit,
   allow TTM allocation;

b. if the available system mem is less than sys mem limit but
   free swap space is bigger than swap mem limit, allow TTM
   allocation.

v2: merge two memory limit(swap and system) into one
v3: keep original behavior except ttm_opt_ctx-&gt;flags with
    TTM_OPT_FLAG_FORCE_ALLOC
v4: always set force_alloc as tx-&gt;flags &amp; TTM_OPT_FLAG_FORCE_ALLOC
v5: add an attribute for lower_mem_limit
v6: set lower_mem_limit as 0 to keep original behavior

Signed-off-by: Roger He &lt;Hongbo.He@amd.com&gt;
Reviewed-by: Christian König &lt;christian.koenig@amd.com&gt;
Signed-off-by: Alex Deucher &lt;alexander.deucher@amd.com&gt;
</content>
</entry>
<entry>
<title>drm/ttm: use an operation ctx for ttm_mem_global_alloc_page</title>
<updated>2017-12-27T16:38:55Z</updated>
<author>
<name>Roger He</name>
<email>Hongbo.He@amd.com</email>
</author>
<published>2017-12-08T07:21:18Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=9de2fb99ebe059f7777b4c0463eca2946f2bda4d'/>
<id>urn:sha1:9de2fb99ebe059f7777b4c0463eca2946f2bda4d</id>
<content type='text'>
forward the operation context to ttm_mem_global_alloc_page as well,
and the ultimate goal is swapout enablement for reserved BOs.

Here reserved BOs refer to all the BOs which share same reservation object

Reviewed-by: Christian König &lt;christian.koenig@amd.com&gt;
Signed-off-by: Roger He &lt;Hongbo.He@amd.com&gt;
Signed-off-by: Alex Deucher &lt;alexander.deucher@amd.com&gt;
</content>
</entry>
<entry>
<title>drm/ttm: use an operation ctx for ttm_mem_global_alloc</title>
<updated>2017-12-27T16:38:54Z</updated>
<author>
<name>Roger He</name>
<email>Hongbo.He@amd.com</email>
</author>
<published>2017-12-08T07:09:50Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=279c01f6ef626d59b93383d183fb69173d3f7ac7'/>
<id>urn:sha1:279c01f6ef626d59b93383d183fb69173d3f7ac7</id>
<content type='text'>
forward the operation context to ttm_mem_global_alloc as well, and the
ultimate goal is swapout enablement for reserved BOs

Reviewed-by: Thomas Hellstrom &lt;thellstrom@vmware.com&gt;
Reviewed-by: Christian König &lt;christian.koenig@amd.com&gt;
Signed-off-by: Roger He &lt;Hongbo.He@amd.com&gt;
Signed-off-by: Alex Deucher &lt;alexander.deucher@amd.com&gt;
</content>
</entry>
<entry>
<title>drm/ttm: call ttm_bo_swapout directly when ttm shrink</title>
<updated>2017-12-27T16:38:11Z</updated>
<author>
<name>Roger He</name>
<email>Hongbo.He@amd.com</email>
</author>
<published>2017-12-18T11:50:08Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=a6c26af8a4348a0ba2eb146b08f4d4d908cd9222'/>
<id>urn:sha1:a6c26af8a4348a0ba2eb146b08f4d4d908cd9222</id>
<content type='text'>
remove the extra indirection because we have only one implementation anyway

Reviewed-by: Christian König &lt;christian.koenig@amd.com&gt;
Signed-off-by: Roger He &lt;Hongbo.He@amd.com&gt;
Signed-off-by: Alex Deucher &lt;alexander.deucher@amd.com&gt;
</content>
</entry>
<entry>
<title>drm/ttm: add support for different pool sizes</title>
<updated>2017-10-06T21:44:16Z</updated>
<author>
<name>Christian König</name>
<email>christian.koenig@amd.com</email>
</author>
<published>2017-07-04T14:56:24Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=d188bfa5532ce5b426681d8530ff1a9683eea0ad'/>
<id>urn:sha1:d188bfa5532ce5b426681d8530ff1a9683eea0ad</id>
<content type='text'>
Correctly handle different page sizes in the memory accounting.

Signed-off-by: Christian König &lt;christian.koenig@amd.com&gt;
Reviewed-by: Felix Kuehling &lt;Felix.Kuehling@amd.com&gt;
Signed-off-by: Alex Deucher &lt;alexander.deucher@amd.com&gt;
</content>
</entry>
</feed>
