ipwireless: Put packets to pool start
ipwireless: Put packets to pool start Put packets to pool start, try to reuse cached memory. Signed-off-by: David Sterba <dsterba@suse.cz> Signed-off-by: Jiri Kosina <jkosina@suse.cz> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
committed by
Linus Torvalds
parent
bee9c7c077
commit
0f38c47a54
@@ -563,9 +563,9 @@ static struct ipw_rx_packet *pool_allocate(struct ipw_hardware *hw,
|
|||||||
if (!list_empty(&hw->rx_pool)) {
|
if (!list_empty(&hw->rx_pool)) {
|
||||||
packet = list_first_entry(&hw->rx_pool,
|
packet = list_first_entry(&hw->rx_pool,
|
||||||
struct ipw_rx_packet, queue);
|
struct ipw_rx_packet, queue);
|
||||||
list_del(&packet->queue);
|
|
||||||
hw->rx_pool_size--;
|
hw->rx_pool_size--;
|
||||||
spin_unlock_irqrestore(&hw->lock, flags);
|
spin_unlock_irqrestore(&hw->lock, flags);
|
||||||
|
list_del(&packet->queue);
|
||||||
} else {
|
} else {
|
||||||
static int min_capacity = 256;
|
static int min_capacity = 256;
|
||||||
int new_capacity;
|
int new_capacity;
|
||||||
@@ -610,7 +610,7 @@ static void pool_free(struct ipw_hardware *hw, struct ipw_rx_packet *packet)
|
|||||||
kfree(packet);
|
kfree(packet);
|
||||||
else {
|
else {
|
||||||
hw->rx_pool_size++;
|
hw->rx_pool_size++;
|
||||||
list_add_tail(&packet->queue, &hw->rx_pool);
|
list_add(&packet->queue, &hw->rx_pool);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user