[PATCH 1/7] drm/ttm:fix incorrect calculate on shrink_pages

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Patch #1-#3 and #5 are Reviewed-by: Christian König 
<christian.koenig at amd.com>.

Patch #6 and #7 are Acked-by: Christian König <christian.koenig at amd.com>.

Regards,
Christian.

Am 12.12.2017 um 10:46 schrieb Monk Liu:
> shrink_pages is in unit of Order after ttm_page_pool_free,
> but it is used by nr_free in next round so need change
> it into native page unit
>
> Change-Id: I33b77ac1616e24b1b881eee54c3bd7342cfa9ab8
> Signed-off-by: Monk Liu <Monk.Liu at amd.com>
> ---
>   drivers/gpu/drm/ttm/ttm_page_alloc.c | 1 +
>   1 file changed, 1 insertion(+)
>
> diff --git a/drivers/gpu/drm/ttm/ttm_page_alloc.c b/drivers/gpu/drm/ttm/ttm_page_alloc.c
> index 44343a2..71945cc 100644
> --- a/drivers/gpu/drm/ttm/ttm_page_alloc.c
> +++ b/drivers/gpu/drm/ttm/ttm_page_alloc.c
> @@ -455,6 +455,7 @@ ttm_pool_shrink_scan(struct shrinker *shrink, struct shrink_control *sc)
>   		freed += (nr_free_pool - shrink_pages) << pool->order;
>   		if (freed >= sc->nr_to_scan)
>   			break;
> +		shrink_pages <<= pool->order;
>   	}
>   	mutex_unlock(&lock);
>   	return freed;



[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux