Commit 548cbba1 authored by Vijayanand Jitta's avatar Vijayanand Jitta Committed by Greg Kroah-Hartman

ion: Consider ion pool pages as indirectly reclaimable

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: default avatarVijayanand Jitta <vjitta@codeaurora.org>
Acked-by: default avatarLaura Abbott <labbott@redhat.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 7a787c25
...@@ -32,6 +32,9 @@ static void ion_page_pool_add(struct ion_page_pool *pool, struct page *page) ...@@ -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); list_add_tail(&page->lru, &pool->low_items);
pool->low_count++; pool->low_count++;
} }
mod_node_page_state(page_pgdat(page), NR_INDIRECTLY_RECLAIMABLE_BYTES,
(1 << (PAGE_SHIFT + pool->order)));
mutex_unlock(&pool->mutex); mutex_unlock(&pool->mutex);
} }
...@@ -50,6 +53,8 @@ static struct page *ion_page_pool_remove(struct ion_page_pool *pool, bool high) ...@@ -50,6 +53,8 @@ static struct page *ion_page_pool_remove(struct ion_page_pool *pool, bool high)
} }
list_del(&page->lru); list_del(&page->lru);
mod_node_page_state(page_pgdat(page), NR_INDIRECTLY_RECLAIMABLE_BYTES,
-(1 << (PAGE_SHIFT + pool->order)));
return page; return page;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment