Re: [PATCH] mm/swap: add function get_total_swap_pages to expose total_swap_pages

2018-01-31 Thread Chunming Zhou
---Original Message- From: dri-devel [mailto:dri-devel-boun...@lists.freedesktop.org] On Behalf Of Chunming Zhou Sent: Wednesday, January 31, 2018 3:15 PM To: He, Roger ; dri-de...@lists.freedesktop.org Cc: linux...@kvack.org; linux-kernel@vger.kernel.org; Koenig, Christian Su

Re: [PATCH] mm/swap: add function get_total_swap_pages to expose total_swap_pages

2018-01-30 Thread Chunming Zhou
Hi Roger, I think this patch isn't need at all. You can directly read total_swap_pages variable in TTM. See the comment: /* protected with swap_lock. reading in vm_swap_full() doesn't need lock */ long total_swap_pages; there are many places using it directly, you just couldn't change its va

Re: [PATCH 3/4] drm/gem: adjust per file OOM badness on handling buffers

2018-01-18 Thread Chunming Zhou
On 2018年01月19日 00:47, Andrey Grodzovsky wrote: Large amounts of VRAM are usually not CPU accessible, so they are not mapped into the processes address space. But since the device drivers usually support swapping buffers from VRAM to system memory we can still run into an out of memory situation