Thread (16 messages) 16 messages, 2 authors, 2006-11-15

Re: [PATCH 1/8] netpoll: skb private pool management

From: David Miller <davem@davemloft.net>
Date: 2006-10-27 00:12:58

From: Stephen Hemminger <redacted>
Date: Thu, 26 Oct 2006 15:46:49 -0700
quoted hunk ↗ jump to hunk
@@ -188,19 +186,14 @@ void netpoll_poll(struct netpoll *np)
 static void refill_skbs(void)
 {
 	struct sk_buff *skb;
-	unsigned long flags;
 
-	spin_lock_irqsave(&skb_list_lock, flags);
-	while (nr_skbs < MAX_SKBS) {
+	while (skb_queue_len(&skb_pool) < MAX_SKBS) {
Previously, the lock actually protected nr_skbs from going over
MAX_SKBS properly, but the new code does not.  skb_queue_len()
is lockless.

Stephen, I really appreciate your efforts to clean up netpoll,
but on every iteration I am finding simple errors on the first
patch every time.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help