From patchwork Mon Feb 8 13:20:43 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Or Gerlitz X-Patchwork-Id: 77732 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 o18DFKgq002709 for ; Mon, 8 Feb 2010 13:20:35 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751640Ab0BHNUf (ORCPT ); Mon, 8 Feb 2010 08:20:35 -0500 Received: from fwil.voltaire.com ([193.47.165.2]:35716 "EHLO exil.voltaire.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751639Ab0BHNUe (ORCPT ); Mon, 8 Feb 2010 08:20:34 -0500 Received: from zuben.voltaire.com ([172.25.5.15]) by exil.voltaire.com with Microsoft SMTPSVC(6.0.3790.3959); Mon, 8 Feb 2010 15:20:28 +0200 Date: Mon, 8 Feb 2010 15:20:43 +0200 (IST) From: Or Gerlitz To: Roland Dreier cc: linux-rdma , Mike Christie Subject: [PATCH V2 06/9] ib/iser: use atomic allocations In-Reply-To: Message-ID: References: MIME-Version: 1.0 X-OriginalArrivalTime: 08 Feb 2010 13:20:28.0711 (UTC) FILETIME=[7B783370:01CAA8C1] 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]); Mon, 08 Feb 2010 13:20:35 +0000 (UTC) Index: linux-2.6.33-rc7/drivers/infiniband/ulp/iser/iser_initiator.c =================================================================== --- linux-2.6.33-rc7.orig/drivers/infiniband/ulp/iser/iser_initiator.c +++ linux-2.6.33-rc7/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-rc7/drivers/infiniband/ulp/iser/iser_memory.c =================================================================== --- linux-2.6.33-rc7.orig/drivers/infiniband/ulp/iser/iser_memory.c +++ linux-2.6.33-rc7/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",