public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Eric Dumazet <eric.dumazet@gmail.com>
To: Patrick McHardy <kaber@trash.net>
Cc: David Miller <davem@davemloft.net>,
	Juliusz Chroboczek <Juliusz.Chroboczek@pps.jussieu.fr>,
	"John W. Linville" <linville@tuxdriver.com>,
	Stephen Hemminger <shemminger@vyatta.com>,
	netdev <netdev@vger.kernel.org>, Andi Kleen <andi@firstfloor.org>
Subject: Re: [PATCH net-next-2.6 v3] net_sched: SFB flow scheduler
Date: Wed, 23 Feb 2011 18:16:08 +0100	[thread overview]
Message-ID: <1298481368.3301.390.camel@edumazet-laptop> (raw)
In-Reply-To: <4D653C9C.8010205@trash.net>

Le mercredi 23 février 2011 à 17:58 +0100, Patrick McHardy a écrit :
> Am 23.02.2011 17:48, schrieb Eric Dumazet:
> > Le mercredi 23 février 2011 à 17:24 +0100, Patrick McHardy a écrit :
> > 
> >> This needs to be a per-skb property, otherwise you could have the
> >> situation:
> >>
> >> - enqueue skb, double_buffering=0, increment buffer 0
> >> - enable double buffering
> >> - swap buffers
> >> - dequeue same skb, decrement buffer 1
> >>
> >> after which the qlen values of buffer 1 will be incorrect.
> >>
> > 
> > Normally its OK, because we bzero() the zone, and the "decrement" is
> > 0-bounded.
> 
> Yeah, but we might decrement buckets of different flows which
> are non-zero. Probably not too bad, but still not correct.
> 
> > I had this idea (of storing two bits per skb), but :
> > 
> > - It means that swap_buffer() should not touch (bzero) the 'old' bins
> 
> Yes, it means we have to properly decrement the old buffer
> until all bins reached zero.
> 
> > - Since hash perturbator is changed, we have to store the two hash
> > values per skb (instead of one u32 / classid).
> 
> Indeed.

BTQ, I had this idea of storing the double_buffer per skb reading SFB
paper, because paper says the double buffering is really needed only for
unelastic flows, not for all packets.

paper quote :

As one set of bins is being used
for queue management, a second set of bins using the next set of hash
functions can be warmed up. In this
case, any time a flow is classified as non-responsive, it is hashed
using the second set of hash functions and
the marking probabilities of the corresponding bins in the warmup set
are updated.

So using two 'hash' values per skb is the way to go, with special 0
value meanings : skb was not 'inserted' into virtual queues.




  reply	other threads:[~2011-02-23 17:16 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20110221160306.GA9650@tuxdriver.com>
     [not found] ` <1298308283.2849.5.camel@edumazet-laptop>
     [not found]   ` <1298390536.2861.9.camel@edumazet-laptop>
2011-02-23 15:14     ` [PATCH net-next-2.6 v3] net_sched: SFB flow scheduler Eric Dumazet
2011-02-23 15:43       ` Stephen Hemminger
2011-02-23 16:13         ` Eric Dumazet
2011-02-23 16:20           ` Patrick McHardy
2011-02-23 16:24       ` Patrick McHardy
2011-02-23 16:48         ` Eric Dumazet
2011-02-23 16:58           ` Patrick McHardy
2011-02-23 17:16             ` Eric Dumazet [this message]
2011-02-23 17:05         ` [PATCH] net_sched: long word align struct qdisc_skb_cb data Eric Dumazet
2011-02-23 17:30           ` Stephen Hemminger
2011-02-23 22:17             ` David Miller
2011-02-23 20:56       ` [PATCH net-next-2.6 v4] net_sched: SFB flow scheduler Eric Dumazet
2011-02-23 21:11         ` Stephen Hemminger
2011-02-23 21:28           ` Eric Dumazet
2011-02-23 21:30             ` David Miller
2011-02-23 22:06         ` David Miller
2011-02-24  5:40           ` Eric Dumazet
2011-02-24  6:51             ` Stephen Hemminger
2011-02-24  7:14               ` Eric Dumazet
2011-02-24  7:18                 ` Eric Dumazet
2011-03-24 17:44               ` [PATCH iproute2] tc : " Eric Dumazet
2011-03-24 21:59                 ` Stephen Hemminger

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=1298481368.3301.390.camel@edumazet-laptop \
    --to=eric.dumazet@gmail.com \
    --cc=Juliusz.Chroboczek@pps.jussieu.fr \
    --cc=andi@firstfloor.org \
    --cc=davem@davemloft.net \
    --cc=kaber@trash.net \
    --cc=linville@tuxdriver.com \
    --cc=netdev@vger.kernel.org \
    --cc=shemminger@vyatta.com \
    /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