Skip to contentSkip to conversation

xen-netback: minor cleanups

PATCH In review David Vrabel 3 participants 11 messages Oct 28, 2014 – Oct 29, 2014

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

cover xen-netback: minor cleanups

Two minor xen-netback cleanups originally from Zoltan.

David

#5 lore raw

PATCH 2/2 xen-netback: Remove __GFP_COLD

From: Zoltan Kiss <[email protected]>

This flag is unnecessary, it came from some old code.

---
 drivers/net/xen-netback/netback.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/xen-netback/netback.c +1 -1
index 25f4c06..730252c 100644
@@ -1550,7 +1550,7 @@ static int xenvif_handle_frag_list(struct xenvif_queue *queue, struct sk_buff *s
 		unsigned int len;
 
 		BUG_ON(i >= MAX_SKB_FRAGS);
-		page = alloc_page(GFP_ATOMIC|__GFP_COLD);
+		page = alloc_page(GFP_ATOMIC);
 		if (!page) {
 			int j;
 			skb->truesize += skb->data_len;
Signature · 1 line
1.7.10.4
#1 lore raw

PATCH 1/2 xen-netback: Disable NAPI after disabling interrupts

In reply to David Vrabel

From: Zoltan Kiss <[email protected]>

Otherwise the interrupt handler still calls napi_complete. Although it won't schedule NAPI again as either NAPI_STATE_DISABLE or NAPI_STATE_SCHED is set, it is just unnecessary, and it makes more sense to do this way.

---
 drivers/net/xen-netback/interface.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/xen-netback/interface.c +1 -1
index 895fe84..a6a32d3 100644
@@ -235,10 +235,10 @@ static void xenvif_down(struct xenvif *vif)
 
 	for (queue_index = 0; queue_index < num_queues; ++queue_index) {
 		queue = &vif->queues[queue_index];
-		napi_disable(&queue->napi);
 		disable_irq(queue->tx_irq);
 		if (queue->tx_irq != queue->rx_irq)
 			disable_irq(queue->rx_irq);
+		napi_disable(&queue->napi);
 		del_timer_sync(&queue->credit_timeout);
 	}
 }
Signature · 1 line
1.7.10.4
#8 lore raw

PATCH 2/2 xen-netback: Remove __GFP_COLD

In reply to David Vrabel

From: Zoltan Kiss <[email protected]>

This flag is unnecessary, it came from some old code.

---
 drivers/net/xen-netback/netback.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/xen-netback/netback.c +1 -1
index 25f4c06..730252c 100644
@@ -1550,7 +1550,7 @@ static int xenvif_handle_frag_list(struct xenvif_queue *queue, struct sk_buff *s
 		unsigned int len;
 
 		BUG_ON(i >= MAX_SKB_FRAGS);
-		page = alloc_page(GFP_ATOMIC|__GFP_COLD);
+		page = alloc_page(GFP_ATOMIC);
 		if (!page) {
 			int j;
 			skb->truesize += skb->data_len;
Signature · 1 line
1.7.10.4
#4 lore raw

PATCH 1/2 xen-netback: Disable NAPI after disabling interrupts

In reply to David Vrabel

From: Zoltan Kiss <[email protected]>

Otherwise the interrupt handler still calls napi_complete. Although it won't schedule NAPI again as either NAPI_STATE_DISABLE or NAPI_STATE_SCHED is set, it is just unnecessary, and it makes more sense to do this way.

---
 drivers/net/xen-netback/interface.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/xen-netback/interface.c +1 -1
index 895fe84..a6a32d3 100644
@@ -235,10 +235,10 @@ static void xenvif_down(struct xenvif *vif)
 
 	for (queue_index = 0; queue_index < num_queues; ++queue_index) {
 		queue = &vif->queues[queue_index];
-		napi_disable(&queue->napi);
 		disable_irq(queue->tx_irq);
 		if (queue->tx_irq != queue->rx_irq)
 			disable_irq(queue->rx_irq);
+		napi_disable(&queue->napi);
 		del_timer_sync(&queue->credit_timeout);
 	}
 }
Signature · 1 line
1.7.10.4
Acked-by on v1 1/2
#2 lore raw

Re: [PATCH 1/2] xen-netback: Disable NAPI after disabling interrupts

In reply to David Vrabel
Quoted 9 lines · David Vrabel

From: Zoltan Kiss <[email protected]>

Otherwise the interrupt handler still calls napi_complete. Although it won't schedule NAPI again as either NAPI_STATE_DISABLE or NAPI_STATE_SCHED is set, it is just unnecessary, and it makes more sense to do this way.

Quoted 22 lines
---
 drivers/net/xen-netback/interface.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/xen-netback/interface.c +1 -1
index 895fe84..a6a32d3 100644
@@ -235,10 +235,10 @@ static void xenvif_down(struct xenvif *vif)
 
 	for (queue_index = 0; queue_index < num_queues; ++queue_index) {
 		queue = &vif->queues[queue_index];
-		napi_disable(&queue->napi);
 		disable_irq(queue->tx_irq);
 		if (queue->tx_irq != queue->rx_irq)
 			disable_irq(queue->rx_irq);
+		napi_disable(&queue->napi);
 		del_timer_sync(&queue->credit_timeout);
 	}
 }
Signature · 1 line
1.7.10.4
Acked-by on v1 1/2
#3 lore raw

Re: [PATCH 1/2] xen-netback: Disable NAPI after disabling interrupts

In reply to David Vrabel
Quoted 9 lines · David Vrabel

From: Zoltan Kiss <[email protected]>

Otherwise the interrupt handler still calls napi_complete. Although it won't schedule NAPI again as either NAPI_STATE_DISABLE or NAPI_STATE_SCHED is set, it is just unnecessary, and it makes more sense to do this way.

Quoted 22 lines
---
 drivers/net/xen-netback/interface.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/xen-netback/interface.c +1 -1
index 895fe84..a6a32d3 100644
@@ -235,10 +235,10 @@ static void xenvif_down(struct xenvif *vif)
 
 	for (queue_index = 0; queue_index < num_queues; ++queue_index) {
 		queue = &vif->queues[queue_index];
-		napi_disable(&queue->napi);
 		disable_irq(queue->tx_irq);
 		if (queue->tx_irq != queue->rx_irq)
 			disable_irq(queue->rx_irq);
+		napi_disable(&queue->napi);
 		del_timer_sync(&queue->credit_timeout);
 	}
 }
