<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/drivers/gpu/drm/ttm/ttm_page_alloc_dma.c, branch linux-4.17.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.</subtitle>
<id>https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-4.17.y</id>
<link rel='self' href='https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-4.17.y'/>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/'/>
<updated>2018-05-09T20:16:30Z</updated>
<entry>
<title>drm/ttm: Use GFP_TRANSHUGE_LIGHT for allocating huge pages</title>
<updated>2018-05-09T20:16:30Z</updated>
<author>
<name>Michel Dänzer</name>
<email>michel.daenzer@amd.com</email>
</author>
<published>2018-04-25T15:32:10Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=da291320baec914f0bb4e65a9dccb86bd6c728f2'/>
<id>urn:sha1:da291320baec914f0bb4e65a9dccb86bd6c728f2</id>
<content type='text'>
GFP_TRANSHUGE tries very hard to allocate huge pages, which can result
in long delays with high memory pressure. I have observed firefox
freezing for up to around a minute due to this while restic was taking
a full system backup.

Since we don't really need huge pages, use GFP_TRANSHUGE_LIGHT |
__GFP_NORETRY instead, in order to fail quickly when there are no huge
pages available.

Set __GFP_KSWAPD_RECLAIM as well, in order for huge pages to be freed
up in the background if necessary.

With these changes, I'm no longer seeing freezes during a restic backup.

Cc: stable@vger.kernel.org
Reviewed-by: Christian König &lt;christian.koenig@amd.com&gt;
Signed-off-by: Michel Dänzer &lt;michel.daenzer@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: drop ttm-&gt;glob</title>
<updated>2018-02-27T04:09:45Z</updated>
<author>
<name>Christian König</name>
<email>christian.koenig@amd.com</email>
</author>
<published>2018-02-21T18:02:06Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=3231a7696e22538529e9ee3500f2116a40a22734'/>
<id>urn:sha1:3231a7696e22538529e9ee3500f2116a40a22734</id>
<content type='text'>
The pointer is available as ttm-&gt;bdev-&gt;glob as well.

Signed-off-by: Christian König &lt;christian.koenig@amd.com&gt;
Reviewed-by: Michel Dänzer &lt;michel.daenzer@amd.com&gt;
Signed-off-by: Alex Deucher &lt;alexander.deucher@amd.com&gt;
</content>
</entry>
<entry>
<title>drm/ttm: Simplify ttm_dma_page_put()</title>
<updated>2018-02-19T19:19:02Z</updated>
<author>
<name>Tom St Denis</name>
<email>tom.stdenis@amd.com</email>
</author>
<published>2018-01-25T18:40:21Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=7ca34ddc7866230a1a6c2fa9cc0167dd841bd583'/>
<id>urn:sha1:7ca34ddc7866230a1a6c2fa9cc0167dd841bd583</id>
<content type='text'>
Remove redundant store of return code.

Signed-off-by: Tom St Denis &lt;tom.stdenis@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: Fix coding style in ttm_dma_pool_alloc_new_pages()</title>
<updated>2018-02-19T19:19:01Z</updated>
<author>
<name>Tom St Denis</name>
<email>tom.stdenis@amd.com</email>
</author>
<published>2018-01-25T18:57:10Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=42bdbb6e0f3a14d2a0d924949fa3af0049eadd90'/>
<id>urn:sha1:42bdbb6e0f3a14d2a0d924949fa3af0049eadd90</id>
<content type='text'>
Add missing {} braces.

Signed-off-by: Tom St Denis &lt;tom.stdenis@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: Simplify ttm_dma_find_pool() (v2)</title>
<updated>2018-02-19T19:18:58Z</updated>
<author>
<name>Tom St Denis</name>
<email>tom.stdenis@amd.com</email>
</author>
<published>2018-01-25T18:52:30Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=add3d95d7359e0df748baa1da57727cf334b384a'/>
<id>urn:sha1:add3d95d7359e0df748baa1da57727cf334b384a</id>
<content type='text'>
Flip the logic of the comparison and remove
the redudant variable for the pool address.

(v2): Remove {} bracing.

Signed-off-by: Tom St Denis &lt;tom.stdenis@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: Fix coding style in ttm_pool_store()</title>
<updated>2018-02-19T19:18:58Z</updated>
<author>
<name>Tom St Denis</name>
<email>tom.stdenis@amd.com</email>
</author>
<published>2018-01-25T18:35:56Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=c68edaa0c1ed0cfc33229a0a72c9aa76f8f80da2'/>
<id>urn:sha1:c68edaa0c1ed0cfc33229a0a72c9aa76f8f80da2</id>
<content type='text'>
Correct missing {} style.

Signed-off-by: Tom St Denis &lt;tom.stdenis@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: Allow page allocations w/o triggering OOM..</title>
<updated>2018-02-19T19:17:58Z</updated>
<author>
<name>Andrey Grodzovsky</name>
<email>andrey.grodzovsky@amd.com</email>
</author>
<published>2017-12-22T13:12:40Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=cb5f1a52caf23414c65c6bc7eeefc281164ad092'/>
<id>urn:sha1:cb5f1a52caf23414c65c6bc7eeefc281164ad092</id>
<content type='text'>
This to allow drivers to choose to avoid OOM invocation and handle
page allocation failures instead.

v2:
Remove extra new lines.

Signed-off-by: Andrey Grodzovsky &lt;andrey.grodzovsky@amd.com&gt;
Reviewed-by: Christian König &lt;christian.koenig@amd.com&gt;
Reviewed-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 VADDR_FLAG_UPDATED_COUNT to correctly update dma_page global count</title>
<updated>2018-01-18T21:07:26Z</updated>
<author>
<name>Roger He</name>
<email>Hongbo.He@amd.com</email>
</author>
<published>2018-01-15T05:06:38Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=8f2112f84c3c2acd3fcc8b922e78b6758db902db'/>
<id>urn:sha1:8f2112f84c3c2acd3fcc8b922e78b6758db902db</id>
<content type='text'>
add this for correctly updating global mem count in ttm_mem_zone.
before that when ttm_mem_global_alloc_page fails, we would update all
dma_page's global mem count in ttm_dma-&gt;pages_list. but actually here
we should not update for the last dma_page.

v2: only the update of last dma_page is not right
v3: use lower bits of dma_page vaddr

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: check the return value of register_shrinker</title>
<updated>2018-01-16T20:35:26Z</updated>
<author>
<name>Roger He</name>
<email>Hongbo.He@amd.com</email>
</author>
<published>2018-01-11T04:57:58Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=e2721595e4c3d8b63dcd85bc99ad1ea4821a8d88'/>
<id>urn:sha1:e2721595e4c3d8b63dcd85bc99ad1ea4821a8d88</id>
<content type='text'>
This fixes the build warning:
"ignoring return value of 'register_shrinker', declared with
attribute warn_unused_result [-Wunused-result]"

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>
</feed>
