lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Message-Id: <1524627830-17187-1-git-send-email-vjitta@codeaurora.org> Date: Wed, 25 Apr 2018 09:13:50 +0530 From: vjitta@...eaurora.org To: labbott@...hat.com, sumit.semwal@...aro.org Cc: gregkh@...uxfoundation.org, arve@...roid.com, tkjos@...roid.com, maco@...roid.com, devel@...verdev.osuosl.org, linux-kernel@...r.kernel.org, Vijayanand Jitta <vjitta@...eaurora.org> Subject: [PATCH] ion: Consider ion pool pages as indirectly reclaimable From: Vijayanand Jitta <vjitta@...eaurora.org> An issue is observed where mallocs are failing due to overcommit failure. The failure happens when there is high ION page pool since ION page pool is not considered reclaimable by the overcommit calculation code. This change considers ion pool pages as indirectly reclaimable and thus accounted as available memory in the overcommit calculation. Signed-off-by: Vijayanand Jitta <vjitta@...eaurora.org> --- drivers/staging/android/ion/ion_page_pool.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/staging/android/ion/ion_page_pool.c b/drivers/staging/android/ion/ion_page_pool.c index db8f614..9bc56eb 100644 --- a/drivers/staging/android/ion/ion_page_pool.c +++ b/drivers/staging/android/ion/ion_page_pool.c @@ -32,6 +32,9 @@ static void ion_page_pool_add(struct ion_page_pool *pool, struct page *page) list_add_tail(&page->lru, &pool->low_items); pool->low_count++; } + + mod_node_page_state(page_pgdat(page), NR_INDIRECTLY_RECLAIMABLE_BYTES, + (1 << (PAGE_SHIFT + pool->order))); mutex_unlock(&pool->mutex); } @@ -50,6 +53,8 @@ static struct page *ion_page_pool_remove(struct ion_page_pool *pool, bool high) } list_del(&page->lru); + mod_node_page_state(page_pgdat(page), NR_INDIRECTLY_RECLAIMABLE_BYTES, + -(1 << (PAGE_SHIFT + pool->order))); return page; } -- 1.9.1
Powered by blists - more mailing lists