Re: Multicast packet loss

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Peter Zijlstra
Date: Tuesday, March 17, 2009 - 3:11 am

On Mon, 2009-03-16 at 23:22 +0100, Eric Dumazet wrote:


I read the entire thread up to now, and I still don't really understand
the Changelog, sorry :(


How does that solve the wakeup issue?



Why the magic termination value? Can't we NULL terminate the list


Shouldn't we call it __softirq_delay_queue() if the caller needs to
disabled preemption?

Futhermore, don't we always require the caller to take care of lifetime
issues when we queue something?


Why can't we write:

  struct softirq_delay *sdel, *next;

  sdel = __get_cpu_var(softirq_delay_head);
  __get_cpu_var(softirq_delay_head) = NULL;

  while (sdel) {
    next = sdel->next;
    sdel->func(sdel);
    sdel = next;
  }

Why does it matter what happens to sdel->next? we've done the callback.

Aah, the crux is in the re-use policy.. that most certainly does deserve
a comment.

How about we make sdel->next point to itself in the init case?

Then we can write:

  while (sdel) {
    next = sdel->next;
    sdel->next = sdel;
    sdel->func(sdel);
    sdel = next;
  }

and have the enqueue bit look like:

int __softirq_delay_queue(struct softirq_delay *sdel)
{
  struct softirq_delay **head;

  if (sdel->next != sdel)
    return 0;

  head = &__get_cpu_var(softirq_delay_head);
  sdel->next = *head;
  *head = sdel;
  return 1;
}
     

Where's the matching barrier?


OK, so the idea is to handle a bunch of packets and instead of waking N
threads for each packet, only wake them once at the end of the batch?

Sounds like a sensible idea.. 

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: Multicast packet loss, Wes Chow, (Mon Feb 2, 12:51 pm)
Re: Multicast packet loss, Eric Dumazet, (Mon Feb 2, 1:29 pm)
Re: Multicast packet loss, Wes Chow, (Mon Feb 2, 2:09 pm)
Re: Multicast packet loss, Eric Dumazet, (Mon Feb 2, 2:31 pm)
Re: Multicast packet loss, Kenny Chang, (Tue Feb 3, 10:34 am)
Re: Multicast packet loss, Neil Horman, (Tue Feb 3, 6:21 pm)
Re: Multicast packet loss, Kenny Chang, (Thu Feb 26, 10:15 am)
Re: Multicast packet loss, Eric Dumazet, (Sat Feb 28, 1:51 am)
Re: Multicast packet loss, Eric Dumazet, (Sun Mar 1, 10:03 am)
Re: Multicast packet loss, David Miller, (Wed Mar 4, 1:16 am)
Re: Multicast packet loss, Eric Dumazet, (Wed Mar 4, 1:36 am)
Re: Multicast packet loss, Eric Dumazet, (Sat Mar 7, 12:46 am)
Re: Multicast packet loss, Eric Dumazet, (Sun Mar 8, 9:46 am)
Re: Multicast packet loss, David Miller, (Sun Mar 8, 7:49 pm)
Re: Multicast packet loss, Eric Dumazet, (Sun Mar 8, 11:36 pm)
Re: Multicast packet loss, Brian Bloniarz, (Mon Mar 9, 3:56 pm)
Re: Multicast packet loss, Eric Dumazet, (Mon Mar 9, 10:28 pm)
Re: Multicast packet loss, Brian Bloniarz, (Tue Mar 10, 4:22 pm)
Re: Multicast packet loss, Eric Dumazet, (Tue Mar 10, 8:00 pm)
Re: Multicast packet loss, Brian Bloniarz, (Thu Mar 12, 8:47 am)
Re: Multicast packet loss, Eric Dumazet, (Thu Mar 12, 9:34 am)
Re: Multicast packet loss, David Miller, (Fri Mar 13, 2:51 pm)
Re: Multicast packet loss, Eric Dumazet, (Fri Mar 13, 3:30 pm)
Re: Multicast packet loss, David Miller, (Fri Mar 13, 3:38 pm)
Re: Multicast packet loss, Eric Dumazet, (Fri Mar 13, 3:45 pm)
[PATCH] net: reorder fields of struct socket, Eric Dumazet, (Sat Mar 14, 2:03 am)
Re: [PATCH] net: reorder fields of struct socket, David Miller, (Sun Mar 15, 7:59 pm)
Re: Multicast packet loss, Eric Dumazet, (Mon Mar 16, 3:22 pm)
Re: Multicast packet loss, Peter Zijlstra, (Tue Mar 17, 3:11 am)
Re: Multicast packet loss, Eric Dumazet, (Tue Mar 17, 4:08 am)
Re: Multicast packet loss, Peter Zijlstra, (Tue Mar 17, 4:57 am)
Re: Multicast packet loss, Brian Bloniarz, (Tue Mar 17, 8:00 am)
Re: Multicast packet loss, Eric Dumazet, (Tue Mar 17, 8:16 am)
Re: Multicast packet loss, David Stevens, (Tue Mar 17, 12:39 pm)
Re: Multicast packet loss, Eric Dumazet, (Tue Mar 17, 2:19 pm)
Re: Multicast packet loss, Brian Bloniarz, (Fri Apr 3, 12:28 pm)
Re: Multicast packet loss, Eric Dumazet, (Sun Apr 5, 6:49 am)
Re: Multicast packet loss, Brian Bloniarz, (Mon Apr 6, 2:53 pm)
Re: Multicast packet loss, Brian Bloniarz, (Mon Apr 6, 3:12 pm)
Re: Multicast packet loss, Brian Bloniarz, (Tue Apr 7, 1:08 pm)
Re: Multicast packet loss, Eric Dumazet, (Wed Apr 8, 1:12 am)