<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/include/drm/ttm, branch v5.13.1</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v5.13.1</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v5.13.1'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2021-04-13T21:15:09+00:00</updated>
<entry>
<title>Merge drm/drm-fixes into drm-next</title>
<updated>2021-04-13T21:15:09+00:00</updated>
<author>
<name>Daniel Vetter</name>
<email>daniel.vetter@ffwll.ch</email>
</author>
<published>2021-04-13T21:06:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=213cc929cbfd7962164420b300f9a6c60aaff189'/>
<id>urn:sha1:213cc929cbfd7962164420b300f9a6c60aaff189</id>
<content type='text'>
msm-next pull request has a baseline with stuff from -fixes, roll
forward first.

Some simple conflicts in amdgpu, ttm and one in i915 where git gets
confused and tries to add the same function twice.

Signed-off-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
</content>
</entry>
<entry>
<title>drm/ttm: switch back to static allocation limits for now</title>
<updated>2021-03-29T09:05:36+00:00</updated>
<author>
<name>Christian König</name>
<email>christian.koenig@amd.com</email>
</author>
<published>2021-03-24T12:50:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=680dcede2762668e7fd9a8d4280453b7f260b680'/>
<id>urn:sha1:680dcede2762668e7fd9a8d4280453b7f260b680</id>
<content type='text'>
The shrinker based approach still has some flaws. Especially that we need
temporary pages to free up the pages allocated to the driver is problematic
in a shrinker.

Signed-off-by: Christian König &lt;christian.koenig@amd.com&gt;
Acked-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20210324134845.2338-1-christian.koenig@amd.com
</content>
</entry>
<entry>
<title>drm/ttm: switch to per device LRU lock</title>
<updated>2021-03-24T16:05:25+00:00</updated>
<author>
<name>Christian König</name>
<email>christian.koenig@amd.com</email>
</author>
<published>2020-10-06T15:26:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=a1f091f8ef2b680a5184db065527612247cb4cae'/>
<id>urn:sha1:a1f091f8ef2b680a5184db065527612247cb4cae</id>
<content type='text'>
Instead of having a global lock for potentially less contention.

Signed-off-by: Christian König &lt;christian.koenig@amd.com&gt;
Tested-by: Nirmoy Das &lt;nirmoy.das@amd.com&gt;
Reviewed-by: Huang Rui &lt;ray.huang@amd.com&gt;
Reviewed-by: Matthew Auld &lt;matthew.auld@intel.com&gt;
Link: https://patchwork.freedesktop.org/patch/424010/
</content>
</entry>
<entry>
<title>drm/ttm: remove swap LRU v3</title>
<updated>2021-03-24T16:05:14+00:00</updated>
<author>
<name>Christian König</name>
<email>christian.koenig@amd.com</email>
</author>
<published>2020-10-06T14:30:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=f9e2a03e110ad0c78e69201f59d18dc1c487efac'/>
<id>urn:sha1:f9e2a03e110ad0c78e69201f59d18dc1c487efac</id>
<content type='text'>
Instead evict round robin from each devices SYSTEM and TT domain.

v2: reorder num_pages access reported by Dan's script
v3: fix rebase fallout, num_pages should be 32bit

Signed-off-by: Christian König &lt;christian.koenig@amd.com&gt;
Tested-by: Nirmoy Das &lt;nirmoy.das@amd.com&gt;
Reviewed-by: Huang Rui &lt;ray.huang@amd.com&gt;
Reviewed-by: Matthew Auld &lt;matthew.auld@intel.com&gt;
Link: https://patchwork.freedesktop.org/patch/424009/
</content>
</entry>
<entry>
<title>drm/ttm: move swapout logic around v3</title>
<updated>2021-03-24T16:05:07+00:00</updated>
<author>
<name>Christian König</name>
<email>christian.koenig@amd.com</email>
</author>
<published>2020-10-06T11:35:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=ebd59851c796c221daf0d3b594fb2533f87161cf'/>
<id>urn:sha1:ebd59851c796c221daf0d3b594fb2533f87161cf</id>
<content type='text'>
Move the iteration of the global lru into the new function
ttm_global_swapout() and use that instead in drivers.

v2: consistently return int
v3: fix build fail