Signature · 1 line
1.7.10.4
Acked-by on v1 2/2
#6 lore raw

Re: [PATCH 2/2] xen-netback: Remove __GFP_COLD

In reply to David Vrabel
Quoted 7 lines · David Vrabel

From: Zoltan Kiss <[email protected]>

This flag is unnecessary, it came from some old code.

Quoted 19 lines
---
 drivers/net/xen-netback/netback.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/xen-netback/netback.c +1 -1
index 25f4c06..730252c 100644
@@ -1550,7 +1550,7 @@ static int xenvif_handle_frag_list(struct xenvif_queue *queue, struct sk_buff *s
 		unsigned int len;
 
 		BUG_ON(i >= MAX_SKB_FRAGS);
-		page = alloc_page(GFP_ATOMIC|__GFP_COLD);
+		page = alloc_page(GFP_ATOMIC);
 		if (!page) {
 			int j;
 			skb->truesize += skb->data_len;
Signature · 1 line
1.7.10.4
Acked-by on v1 2/2
#7 lore raw

Re: [PATCH 2/2] xen-netback: Remove __GFP_COLD

In reply to David Vrabel
Quoted 7 lines · David Vrabel

From: Zoltan Kiss <[email protected]>

This flag is unnecessary, it came from some old code.

Quoted 19 lines
---
 drivers/net/xen-netback/netback.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/xen-netback/netback.c +1 -1
index 25f4c06..730252c 100644
@@ -1550,7 +1550,7 @@ static int xenvif_handle_frag_list(struct xenvif_queue *queue, struct sk_buff *s
 		unsigned int len;
 
 		BUG_ON(i >= MAX_SKB_FRAGS);
-		page = alloc_page(GFP_ATOMIC|__GFP_COLD);
+		page = alloc_page(GFP_ATOMIC);
 		if (!page) {
 			int j;
 			skb->truesize += skb->data_len;
Signature · 1 line
1.7.10.4