[ofa-general] Re: [PATCH 3/10 REV5] [sched] Modify qdisc_run to support batching

Krishna Kumar2 krkumar2 at in.ibm.com
Sun Sep 16 20:49:36 PDT 2007


Hi Evgeniy,

Evgeniy Polyakov <johnpol at 2ka.mipt.ru> wrote on 09/14/2007 05:45:19 PM:

> > +      if (skb->next) {
> > +         int count = 0;
> > +
> > +         do {
> > +            struct sk_buff *nskb = skb->next;
> > +
> > +            skb->next = nskb->next;
> > +            __skb_queue_tail(dev->skb_blist, nskb);
> > +            count++;
> > +         } while (skb->next);
>
> Could it be list_move()-like function for skb lists?
> I'm pretty sure if you change first and the last skbs and ke of the
> queue in one shot, result will be the same.

I have to do a bit more like update count, etc, but I agree it is do-able.
I had mentioned in my PATCH 0/10 that I will later try this suggestion
that you provided last time.

> Actually how many skbs are usually batched in your load?

It depends, eg when the tx lock is not got, I get batching of upto 8-10
skbs (assuming that tx lock was not got quite a few times). But when the
queue gets blocked, I have seen batching upto 4K skbs (if tx_queue_len
is 4K).

> > +         /* Reset destructor for kfree_skb to work */
> > +         skb->destructor = DEV_GSO_CB(skb)->destructor;
> > +         kfree_skb(skb);
>
> Why do you free first skb in the chain?

This is the gso code which has segmented 'skb' to skb'1-n', and those
skb'1-n' are sent out and freed by driver, which means the dummy 'skb'
(without any data) remains to be freed.

Thanks,

- KK




More information about the general mailing list