Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755711AbYG1O4e (ORCPT ); Mon, 28 Jul 2008 10:56:34 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1756557AbYG1Ox3 (ORCPT ); Mon, 28 Jul 2008 10:53:29 -0400 Received: from styx.suse.cz ([82.119.242.94]:42504 "EHLO mail.suse.cz" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1756548AbYG1Ox2 (ORCPT ); Mon, 28 Jul 2008 10:53:28 -0400 From: David Sterba Subject: [PATCH 11/12] ipwireless: Put packets to pool start To: torvalds@linux-foundation.org Cc: akpm@linux-foundation.org, linux-kernel@vger.kernel.org, jkosina@suse.cz, dsterba@suse.cz Date: Mon, 28 Jul 2008 16:53:27 +0200 Message-ID: <20080728145326.13378.6245.stgit@ds.suse.cz> In-Reply-To: <20080728145124.13378.39300.stgit@ds.suse.cz> References: <20080728145124.13378.39300.stgit@ds.suse.cz> User-Agent: StGIT/0.14.3.173.g2e37 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1418 Lines: 41 ipwireless: Put packets to pool start Put packets to pool start, try to reuse cached memory. Signed-off-by: David Sterba Signed-off-by: Jiri Kosina --- drivers/char/pcmcia/ipwireless/hardware.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/char/pcmcia/ipwireless/hardware.c b/drivers/char/pcmcia/ipwireless/hardware.c index 814ea32..d1e69de 100644 --- a/drivers/char/pcmcia/ipwireless/hardware.c +++ b/drivers/char/pcmcia/ipwireless/hardware.c @@ -563,9 +563,9 @@ static struct ipw_rx_packet *pool_allocate(struct ipw_hardware *hw, if (!list_empty(&hw->rx_pool)) { packet = list_first_entry(&hw->rx_pool, struct ipw_rx_packet, queue); - list_del(&packet->queue); hw->rx_pool_size--; spin_unlock_irqrestore(&hw->lock, flags); + list_del(&packet->queue); } else { static int min_capacity = 256; int new_capacity; @@ -610,7 +610,7 @@ static void pool_free(struct ipw_hardware *hw, struct ipw_rx_packet *packet) kfree(packet); else { hw->rx_pool_size++; - list_add_tail(&packet->queue, &hw->rx_pool); + list_add(&packet->queue, &hw->rx_pool); } } -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/