netdev
[Top] [All Lists]

Re: [PATCH/RFC] (long) network interface changes

To: hadi@xxxxxxxxxx
Subject: Re: [PATCH/RFC] (long) network interface changes
From: "David S. Miller" <davem@xxxxxxxxxx>
Date: Mon, 18 Sep 2000 18:49:42 -0700
Cc: kuznet@xxxxxxxxxxxxx, Robert.Olsson@xxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx, netdev@xxxxxxxxxxx, becker@xxxxxxxxx, eis@xxxxxxxxxxxxx
In-reply-to: <Pine.GSO.4.20.0009182121310.3641-200000@xxxxxxxxxxxxxxxx> (message from jamal on Mon, 18 Sep 2000 21:31:17 -0400 (EDT))
References: <Pine.GSO.4.20.0009182121310.3641-200000@xxxxxxxxxxxxxxxx>
Sender: owner-netdev@xxxxxxxxxxx
   Date: Mon, 18 Sep 2000 21:31:17 -0400 (EDT)
   From: jamal <hadi@xxxxxxxxxx>

   My testing with the included scheme (#ifdef RAND_LIE) indicates
   that fairness infact goes up; however, the overall throughput when
   only one interface is utilizing the system goes down under heavy to
   moderate congestion.  I am including it here as a way to highlight
   the problem. I think there could be better ways to do this.  Code
   is included and can be turned on by defining RAND_LIE in dev.c

Why not keep a counter per-device.

This counter is an atomic_t and initially zero.

When a packet is given to netif_rx and becomes part of the backlog
this counter is incremented.

When a packet leaves the backlog, this same counter is decremented.

You can use this counter to approximate queue percentages per-device
and use this to decide who gets the little white lies.

Questions are whether this will be cheaper than calling net_random()
occaisionally and actually more interesting would be a scheme which
did not hurt the single interface case. :-(

Later,
David S. Miller
davem@xxxxxxxxxx

<Prev in Thread] Current Thread [Next in Thread>