netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Patrick McHardy <kaber@trash.net>
To: Russell Stuart <russell-tcatm@stuart.id.au>
Cc: hadi@cyberus.ca, Alan Cox <alan@lxorguk.ukuu.org.uk>,
	Stephen Hemminger <shemminger@osdl.org>,
	netdev@vger.kernel.org, Jesper Dangaard Brouer <hawk@diku.dk>
Subject: Re: [PATCH 0/2] NET: Accurate packet scheduling for ATM/ADSL
Date: Mon, 26 Jun 2006 13:10:39 +0200	[thread overview]
Message-ID: <449FC0AF.1050904@trash.net> (raw)
In-Reply-To: <1151282720.4210.46.camel@ras.pc.brisbane.lube>

Russell Stuart wrote:
> On Fri, 2006-06-23 at 17:21 +0200, Patrick McHardy wrote: 
> 
>>Not really. The randomization doesn't happen by default, but it doesn't
>>influence this anyway. SFQ allows flows to send up to "quantum" bytes
>>at a time before moving on to the next one. A flow that sends 75 * 20
>>byte will in the eyes of SFQ use 1500bytes, on the (ethernet) wire it
>>needs 4800bytes. A flow that sents 1500byte packets will only need
>>1504 bytes on the wire, but will be treated equally. So it does make
>>a different for SFQ.
> 
> 
> I hadn't even thought to check.  My bad.  The S in SFQ stands 
> for stochastic, so something that does without randomisation 
> the algorithm implemented couldn't really be called SFQ - 
> particularly as it weakens the algorithm considerably.  I 
> hope that most users do specify a perturb.

Its not as great as you think. Changing hash-functions on the
fly causes reordering for non-idle flows when bucket-lengths
aren't distributed even. I never use it.

> Your 20 byte example is hardly realistic.  skb->len includes 
> the 14 byte ethernet header, so there is a total of 6 data 
> bytes in a 20 byte packet.  The IP header alone is 20 bytes.  
> TCP as implemented on Linux adds another 32 bytes (20 + the 
> rtt option).  In other words I agree with Jamal's comments 
> elsewhere - optimising for MPU sized packets doesn't seem 
> like a win.

The point is that SFQ does care about packet sizes, and this is
true for both MPU-sized and other packets.

>>Its not about cleanup, its about providing the same capabilities
>>to all qdiscs instead of just a few selected ones and generalizing
>>it so it is also usable for non-ATM overhead calculations.
> 
> 
> Perhaps I chose my words poorly.
> 
> My intent was to contrast the size and goals of the two
> proposed patches.  The ATM patch is a 37 line patch.  It 
> includes some minor cleanups.  From the pseudo code you 
> have posted what you are proposing is a more ambitious and 
> much larger patch that moves a chunk of user space code 
> into the kernel.  I am a complete newbie when it comes to 
> getting code into the kernel, but that strikes me as 
> contentious.  I would rather not have the ATM patch 
> depend on it.
> 
> By the by, here are a couple of observations:
> 
> 1.  The entries in the current rtab are already very closely 
>     related to packet lengths.  They are actually the packet
>     length multiplied by a constant that converts the units
>     from "bytes" to "jiffies".  The constant is the same for
>     all entries in the table.
> 
> 2.  As such, the current rtab could already be used by SFQ
>     and any other qdisc that needs to know the packet length.
>     That SFQ doesn't do this is probably because it doesn't
>     effect its performance overly.

The rtab includes the transmission time, which is related to,
but still is something different than the length. You can't
calculate the transmission time without a rate, which is
not needed otherwise for SFQ for example. The way rtabs
are used also needs more space, my current size tables
only use as much space as needed, which is 16 entries for
ethernet instead of 256.

> 3.  Be that as it may, the current RTAB isn't in the most
>     convenient form for SFQ, and I am guessing it is in a 
>     very inconvenient form for HFSC.  Adding a new version 
>     that is identical except that it contains the raw packet 
>     length would be a simple change.  In that format it
>     could be used by all qdiscs.  The users of the existing
>     rtab would have to do the multiplication that converts
>     the packet length to jiffies in the kernel.  This means
>     the conceptually at least, should the gootput change
>     you need to change this one constant, not the entire
>     table.

Well, I don't care much whether we use rtabs or something new,
but rtabs are meant for something different and as such are not
optimally suited for this.

> 4.  Much as you seem to dislike having the rate / packet length
>     calculations in user space, having them there makes it easy 
>     to add new technologies such as ATM.  You just have to 
>     change a user space tool - not the kernel.

I don't dislike it for beeing in userspace, I dislike it for
a) beeing used for this since it only covers TBF-based qdiscs
b) beeing used for an ATM "special case" which is not special
   at all.