Signed-off-by: Christian König &lt;christian.koenig@amd.com&gt;
Tested-by: Nirmoy Das &lt;nirmoy.das@amd.com&gt;
Reviewed-by: Huang Rui &lt;ray.huang@amd.com&gt;
Reviewed-by: Matthew Auld &lt;matthew.auld@intel.com&gt;
Link: https://patchwork.freedesktop.org/patch/424008/
</content>
</entry>
<entry>
<title>drm/ttm: make ttm_bo_unpin more defensive</title>
<updated>2021-03-15T15:02:30+00:00</updated>
<author>
<name>Christian König</name>
<email>christian.koenig@amd.com</email>
</author>
<published>2021-03-12T08:34:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=6c5403173a13a08ff61dbdafa4c0ed4a9dedbfe0'/>
<id>urn:sha1:6c5403173a13a08ff61dbdafa4c0ed4a9dedbfe0</id>
<content type='text'>
We seem to have some more driver bugs than thought.

Signed-off-by: Christian König &lt;christian.koenig@amd.com&gt;
Fixes: deb0814b43f3 ("drm/ttm: add ttm_bo_pin()/ttm_bo_unpin() v2")
Acked-by: Matthew Auld &lt;matthew.auld@intel.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20210312093810.2202-1-christian.koenig@amd.com
</content>
</entry>
<entry>
<title>drm/ttm: move memory accounting into vmwgfx v4</title>
<updated>2021-02-09T16:27:33+00:00</updated>
<author>
<name>Christian König</name>
<email>christian.koenig@amd.com</email>
</author>
<published>2020-11-17T12:52:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/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: rework ttm_tt page limit v4</title>
<updated>2021-02-09T16:27:12+00:00</updated>
<author>
<name>Christian König</name>
<email>christian.koenig@amd.com</email>
</author>
<published>2020-11-16T12:47:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=d4bd7776a7ac504510656c0053a55c0cfd1ebc96'/>
<id>urn:sha1:d4bd7776a7ac504510656c0053a55c0cfd1ebc96</id>
<content type='text'>
TTM implements a rather extensive accounting of allocated memory.

There are two reasons for this:
1. It tries to block userspace allocating a huge number of very small
   BOs without accounting for the kmalloced memory.

2. Make sure we don't over allocate and run into an OOM situation
   during swapout while trying to handle the memory shortage.

This is only partially a good idea. First of all it is perfectly
valid for an application to use all of system memory, limiting it to
50% is not really acceptable.

What we need to take care of is that the application is held
accountable for the memory it allocated. This is what control
mechanisms like memcg and the normal Linux page accounting already do.

Making sure that we don't run into an OOM situation while trying to
cope with a memory shortage is still a good idea, but this is also
not very well implemented since it means another opportunity of
recursion from the driver back into TTM.

So start to rework all of this by implementing a shrinker callback which
allows for TT object to be swapped out if necessary.

v2: Switch from limit to shrinker callback.
v3: fix gfp mask handling, use atomic for swapable_pages, add debugfs
v4: drop the extra gfp_mask checks

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/msgid/20210208133226.36955-1-christian.koenig@amd.com
</content>
</entry>
<entry>
<title>drm/ttm: fix removal of bo_count sysfs file</title>
<updated>2021-02-09T15:34:43+00:00</updated>
<author>
<name>Christian König</name>
<email>christian.koenig@amd.com</email>
</author>
<published>2021-02-09T13:15:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=8a945edd183d296cd1125a2724fb0f3c77d8e9b3'/>
<id>urn:sha1:8a945edd183d296cd1125a2724fb0f3c77d8e9b3</id>
<content type='text'>
Only a zombie leftover from rebasing.

Signed-off-by: Christian König &lt;christian.koenig@amd.com&gt;
Fixes: 3763d635deaa ("drm/ttm: add debugfs directory v2")
Reported-by: Gerd Hoffmann &lt;kraxel@redhat.com&gt;
Reviewed-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20210209131756.24650-1-christian.koenig@amd.com
</content>
</entry>
<entry>
<title>drm/ttm: device naming cleanup</title>
<updated>2021-01-21T13:51:45+00:00</updated>
<author>
<name>Christian König</name>
<email>christian.koenig@amd.com</email>
</author>
<published>2020-10-01T12:51:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=8af8a109b34fa88b8b91f25d11485b37d37549c3'/>
<id>urn:sha1:8af8a109b34fa88b8b91f25d11485b37d37549c3</id>
<content type='text'>
Rename ttm_bo_device to ttm_device.
Rename ttm_bo_driver to ttm_device_funcs.
Rename ttm_bo_global to ttm_global.

Move global and device related functions to ttm_device.[ch].

No functional change.

Signed-off-by: Christian König &lt;christian.koenig@amd.com&gt;
Acked-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Link: https://patchwork.freedesktop.org/patch/415222/
</content>
</entry>
</feed>
