Re: [RFC] Per file OOM badness

2018-01-19 Thread roger
On 2018年01月19日 16:25, Michal Hocko wrote: [removed the broken quoting - please try to use an email client which doesn't mess up the qouted text] On Fri 19-01-18 06:01:26, He, Roger wrote: [...] I think you are misunderstanding here. Actually for now, the memory in TTM Pools alread

Re: [RFC][PATCH] kernel.h: Add generic roundup_64() macro

2019-05-24 Thread Roger Willcocks
(__y >> 1))) {\ __x = round_up(x, y); \ } else {\ You probably want    if (!(__y & (__y - 1)) -- Roger

Re: [PATCH] drm/mgag200: Increase bandwidth for G200se A rev1

2023-07-25 Thread Roger Sewell
urse, is nothing to do with the mgag200 driver (if it is indeed true - I haven't looked at the Xorg source code at all). The issue from the point of view of my usage case is that the chip works just fine in the 1440x900@60Hz mode, even though 30318019 > 1024*24400. If I haven't made anything sufficiently clear, or if you need more info, please ask. Best wishes, Roger.

Re: [PATCH] drm/mgag200: Increase bandwidth for G200se A rev1

2023-07-26 Thread Roger Sewell
t on the list - but Xorg still lists it under Settings->Display (and Wayland doesn't). With the increased bandwidth module in place it tells me 1440x900 is on the list. I think this is as you expect as far as the kernel rather than Xorg is concerned. Thanks, Roger.

Re: [PATCH] drm/mgag200: Increase bandwidth for G200se A rev1

2023-07-27 Thread Roger Sewell
ssion[2366]: (==) modeset(0): RGB weight 888 in case it makes a difference. Thanks, Roger.

Re: [PATCH] drm/mgag200: Increase bandwidth for G200se A rev1

2023-07-28 Thread Roger Sewell
theory was wrong, but hopefully the attached logs will help you work out why the old kernel permitted the high bandwidth mode I always use (despite returning MODE_BAD) and the new kernel doesn't. (The "old" kernel is 9.1, i.e. 5.14.0-162.6.1.el9_1.0.1, and "new" kern

Re: [PATCH] drm/mgag200: Increase bandwidth for G200se A rev1

2023-07-28 Thread Roger Sewell
ying way beyond my competence), I note that in the old module mga_vga_mode_valid is made known to other parts of the system in a different way than mgag200_mode_config_mode_valid is in the new module (and indeed they have different parameter types). (Might this be relevant ?) Best wishes, Roger.

Re: [PATCH] drm/mgag200: Increase bandwidth for G200se A rev1

2023-07-28 Thread Roger Sewell
not be rejectable by the driver, but just give a warning in the logs. (But I do understand that you will also need to consider other points of view.) I'll confirm the result of the above test shortly. Thanks, Roger.

Re: [PATCH] drm/mgag200: Increase bandwidth for G200se A rev1

2023-08-01 Thread Roger Sewell
s not binding on either of you.) I would be glad to hear what you eventually decide between you. Many thanks indeed for your help ! Roger.

Re: [PATCH] drm/mgag200: Increase bandwidth for G200se A rev1

2023-08-02 Thread Roger Sewell
cing the bug/feature we have been discussing which has eventually led to my realising a big improvement in my display. Also to all those who support open-source software, without which a user would not be able to taylor his system to match what he needs so well. With best wishes, Roger. Section

Re: [PATCH net-next v9 0/3] Add minimal XDP support to TI AM65 CPSW Ethernet driver

2024-08-23 Thread Roger Quadros
_desc_pool > net: ethernet: ti: am65-cpsw: Add minimal XDP support > > drivers/net/ethernet/ti/am65-cpsw-nuss.c| 659 > > drivers/net/ethernet/ti/am65-cpsw-nuss.h| 13 + > drivers/net/ethernet/ti/k3-cppi-desc-pool.c | 46 +- > drivers/net/ethernet/ti/k3-cppi-desc-pool.h | 6 + > 4 files changed, 623 insertions(+), 101 deletions(-) > --- > base-commit: 6613476e225e090cc9aad49be7fa504e290dd33d > change-id: 20240223-am65-cpsw-xdp-basic-4db828508b48 > > Best regards, -- cheers, -roger

Re: [PATCH net-next v9 0/3] Add minimal XDP support to TI AM65 CPSW Ethernet driver

2024-08-23 Thread Roger Quadros
On 23/08/2024 15:12, Roger Quadros wrote: > Hello Julien, > > On 12/04/2024 18:38, Julien Panis wrote: >> This patch adds XDP support to TI AM65 CPSW Ethernet driver. >> >> The following features are implemented: NETDEV_XDP_ACT_BASIC, >> NETDEV_XDP_ACT_REDI

Re: [PATCH net-next v9 3/3] net: ethernet: ti: am65-cpsw: Add minimal XDP support

2024-08-23 Thread Roger Quadros
> + rx_chn->pages[desc_idx] = new_page; > + > if (netif_dormant(ndev)) { > - dev_kfree_skb_any(new_skb); > + am65_cpsw_put_page(rx_chn, new_page, true, desc_idx); > ndev->stats.rx_dropped++; > return 0; > } > > - ret = am65_cpsw_nuss_rx_push(common, new_skb); > +requeue: > + ret = am65_cpsw_nuss_rx_push(common, new_page); > if (WARN_ON(ret < 0)) { > - dev_kfree_skb_any(new_skb); > + am65_cpsw_put_page(rx_chn, new_page, true, desc_idx); > ndev->stats.rx_errors++; > ndev->stats.rx_dropped++; > } > @@ -901,6 +1225,8 @@ static int am65_cpsw_nuss_rx_poll(struct napi_struct > *napi_rx, int budget) > { > struct am65_cpsw_common *common = am65_cpsw_napi_to_common(napi_rx); > int flow = AM65_CPSW_MAX_RX_FLOWS; > + int cpu = smp_processor_id(); > + bool xdp_redirect = false; > int cur_budget, ret; > int num_rx = 0; > -- cheers, -roger

RE: [PATCH] drm/ttm: set bo->resv point to tbo->ttm_resv after individualize_resv

2017-11-07 Thread He, Roger
reed already. And I think it is not easy to put it out of two lock of bo->resv and bo->ttm_resv. Thanks Roger(Hongbo.He) -Original Message- From: dri-devel [mailto:dri-devel-boun...@lists.freedesktop.org] On Behalf Of Michel D?nzer Sent: Wednesday, November 08, 2017 12:16 AM To: Christ

RE: [PATCH 1/6] drm/ttm: add ttm_bo_pipeline_gutting

2018-03-07 Thread He, Roger
Patch 1,4,5: Acked-by: Roger He Patch 2,3,6: Reviewed-by: Roger He -Original Message- From: dri-devel [mailto:dri-devel-boun...@lists.freedesktop.org] On Behalf Of Christian K?nig Sent: Tuesday, March 06, 2018 10:44 PM To: amd-...@lists.freedesktop.org; dri-devel@lists.freedesktop.org

Re: [PATCH v5 1/6] dt-bindings: add bindings for USB physical connector

2018-03-10 Thread Roger Quadros
sbc_hs>; > + }; > + }; > + port@1 { > + reg = <1>; > + usb_con_ss: endpoint { > + rem

Re: [PATCH v5 1/6] dt-bindings: add bindings for USB physical connector

2018-03-13 Thread Roger Quadros
Andrezej, Why don't you have any of the USB maintainers in to/cc? Greg Kroah-Hartman (supporter:USB SUBSYSTEM) Felipe Balbi (maintainer:USB GADGET/PERIPHERAL SUBSYSTEM) On 12/03/18 09:02, Andrzej Hajda wrote: > On 09.03.2018 11:24, Roger Quadros wrote: >> Hi, >> >>

Re: [PATCH v5 1/6] dt-bindings: add bindings for USB physical connector

2018-03-16 Thread Roger Quadros
On 15/03/18 13:46, Robin Murphy wrote: > On 12/03/18 10:41, Roger Quadros wrote: > [...] >>>>> @@ -0,0 +1,75 @@ >>>>> +USB Connector >>>>> += >>>>> + >>>>> +USB connector node represent

RE: [PATCH 2/5] drm/ttm: keep a reference to transfer pipelined BOs

2018-03-26 Thread He, Roger
Reviewed-by: Roger He -Original Message- From: amd-gfx [mailto:amd-gfx-boun...@lists.freedesktop.org] On Behalf Of Christian K?nig Sent: Friday, March 16, 2018 9:21 PM To: linaro-mm-...@lists.linaro.org; linux-me...@vger.kernel.org; dri-devel@lists.freedesktop.org; amd

RE: [PATCH 3/5] drm/ttm: remove the backing store if no placement is given

2018-03-26 Thread He, Roger
Acked-by: Roger He -Original Message- From: amd-gfx [mailto:amd-gfx-boun...@lists.freedesktop.org] On Behalf Of Christian K?nig Sent: Sunday, March 25, 2018 6:58 PM To: linaro-mm-...@lists.linaro.org; linux-me...@vger.kernel.org; dri-devel@lists.freedesktop.org; amd

RE: [radeon-alex:amd-staging-dkms-4.13 3272/3830] drivers/staging//vboxvideo/vbox_ttm.c:190:9: error: incompatible type for argument 2 of 'ttm_bo_move_memcpy'

2018-02-21 Thread He, Roger
:01 AM To: He, Roger Cc: kbuild-...@01.org; dri-devel@lists.freedesktop.org; Ma, Le ; Koenig, Christian Subject: [radeon-alex:amd-staging-dkms-4.13 3272/3830] drivers/staging//vboxvideo/vbox_ttm.c:190:9: error: incompatible type for argument 2 of 'ttm_bo_move_memcpy' t

[PATCH] drm/ttm: check if free mem space is under the lower limit

2018-02-22 Thread Roger He
, 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 Signed-off-by

RE: [PATCH] drm/ttm: check if free mem space is under the lower limit

2018-02-22 Thread He, Roger
-Original Message- From: Koenig, Christian Sent: Thursday, February 22, 2018 7:28 PM To: He, Roger ; dri-devel@lists.freedesktop.org Subject: Re: [PATCH] drm/ttm: check if free mem space is under the lower limit Am 22.02.2018 um 11:10 schrieb Roger He: > the free mem space and

RE: [PATCH] drm/ttm: check if free mem space is under the lower limit

2018-02-22 Thread He, Roger
-Original Message- From: Koenig, Christian Sent: Thursday, February 22, 2018 8:54 PM To: He, Roger ; dri-devel@lists.freedesktop.org Subject: Re: [PATCH] drm/ttm: check if free mem space is under the lower limit Am 22.02.2018 um 12:43 schrieb He, Roger: > > -Original M

RE: [PATCH 6/6] drm/ttm: drop persistent_swap_storage from ttm_bo_init and co

2018-02-22 Thread He, Roger
Series is: Reviewed-by: Roger He -Original Message- From: dri-devel [mailto:dri-devel-boun...@lists.freedesktop.org] On Behalf Of Christian K?nig Sent: Thursday, February 22, 2018 11:02 PM To: dri-devel@lists.freedesktop.org Subject: [PATCH 6/6] drm/ttm: drop persistent_swap_storage

RE: [PATCH 8/8] drm/bochs: remove the default ttm_tt_populate callbacks

2018-02-22 Thread He, Roger
Series is: Reviewed-by: Roger He -Original Message- From: dri-devel [mailto:dri-devel-boun...@lists.freedesktop.org] On Behalf Of Christian K?nig Sent: Thursday, February 22, 2018 7:16 PM To: dri-devel@lists.freedesktop.org Subject: [PATCH 8/8] drm/bochs: remove the default

RE: [PATCH] drm/ttm: check if free mem space is under the lower limit

2018-02-22 Thread He, Roger
-Original Message- From: Alex Deucher [mailto:alexdeuc...@gmail.com] Sent: Thursday, February 22, 2018 10:06 PM To: He, Roger Cc: Koenig, Christian ; dri-devel@lists.freedesktop.org Subject: Re: [PATCH] drm/ttm: check if free mem space is under the lower limit On Thu, Feb 22, 2018 at

RE: [PATCH 4/4] drm/ttm: keep BOs reserved until end of eviction

2018-02-23 Thread He, Roger
looks good to me. Reviewed-by: Roger He -Original Message- From: dri-devel [mailto:dri-devel-boun...@lists.freedesktop.org] On Behalf Of Christian K?nig Sent: Tuesday, February 20, 2018 8:58 PM To: amd-...@lists.freedesktop.org; dri-devel@lists.freedesktop.org; linux-ker

RE: [PATCH 3/4] drm/ttm: handle already locked BOs during eviction and swapout.

2018-02-23 Thread He, Roger
rue; For the special case: when command submission with Per-VM-BO enabled, All BOs a/b/c are always valid BO. After the validation of BOs a and b, when validation of BO c, is it possible to return true and then evict BO a and b by mistake ? Because a/b/c share same task_struct. Thanks Roger(Ho

RE: [PATCH 2/4] drm/amdgpu: use new ww_mutex_is_owned_by function

2018-02-23 Thread He, Roger
Reviewed-by: Roger He -Original Message- From: amd-gfx [mailto:amd-gfx-boun...@lists.freedesktop.org] On Behalf Of Christian K?nig Sent: Tuesday, February 20, 2018 8:58 PM To: amd-...@lists.freedesktop.org; dri-devel@lists.freedesktop.org; linux-ker...@vger.kernel.org Subject: [PATCH

[PATCH] drm/ttm: check if free mem space is under the lower limit

2018-02-23 Thread Roger He
m_limit as 0 to keep original behavior Signed-off-by: Roger He --- drivers/gpu/drm/ttm/ttm_memory.c | 92 drivers/gpu/drm/ttm/ttm_page_alloc.c | 3 ++ drivers/gpu/drm/ttm/ttm_page_alloc_dma.c | 3 ++ include/drm/ttm/ttm_memory.h | 5 +

RE: [PATCH 3/4] drm/ttm: handle already locked BOs during eviction and swapout.

2018-02-23 Thread He, Roger
-Original Message- From: Christian König [mailto:ckoenig.leichtzumer...@gmail.com] Sent: Friday, February 23, 2018 8:06 PM To: He, Roger ; amd-...@lists.freedesktop.org; dri-devel@lists.freedesktop.org; linux-ker...@vger.kernel.org Subject: Re: [PATCH 3/4] drm/ttm: handle already

RE: [PATCH 3/4] drm/ttm: handle already locked BOs during eviction and swapout.

2018-02-23 Thread He, Roger
I missed the Per-VM-BO share the reservation object with root bo. So context is not NULL here. So, this patch is: Reviewed-by: Roger He Thanks Roger(Hongbo.He) -Original Message- From: Christian König [mailto:ckoenig.leichtzumer...@gmail.com] Sent: Friday, February 23, 2018 8:06 PM To

RE: [PATCH 2/2] drm/ttm: cleanup ttm_tt_create

2018-02-23 Thread He, Roger
Series is: Reviewed-by: Roger He -Original Message- From: dri-devel [mailto:dri-devel-boun...@lists.freedesktop.org] On Behalf Of Christian K?nig Sent: Friday, February 23, 2018 8:25 PM To: dri-devel@lists.freedesktop.org Subject: [PATCH 2/2] drm/ttm: cleanup ttm_tt_create Cleanup

RE: [PATCH 4/5] drm/ttm: add ttm_sg_tt_init

2018-03-05 Thread He, Roger
Patch 1: Acked-by: Roger He Patch 2~5: Reviewed-by: Roger He -Original Message- From: dri-devel [mailto:dri-devel-boun...@lists.freedesktop.org] On Behalf Of Christian K?nig Sent: Monday, March 05, 2018 8:07 PM To: dri-devel@lists.freedesktop.org; amd-...@lists.freedesktop.org; Ben

RE: [PATCH 1/2] drm/ttm: Allow page allocations w/o triggering OOM..

2018-01-15 Thread He, Roger
-Original Message- From: Andrey Grodzovsky [mailto:andrey.grodzov...@amd.com] Sent: Saturday, January 13, 2018 6:29 AM To: dri-devel@lists.freedesktop.org; amd-...@lists.freedesktop.org Cc: Koenig, Christian ; He, Roger ; Grodzovsky, Andrey Subject: [PATCH 1/2] drm/ttm: Allow page

RE: [PATCH 2/2] drm/amdgpu: Use new TTM flag to avoid OOM triggering.

2018-01-15 Thread He, Roger
-Original Message- From: Andrey Grodzovsky [mailto:andrey.grodzov...@amd.com] Sent: Saturday, January 13, 2018 6:29 AM To: dri-devel@lists.freedesktop.org; amd-...@lists.freedesktop.org Cc: Koenig, Christian ; He, Roger ; Grodzovsky, Andrey Subject: [PATCH 2/2] drm/amdgpu: Use new TTM

RE: [PATCH 2/2] drm/amdgpu: Use new TTM flag to avoid OOM triggering.

2018-01-16 Thread He, Roger
-Original Message- From: Christian König [mailto:ckoenig.leichtzumer...@gmail.com] Sent: Tuesday, January 16, 2018 8:46 PM To: Grodzovsky, Andrey ; Koenig, Christian ; He, Roger ; dri-devel@lists.freedesktop.org; amd-...@lists.freedesktop.org Subject: Re: [PATCH 2/2] drm/amdgpu: Use

RE: [PATCH v2 1/2] drm/ttm: Allow page allocations w/o triggering OOM..

2018-01-16 Thread He, Roger
Reviewed-by: Roger He Thanks Roger(Hongbo.He) -Original Message- From: dri-devel [mailto:dri-devel-boun...@lists.freedesktop.org] On Behalf Of Andrey Grodzovsky Sent: Tuesday, January 16, 2018 11:18 PM To: dri-devel@lists.freedesktop.org; amd-...@lists.freedesktop.org; Koenig

[PATCH] drm/ttm: add updated_glob_count in dma_page

2018-01-16 Thread Roger He
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->pages_list. but actually here we should not update for the last dma_page. Signed-off-by: Roger He --- drivers

RE: [PATCH] drm/ttm: add updated_glob_count in dma_page

2018-01-16 Thread He, Roger
-Original Message- From: Koenig, Christian Sent: Wednesday, January 17, 2018 3:37 PM To: He, Roger ; dri-devel@lists.freedesktop.org Cc: Grodzovsky, Andrey Subject: Re: [PATCH] drm/ttm: add updated_glob_count in dma_page Am 17.01.2018 um 06:54 schrieb Roger He: > add this for correc

[PATCH] drm/ttm: add VADDR_FLAG_UPDATED_COUNT to correctly update dma_page global count

2018-01-17 Thread Roger He
e is not right v3: use lower bits of dma_page vaddr Signed-off-by: Roger He --- drivers/gpu/drm/ttm/ttm_page_alloc_dma.c | 55 +--- 1 file changed, 29 insertions(+), 26 deletions(-) diff --git a/drivers/gpu/drm/ttm/ttm_page_alloc_dma.c b/drivers/gpu/drm/ttm/ttm_page_all

RE: [PATCH 2/2] drm/ttm: Don't unreserve swapped BOs that were previously reserved

2018-01-18 Thread He, Roger
good catch! Thanks Roger(Hongbo.He) -Original Message- From: Kuehling, Felix Sent: Friday, January 19, 2018 12:56 AM To: amd-...@lists.freedesktop.org; dri-devel@lists.freedesktop.org; Koenig, Christian ; He, Roger Cc: Kuehling, Felix Subject: [PATCH 2/2] drm/ttm: Don't unre

RE: [RFC] Per file OOM badness

2018-01-18 Thread He, Roger
TTM Pools already has mm_shrink which is implemented in ttm_pool_mm_shrink_init. And here the memory we want to make it contribute to OOM badness is not in TTM Pools. Because when TTM buffer allocation success, the memory already is removed from TTM Pools. Thanks Roger(Hongbo

RE: [RFC] Per file OOM badness

2018-01-18 Thread He, Roger
;vm_mm, MM_SWAPENTS, buffer_size); // or MM_SHMEMPAGES or add new item. Update the corresponding item in mm_rss_stat always. If that, we can control the status update accurately. What do you think about that? And is there any side-effect for this approach? Thanks Roger(Hongbo.He) -Original M

[PATCH] drm/ttm: fix missing parameter change for ttm_bo_cleanup_refs

2018-01-18 Thread Roger He
Missed in the patche: dc94777 drm/ttm: enable swapout for reserved BOs during allocation. don't unreserve the BO if it is not reserved by itself. Signed-off-by: Roger He --- drivers/gpu/drm/ttm/ttm_bo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/dr

[PATCH] drm/ttm: add the missed global memory count update

2018-01-19 Thread Roger He
when ttm_mem_global_alloc_page fails, we should call ttm_mem_global_free_page to update memory count for the ttm pages which already run ttm_mem_global_alloc_page successfully Signed-off-by: Roger He --- drivers/gpu/drm/ttm/ttm_page_alloc.c | 41 ++-- 1 file

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

2018-01-29 Thread Roger He
ttm module needs it to determine its internal parameter setting. Signed-off-by: Roger He --- include/linux/swap.h | 6 ++ mm/swapfile.c| 15 +++ 2 files changed, 21 insertions(+) diff --git a/include/linux/swap.h b/include/linux/swap.h index c2b8128..708d66f 100644

[PATCH 2/2] drm/ttm: add ttm page_flags TTM_PAGE_FLAG_PAGEFAULT

2018-01-29 Thread Roger He
trigger OOM killer. v2: add new page flag TTM_PAGE_FLAG_PAGEFAULT rather than using struct ttm_operation_ctx Signed-off-by: Roger He --- drivers/gpu/drm/ttm/ttm_bo_vm.c | 6 -- drivers/gpu/drm/ttm/ttm_memory.c | 27 +++ drivers/gpu/drm/ttm

[PATCH 1/2] drm/ttm: add swap_glob_mem in ttm_mem_global

2018-01-29 Thread Roger He
ory which can't be flushed into disk/file. At this time, any memory request will trigger OOM killer. v2: always get total system swap size rather than getting it once at module init time Signed-off-by: Roger He --- drivers/gpu/drm/ttm/ttm_memory.c | 24 drivers/gpu

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

2018-01-29 Thread He, Roger
. But get_nr_swap_pages is the only API we can accessed from other module now. It can't cover the case of the dynamic swap size increment. I mean: user can use "swapon" to enable new swap file or swap disk dynamically or "swapoff" to disable swap space. Thanks Roger(

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

2018-01-29 Thread He, Roger
wap size and control the swap size used by TTM very accurately. Thanks Roger(Hongbo.He) -Original Message- From: dri-devel [mailto:dri-devel-boun...@lists.freedesktop.org] On Behalf Of He, Roger Sent: Tuesday, January 30, 2018 10:57 AM To: Michal Hocko Cc: linux...@kvack.org; linux-ker

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

2018-01-30 Thread He, Roger
isk at all. Only special test case use more or probably that is intentional. Thanks Roger(Hongbo.He) -Original Message- From: Michal Hocko [mailto:mho...@kernel.org] Sent: Tuesday, January 30, 2018 8:29 PM To: Koenig, Christian Cc: He, Roger ; linux...@kvack.org; linux-ker...@vger.

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

2018-01-31 Thread He, Roger
I think this patch isn't need at all. You can directly read total_swap_pages variable in TTM. Because the variable is not exported by EXPORT_SYMBOL_GPL. So direct using will result in: "WARNING: "total_swap_pages" [drivers/gpu/drm/ttm/ttm.ko] undefined!"

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

2018-01-31 Thread He, Roger
. For example: total system memory * 1/2. If that it will match the platform configuration better. Roger can you test that approach once more with your fix for the OOM issues in the page fault handler? Sure. Use the limit as total ram*1/2 seems work very well. No OOM although swap

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

2018-01-31 Thread He, Roger
Hi Michal: How about only EXPORT_SYMBOL_GPL(total_swap_pages) ? Thanks Roger(Hongbo.He) -Original Message- From: He, Roger Sent: Wednesday, January 31, 2018 1:52 PM To: 'Michal Hocko' ; Koenig, Christian Cc: linux...@kvack.org; linux-ker...@vger.kernel.org;

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

2018-02-01 Thread He, Roger
o use more swap space as well. Thanks Roger(Hongbo.He) -Original Message- From: dri-devel [mailto:dri-devel-boun...@lists.freedesktop.org] On Behalf Of He, Roger Sent: Thursday, February 01, 2018 1:48 PM To: Koenig, Christian ; Zhou, David(ChunMing) ; dri-devel@lists.freedesktop.org Cc:

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

2018-02-01 Thread He, Roger
bigger than swap disk, so no swap for TTM is allowed at all. For now we work out an improved version based on get_nr_swap_pages(). Going to send out later. Thanks Roger(Hongbo.He) -Original Message- From: He, Roger Sent: Thursday, February 01, 2018 4:03 PM To: Koenig, Christian ; Zhou, David

[PATCH 1/5] drm/ttm: add max_swap_mem in ttm_mem_global

2018-02-01 Thread Roger He
set its initial value as 1/2 * free swap cache size when module initial. and adjust this value when allocate TTM memory Signed-off-by: Roger He --- drivers/gpu/drm/ttm/ttm_memory.c | 10 -- include/drm/ttm/ttm_memory.h | 2 ++ 2 files changed, 10 insertions(+), 2 deletions(-) diff

[PATCH 2/5] drm/ttm: add swap_glob_mem in ttm_mem_global

2018-02-01 Thread Roger He
ory which can't be flushed into swap space. Signed-off-by: Roger He --- drivers/gpu/drm/ttm/ttm_memory.c | 12 drivers/gpu/drm/ttm/ttm_tt.c | 13 +++-- include/drm/ttm/ttm_memory.h | 2 ++ 3 files changed, 21 insertions(+), 6 deletions(-) diff --git a/drivers/gpu

[PATCH 3/5] drm/ttm: add ttm page_flags TTM_PAGE_FLAG_PAGEFAULT

2018-02-01 Thread Roger He
OOM killer. v2: fix minor typo v3: keep original behavior except ttm page with flag NO_RETRY Signed-off-by: Roger He --- drivers/gpu/drm/ttm/ttm_bo_vm.c | 6 +- drivers/gpu/drm/ttm/ttm_memory.c | 27 +++ drivers/gpu/drm/ttm/ttm_page_alloc.c | 5

[PATCH 4/5] drm/ttm: if need_dma32 is not set, actually no need dma32 zone at all.

2018-02-01 Thread Roger He
because this zone has only 4GB, it is easy to became bottleneck for huge normal zone. Signed-off-by: Roger He --- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 3 +++ drivers/gpu/drm/ttm/ttm_memory.c| 10 -- include/drm/ttm/ttm_memory.h| 1 + 3 files changed, 12

[PATCH 5/5] drm/ttm: keep original behavior except bo device with flag no_retry

2018-02-01 Thread Roger He
Signed-off-by: Roger He --- drivers/gpu/drm/ttm/ttm_memory.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/ttm/ttm_memory.c b/drivers/gpu/drm/ttm/ttm_memory.c index 875e5b8..25e1ce0 100644 --- a/drivers/gpu/drm/ttm/ttm_memory.c +++ b/drivers/gpu/drm

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

2018-02-01 Thread He, Roger
my machine, set it as 4G can work. But 4G also not work on test machine with 16GB system memory & 8GB swap disk. Thanks Roger(Hongbo.He) -Original Message- From: Koenig, Christian Sent: Friday, February 02, 2018 3:46 PM To: He, Roger ; Zhou, David(ChunMing) ; dri-devel@lists.freedesk

RE: [PATCH 1/5] drm/ttm: add max_swap_mem in ttm_mem_global

2018-02-02 Thread He, Roger
Need call si_swapinfo to fill those valules . void si_swapinfo(struct sysinfo *val) But that function is not exported as well. Thanks Roger(Hongbo.He) From: dri-devel [mailto:dri-devel-boun...@lists.freedesktop.org] On Behalf Of Chunming Zhou Sent: Friday, February 02, 2018 3:38 PM To: He

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

2018-02-02 Thread He, Roger
mailist today. Thanks Roger(Hongbo.He) -Original Message- From: dri-devel [mailto:dri-devel-boun...@lists.freedesktop.org] On Behalf Of He, Roger Sent: Friday, February 02, 2018 3:54 PM To: Koenig, Christian ; Zhou, David(ChunMing) ; dri-devel@lists.freedesktop.org Cc: linux.

RE: [PATCH 3/5] drm/radeon: remove extra TT unpopulated check

2018-02-04 Thread He, Roger
The subsystem chould check that, not the driver. Commit log typo, should be "should" rather than " chould". With that fix, this patch is Reviewed-by: Roger He Thanks Roger(Hongbo.He) Signed-off-by: Christian König --- drivers/gpu/drm/radeon/radeon_ttm.c | 3 --- 1 file

RE: [PATCH 5/5] drm/amdgpu: replace iova debugfs file with iomem

2018-02-04 Thread He, Roger
Patch1 & 2 & 4, Reviewed-by: Roger He Patch 5: Acked-by: Roger He -Original Message- From: dri-devel [mailto:dri-devel-boun...@lists.freedesktop.org] On Behalf Of Christian K?nig Sent: Saturday, February 03, 2018 3:10 AM To: amd-...@lists.freedesktop.org; d

[PATCH 0/5] prevent OOM triggered by TTM

2018-02-06 Thread Roger He
defaut), keep the original behavior no any change. Roger He (5): drm/ttm: check if the free swap space is under limit 256MB drm/ttm: keep original behavior except with flag no_retry drm/ttm: use bit flag to replace allow_reserved_eviction in ttm_operation_ctx drm/ttm: add bit flag

[PATCH 1/5] drm/ttm: check if the free swap space is under limit 256MB

2018-02-06 Thread Roger He
> 256MB and at that time free swap space is under 256MB but available system mem > its lower limit, allow TTM allocation; b. if total swap space < 256 or no swap disk at all, check the available system mem, if it is bigger than its threshold, allow TTM allocation. Signed-off-by:

[PATCH 2/5] drm/ttm: keep original behavior except with flag no_retry

2018-02-06 Thread Roger He
set the no_retry flag in struct ttm_mem_global and init it after ttm_mem_global_init Signed-off-by: Roger He --- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 8 +--- drivers/gpu/drm/ttm/ttm_memory.c| 3 +++ include/drm/ttm/ttm_memory.h| 3 +++ 3 files changed, 11 insertions

[PATCH 3/5] drm/ttm: use bit flag to replace allow_reserved_eviction in ttm_operation_ctx

2018-02-06 Thread Roger He
for saving memory and more bit flag can be used in future Signed-off-by: Roger He --- drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 4 ++-- drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 4 ++-- drivers/gpu/drm/ttm/ttm_bo.c | 3 ++- include/drm/ttm/ttm_bo_api.h | 7

[PATCH 4/5] drm/ttm: add bit flag TTM_OPT_FLAG_ALLOW_ALLOC_ANYWAY

2018-02-06 Thread Roger He
will trigger OOM killer. v2: keep original behavior except ttm bo with flag no_retry Signed-off-by: Roger He --- drivers/gpu/drm/ttm/ttm_bo_vm.c | 6 -- drivers/gpu/drm/ttm/ttm_memory.c | 25 + drivers/gpu/drm/ttm/ttm_page_alloc_dma.c | 1 - include

[PATCH 5/5] drm/ttm: add input parameter allow_allo_anyway for ttm_bo_evict_mm

2018-02-06 Thread Roger He
if true for it, allocate TTM pages regardless of zone global memory account limit. that is for another special case: suspend. doesn't care the zone global memory account limit for this case. Signed-off-by: Roger He --- drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c | 2 +- drivers/gpu/dr

RE: [PATCH 0/5] prevent OOM triggered by TTM

2018-02-06 Thread He, Roger
, because initially I also concern that but no better way at that time. Going to improve the patches. Thanks! -Original Message- From: Koenig, Christian Sent: Tuesday, February 06, 2018 5:52 PM To: He, Roger ; amd-...@lists.freedesktop.org; dri-devel@lists.freedesktop.org Cc: tho

RE: [PATCH 0/5] prevent OOM triggered by TTM

2018-02-07 Thread He, Roger
truct ttm_bo_device to let driver set according to its request. Thanks Roger(Hongbo.He) -Original Message- From: Thomas Hellstrom [mailto:tho...@shipmail.org] Sent: Wednesday, February 07, 2018 2:43 PM To: He, Roger ; amd-...@lists.freedesktop.org; dri-devel@lists.freedesktop.org Cc: K

RE: [PATCH 0/5] prevent OOM triggered by TTM

2018-02-07 Thread He, Roger
Sure, will make it turn off as default and make the limit configurable. Thanks Roger(Hongbo.He) -Original Message- From: Christian König [mailto:ckoenig.leichtzumer...@gmail.com] Sent: Wednesday, February 07, 2018 4:41 PM To: He, Roger ; Thomas Hellstrom ; amd-...@lists.freedesktop.org

[PATCH 1/4] drm/ttm: use bit flag to replace allow_reserved_eviction in ttm_operation_ctx

2018-02-08 Thread Roger He
for saving memory and more bit flag can be used in future Signed-off-by: Roger He --- drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 4 ++-- drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 4 ++-- drivers/gpu/drm/ttm/ttm_bo.c | 3 ++- include/drm/ttm/ttm_bo_api.h | 7

[PATCH 4/4] drm/ttm: check if the mem free space is under lower limit

2018-02-08 Thread Roger He
allocation. v2: merge two memory limit(swap and system) into one v3: keep original behavior except with ttm->page_flags TTM_PAGE_FLAG_NO_RETRY Signed-off-by: Roger He --- drivers/gpu/drm/ttm/ttm_memory.c | 34 drivers/gpu/drm/ttm/ttm_page_alloc.c |

[PATCH 3/4] drm/ttm: add input parameter force_alloc for ttm_bo_evict_mm

2018-02-08 Thread Roger He
if true, allocate TTM pages regardless of zone global memory account limit. For suspend, We should avoid TTM memory allocate failure then result in suspend failure. Signed-off-by: Roger He --- drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 4

[PATCH 2/4] drm/ttm: add bit flag TTM_OPT_FLAG_FORCE_ALLOC

2018-02-08 Thread Roger He
trigger OOM killer. the subsequent patche will use this. v2: keep original behavior except ttm bo with flag no_retry Signed-off-by: Roger He --- drivers/gpu/drm/ttm/ttm_bo_vm.c | 6 -- drivers/gpu/drm/ttm/ttm_page_alloc_dma.c | 1 - include/drm/ttm/ttm_bo_api.h | 4 +++- 3

RE: [PATCH 3/4] drm/ttm: add input parameter force_alloc for ttm_bo_evict_mm

2018-02-08 Thread He, Roger
I can't think of an use case when we don't want this to succeed. That is true. seems I can simplify more here. Thanks Roger(Hongbo.He) -Original Message- From: Koenig, Christian Sent: Thursday, February 08, 2018 8:58 PM To: He, Roger ; amd-...@lists.freedesktop.org;

[PATCH 1/3] drm/ttm: add bit flag TTM_OPT_FLAG_FORCE_ALLOC

2018-02-08 Thread Roger He
trigger OOM killer. v2: keep original behavior except ttm bo with flag no_retry v3: forward the ttm_operation_ctx to ttm_mem_global_reserve Signed-off-by: Roger He --- drivers/gpu/drm/ttm/ttm_bo_vm.c | 6 -- drivers/gpu/drm/ttm/ttm_memory.c | 18 ++ drivers/gpu

[PATCH 2/3] drm/ttm: add input parameter force_alloc for ttm_bo_force_list_clean

2018-02-08 Thread Roger He
if it is true, allocate TTM pages regardless of zone global memory account limit. For example suspend, We should avoid TTM memory allocate failure to lead to whole process fail. Signed-off-by: Roger He --- drivers/gpu/drm/ttm/ttm_bo.c | 13 - 1 file changed, 8 insertions(+), 5

[PATCH 3/3] drm/ttm: check if free mem space is under the lower limit

2018-02-08 Thread Roger He
, 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 ttm_opt_ctx->flags & TTM_OPT_FLAG_FORCE_ALLOC Signed-off-by: Roger He --- drivers/g

RE: [PATCH 2/3] drm/ttm: add input parameter force_alloc for ttm_bo_force_list_clean

2018-02-09 Thread He, Roger
Ok. please ignore patch3 since I have some minor changes. Will send out later. Thanks Roger(Hongbo.He) -Original Message- From: Koenig, Christian Sent: Friday, February 09, 2018 5:38 PM To: He, Roger ; dri-devel@lists.freedesktop.org Subject: Re: [PATCH 2/3] drm/ttm: add input parameter

[PATCH 1/3] drm/ttm: add bit flag TTM_OPT_FLAG_FORCE_ALLOC

2018-02-09 Thread Roger He
trigger OOM killer. will be used later. v2: set the FORCE_ALLOC always v3: minor refine Signed-off-by: Roger He --- drivers/gpu/drm/ttm/ttm_bo_vm.c | 4 +++- include/drm/ttm/ttm_bo_api.h| 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/ttm/ttm_bo_vm.c b

[PATCH 3/3] drm/ttm: check if free mem space is under the lower limit

2018-02-09 Thread Roger He
, 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 Signed-off-by: Roger He --- drivers/gpu/drm/ttm/tt

[PATCH 2/3] drm/ttm: set TTM_OPT_FLAG_FORCE_ALLOC in ttm_bo_force_list_clean

2018-02-09 Thread Roger He
Because ttm_bo_force_list_clean() is only called on two occasions: 1. By ttm_bo_evict_mm() during suspend. 2. By ttm_bo_clean_mm() when the driver unloads. On both cases we absolutely don't want any memory allocation failure. Signed-off-by: Roger He --- drivers/gpu/drm/ttm/ttm_bo.

Recall: [PATCH 3/4] drm/ttm: make unlocking in ttm_bo_cleanup_refs optional

2017-11-10 Thread He, Roger
He, Roger would like to recall the message, "[PATCH 3/4] drm/ttm: make unlocking in ttm_bo_cleanup_refs optional". ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel

Recall: [PATCH 3/4] drm/ttm: make unlocking in ttm_bo_cleanup_refs optional

2017-11-10 Thread He, Roger
He, Roger would like to recall the message, "[PATCH 3/4] drm/ttm: make unlocking in ttm_bo_cleanup_refs optional". ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel

Recall: [PATCH 3/4] drm/ttm: make unlocking in ttm_bo_cleanup_refs optional

2017-11-10 Thread He, Roger
He, Roger would like to recall the message, "[PATCH 3/4] drm/ttm: make unlocking in ttm_bo_cleanup_refs optional". ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel

RE: [PATCH 6/7] drm/ttm: make unlocking in ttm_bo_cleanup_refs optional

2017-11-10 Thread He, Roger
->list_kref, ttm_bo_ref_bug); spin_unlock(&glob->lru_lock); ttm_bo_cleanup_memtype_use(bo); if (unlock_resv) //[Roger]: not sure we should add condition here as well. If not, for per-vm-bo, evictio

RE: [PATCH 3/4] drm/ttm: make unlocking in ttm_bo_cleanup_refs optional

2017-11-10 Thread He, Roger
Please see comments inline -Original Message- From: Christian König [mailto:ckoenig.leichtzumer...@gmail.com] Sent: Wednesday, November 08, 2017 11:00 PM To: He, Roger ; amd-...@lists.freedesktop.org; dri-devel@lists.freedesktop.org Subject: [PATCH 3/4] drm/ttm: make unlocking in

RE: [PATCH 1/2] drm/ttm: fix ttm_mem_evict_first once more

2017-11-15 Thread He, Roger
Reviewed-by: Roger He Thanks Roger(Hongbo.He) -Original Message- From: amd-gfx [mailto:amd-gfx-boun...@lists.freedesktop.org] On Behalf Of Christian K?nig Sent: Wednesday, November 15, 2017 8:32 PM To: amd-...@lists.freedesktop.org; dri-devel@lists.freedesktop.org Subject: [PATCH 1/2

[PATCH 0/4] *** fix memory leak for HUGE PAGE ***

2017-11-21 Thread Roger He
1. add page order into pool to support gtt huge page 2. add page order support when ttm pages put 3. update memory shrinker with order handling Roger He (4): drm/ttm: add page order in page pool drm/ttm: use NUM_PAGES_TO_ALLOC always drm/ttm: add page order support in ttm_pages_put drm

[PATCH 1/4] drm/ttm: add page order in page pool

2017-11-21 Thread Roger He
to indicate page order for each element in the pool Change-Id: Ic609925ca5d2a5d4ad49d6becf505388ce3624cf Signed-off-by: Roger He --- drivers/gpu/drm/ttm/ttm_page_alloc.c | 33 ++--- 1 file changed, 22 insertions(+), 11 deletions(-) diff --git a/drivers/gpu/drm/ttm

[PATCH 2/4] drm/ttm: use NUM_PAGES_TO_ALLOC always

2017-11-21 Thread Roger He
Change-Id: Ide96a1ccad9bb44b0bb0d80e123c2d810ba618ed Signed-off-by: Roger He --- drivers/gpu/drm/ttm/ttm_page_alloc.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/gpu/drm/ttm/ttm_page_alloc.c b/drivers/gpu/drm/ttm/ttm_page_alloc.c index 2b83c52..27b2402 100644

[PATCH 3/4] drm/ttm: add page order support in ttm_pages_put

2017-11-21 Thread Roger He
Change-Id: Ia55b206d95812c5afcfd6cec29f580758d1f50f0 Signed-off-by: Roger He --- drivers/gpu/drm/ttm/ttm_page_alloc.c | 42 +--- 1 file changed, 34 insertions(+), 8 deletions(-) diff --git a/drivers/gpu/drm/ttm/ttm_page_alloc.c b/drivers/gpu/drm/ttm

[PATCH 4/4] drm/ttm: free one in huge pool even shrink request less than one element

2017-11-21 Thread Roger He
Change-Id: Id8bd4d1ecff9f3ab14355e2dbd1c59b9fe824e01 Signed-off-by: Roger He --- drivers/gpu/drm/ttm/ttm_page_alloc.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/ttm/ttm_page_alloc.c b/drivers/gpu/drm/ttm/ttm_page_alloc.c index 90546fd..c194a51

  1   2   3   >