From patchwork Wed Feb 3 15:39:30 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Or Gerlitz X-Patchwork-Id: 76723 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o13FbR3i014192 for ; Wed, 3 Feb 2010 15:39:18 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757291Ab0BCPjR (ORCPT ); Wed, 3 Feb 2010 10:39:17 -0500 Received: from fwil.voltaire.com ([193.47.165.2]:32814 "EHLO exil.voltaire.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1757219Ab0BCPjR (ORCPT ); Wed, 3 Feb 2010 10:39:17 -0500 Received: from zuben.voltaire.com ([172.25.5.15]) by exil.voltaire.com with Microsoft SMTPSVC(6.0.3790.3959); Wed, 3 Feb 2010 17:39:16 +0200 Date: Wed, 3 Feb 2010 17:39:30 +0200 (IST) From: Or Gerlitz To: Roland Dreier cc: linux-rdma , Mike Christie Subject: [PATCH 06/9] ib/iser: use atomic allocations In-Reply-To: Message-ID: References: MIME-Version: 1.0 X-OriginalArrivalTime: 03 Feb 2010 15:39:16.0124 (UTC) FILETIME=[0AEDD5C0:01CAA4E7] Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Wed, 03 Feb 2010 15:39:18 +0000 (UTC) Index: linux-2.6.33-rc4/drivers/infiniband/ulp/iser/iser_initiator.c =================================================================== --- linux-2.6.33-rc4.orig/drivers/infiniband/ulp/iser/iser_initiator.c +++ linux-2.6.33-rc4/drivers/infiniband/ulp/iser/iser_initiator.c @@ -373,7 +373,7 @@ int iser_send_data_out(struct iscsi_conn iser_dbg("%s itt %d dseg_len %d offset %d\n", __func__,(int)itt,(int)data_seg_len,(int)buf_offset); - tx_desc = kmem_cache_zalloc(ig.desc_cache, GFP_NOIO); + tx_desc = kmem_cache_zalloc(ig.desc_cache, GFP_ATOMIC); if (tx_desc == NULL) { iser_err("Failed to alloc desc for post dataout\n"); return -ENOMEM; Index: linux-2.6.33-rc4/drivers/infiniband/ulp/iser/iser_memory.c =================================================================== --- linux-2.6.33-rc4.orig/drivers/infiniband/ulp/iser/iser_memory.c +++ linux-2.6.33-rc4/drivers/infiniband/ulp/iser/iser_memory.c @@ -53,10 +53,10 @@ static int iser_start_rdma_unaligned_sg( unsigned long cmd_data_len = data->data_len; if (cmd_data_len > ISER_KMALLOC_THRESHOLD) - mem = (void *)__get_free_pages(GFP_NOIO, + mem = (void *)__get_free_pages(GFP_ATOMIC, ilog2(roundup_pow_of_two(cmd_data_len)) - PAGE_SHIFT); else - mem = kmalloc(cmd_data_len, GFP_NOIO); + mem = kmalloc(cmd_data_len, GFP_ATOMIC); if (mem == NULL) { iser_err("Failed to allocate mem size %d %d for copying sglist\n",