Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

IB/iser: Use atomic allocations

Two minor flows in iSER's data path still use allocations; move them
to be atomic as a preperation step towards moving to use libiscsi
passthrough mode.

Signed-off-by: Or Gerlitz <ogerlitz@voltaire.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>

authored by

Or Gerlitz and committed by
Roland Dreier
528f4e8c f19624aa

+3 -3
+1 -1
drivers/infiniband/ulp/iser/iser_initiator.c
··· 373 373 iser_dbg("%s itt %d dseg_len %d offset %d\n", 374 374 __func__,(int)itt,(int)data_seg_len,(int)buf_offset); 375 375 376 - tx_desc = kmem_cache_zalloc(ig.desc_cache, GFP_NOIO); 376 + tx_desc = kmem_cache_zalloc(ig.desc_cache, GFP_ATOMIC); 377 377 if (tx_desc == NULL) { 378 378 iser_err("Failed to alloc desc for post dataout\n"); 379 379 return -ENOMEM;
+2 -2
drivers/infiniband/ulp/iser/iser_memory.c
··· 53 53 unsigned long cmd_data_len = data->data_len; 54 54 55 55 if (cmd_data_len > ISER_KMALLOC_THRESHOLD) 56 - mem = (void *)__get_free_pages(GFP_NOIO, 56 + mem = (void *)__get_free_pages(GFP_ATOMIC, 57 57 ilog2(roundup_pow_of_two(cmd_data_len)) - PAGE_SHIFT); 58 58 else 59 - mem = kmalloc(cmd_data_len, GFP_NOIO); 59 + mem = kmalloc(cmd_data_len, GFP_ATOMIC); 60 60 61 61 if (mem == NULL) { 62 62 iser_err("Failed to allocate mem size %d %d for copying sglist\n",