I should also note that my tables don't come out of the random
generator but are provided by userspace as well. Unless the
mechanism is unable to express the needs of a particular link
layer type all you have to do is to provide a different set
of values without touching any code at all.

> 5.  We still did have to modify the kernel for ATM.  That was
>     because of its rather unusual characteristics.  However,
>     it you look at the size of modifications made to the kernel
>     verses the size made to the user space tool, (37 lines
>     versus 303 lines,) the bulk of the work was does in user
>     space.

I'm sorry, but arguing that a limited special case solution is
better because it needs slightly less code is just not reasonable.


  reply	other threads:[~2006-06-26 11:11 UTC|newest]

Thread overview: 56+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-06-14  9:40 [PATCH 0/2] NET: Accurate packet scheduling for ATM/ADSL Jesper Dangaard Brouer
2006-06-14 12:06 ` jamal
2006-06-14 12:55   ` Jesper Dangaard Brouer
2006-06-15 12:57     ` jamal
2006-06-15 13:16     ` jamal
2006-06-20  1:04       ` Patrick McHardy
2006-06-20 14:59         ` jamal
2006-06-20 15:16           ` Patrick McHardy
2006-06-21 12:21             ` Krzysztof Matusik
2006-06-21 12:54               ` Patrick McHardy
2006-06-21 14:33                 ` Krzysztof Matusik
2006-06-14 15:32   ` Andy Furniss
2006-06-20  0:54   ` Patrick McHardy
2006-06-20 14:56     ` jamal
2006-06-20 15:09       ` Patrick McHardy
2006-06-22 18:41         ` jamal
2006-06-23 14:32           ` Patrick McHardy
2006-06-24 14:39             ` jamal
2006-06-26 11:21               ` Patrick McHardy
2006-06-27 13:01                 ` jamal
2006-07-02  4:23                   ` Patrick McHardy
2006-07-02 13:59                     ` jamal
     [not found]   ` <1150287983.3246.27.camel@ras.pc.brisbane.lube>
     [not found]     ` <1150292693.5197.1.camel@jzny2>
     [not found]       ` <1150843471.17455.2.camel@ras.pc.brisbane.lube>
     [not found]         ` <15653CE98281AD4FBD7F70BCEE3666E53CD54A@comxexch01.comx.local>
     [not found]           ` <1151000966.5392.34.camel@jzny2>
2006-06-23 12:37             ` Russell Stuart
2006-06-23 15:21               ` Patrick McHardy
2006-06-26  0:45                 ` Russell Stuart
2006-06-26 11:10                   ` Patrick McHardy [this message]
2006-06-27  6:19                     ` Russell Stuart
2006-06-27 17:18                       ` Patrick McHardy
2006-07-04 13:29                       ` Patrick McHardy
2006-07-04 19:29                         ` jamal
2006-07-04 23:53                           ` Patrick McHardy
2006-07-06  0:39                         ` Russell Stuart
2006-07-07  8:00                           ` Patrick McHardy
2006-07-10  8:44                             ` Russell Stuart
2006-06-24 14:13               ` jamal
2006-06-26  4:23                 ` Russell Stuart
2006-07-18  2:06                 ` Russell Stuart
2006-07-18 13:35                   ` jamal
2006-07-18 21:46                   ` Andy Furniss
2006-07-19  1:02                     ` Russell Stuart
2006-07-19 14:42                       ` Andy Furniss
2006-07-19 14:54                         ` Patrick McHardy
2006-07-19 20:26                         ` [PATCH 0/2] NET: Accurate packet scheduling for ATM/ADSL (RTAB BUG) Jesper Dangaard Brouer
2006-07-19 21:00                           ` Alexey Kuznetsov
2006-07-20  5:47                             ` Russell Stuart
2006-07-20 23:49                               ` Alexey Kuznetsov
2006-07-19 14:50                       ` [PATCH 0/2] NET: Accurate packet scheduling for ATM/ADSL Patrick McHardy
2006-07-20  4:56                         ` Russell Stuart
2006-07-30 23:06                           ` Russell Stuart
2006-08-08 22:01                             ` Russell Stuart
2006-08-09 11:33                               ` jamal
2006-09-04 10:37                                 ` Russell Stuart
2006-06-14 14:27 ` Phillip Susi
2006-06-14 15:08   ` Jesper Dangaard Brouer
2006-06-20  5:35 ` Chris Wedgwood
2006-06-20  7:33   ` Jesper Dangaard Brouer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=449FC0AF.1050904@trash.net \
    --to=kaber@trash.net \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=hadi@cyberus.ca \
    --cc=hawk@diku.dk \
    --cc=netdev@vger.kernel.org \
    --cc=russell-tcatm@stuart.id.au \
    --cc=shemminger@osdl.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).