summaryrefslogtreecommitdiffstats
path: root/certs
diff options
context:
space:
mode:
authorRoger He <Hongbo.He@amd.com>2018-02-05 17:57:07 +0800
committerAlex Deucher <alexander.deucher@amd.com>2018-02-26 23:09:46 -0500
commitec3fe391bdb321b1629cfb0ddbb9fcc114b579bc (patch)
tree7dc2b835f377a0d88f0948c4bf5e5d9ae0c53efd /certs
parent724daa4fd65d927e406f2cc0661c9a329876267b (diff)
downloadlinux-ec3fe391bdb321b1629cfb0ddbb9fcc114b579bc.tar.gz
linux-ec3fe391bdb321b1629cfb0ddbb9fcc114b579bc.tar.bz2
linux-ec3fe391bdb321b1629cfb0ddbb9fcc114b579bc.zip
drm/ttm: check if free mem space is under the lower limit
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->flags with TTM_OPT_FLAG_FORCE_ALLOC v4: always set force_alloc as tx->flags & 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 <Hongbo.He@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'certs')
0 files changed, 0 insertions, 0 deletions