Alloc rpool with strict memory requirements

Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
This commit is contained in:
Michal Mielewczyk 2020-03-25 17:39:37 -04:00
parent d7acbac253
commit 8c57dc51c0
2 changed files with 2 additions and 2 deletions

View File

@ -55,7 +55,7 @@ void *_cas_alloc_page_rpool(void *allocator_ctx, int cpu)
{ {
struct page *page; struct page *page;
page = alloc_page(GFP_KERNEL); page = alloc_page(GFP_NOIO | __GFP_NORETRY);
if (!page) if (!page)
return NULL; return NULL;

View File

@ -69,7 +69,7 @@ static void *env_allocator_new_rpool(void *allocator_ctx, int cpu)
env_allocator *allocator = (env_allocator*) allocator_ctx; env_allocator *allocator = (env_allocator*) allocator_ctx;
struct _env_allocator_item *item; struct _env_allocator_item *item;
item = kmem_cache_zalloc(allocator->kmem_cache, GFP_KERNEL); item = kmem_cache_zalloc(allocator->kmem_cache, GFP_NOIO | __GFP_NORETRY);
if (item) { if (item) {
item->from_rpool = 1; item->from_rpool = 1;