Re: Generic rx-recycling and emergency skb pool

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Eric Dumazet
Date: Friday, July 2, 2010 - 11:23 pm

Le vendredi 02 juillet 2010 à 21:20 +0200, Sebastian Andrzej Siewior a
écrit :

Sebastian

I read all patches, and my initial feeling is all this is very complex
and have many shortcomings.

Most modern NICS are multiqueue, so that each cpu can use a queue on its
own without slowing down other cpus.

Yet rx recycling has one queue per device, defeating part of the
multiqueue goal.

Patch 6/8 even touches dev->refcnt on each emerg packet
Patch 6/8 adds 8 bytes (emerg_dev) to skb. Oh well...

Adding cache layers, especially dumb ones like this one, is probably the
sign something more fundamental is broken somewhere.


I do believe for example that netdev_alloc_skb() should not try to use
the node affinity of the device, but use current cpu node for sk_buff at
least, and possibly for data part too.

One other problem of skb are the two memory blocs involved, and fact
that first one (skb) is already very big and fat, and filled/dirtied
many cycles before its use in RX path.

Maybe its time to provide new API, so that a driver can build an skb at
the time RX interrupt is handled, not at the time the rx ring buffer is
renewed. RX ring should only provide the data part to NIC, and skb
should be built when NIC delivers the frame, so that we provide to IP
stack a real hot skb.



--
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:
Generic rx-recycling and emergency skb pool, Sebastian Andrzej Si ..., (Fri Jul 2, 12:20 pm)
[PATCH 2/8] net/gianfar: use generic recycling infrasstructure, Sebastian Andrzej Si ..., (Fri Jul 2, 12:20 pm)
[PATCH 4/8] net/stmmac: use generic recycling infrastructure, Sebastian Andrzej Si ..., (Fri Jul 2, 12:20 pm)
[PATCH 5/8] net/ucc_geth: use generic recycling infrastructure, Sebastian Andrzej Si ..., (Fri Jul 2, 12:20 pm)
[PATCH 6/8] net: implement emergency pools, Sebastian Andrzej Si ..., (Fri Jul 2, 12:20 pm)
[PATCH 7/8] net/emergency_skb: create a deep copy on clone, Sebastian Andrzej Si ..., (Fri Jul 2, 12:20 pm)
[PATCH 8/8] net/emergency: remove locking from reycling po ..., Sebastian Andrzej Si ..., (Fri Jul 2, 12:20 pm)
Re: Generic rx-recycling and emergency skb pool, Eric Dumazet, (Fri Jul 2, 11:23 pm)
Re: Generic rx-recycling and emergency skb pool, David Miller, (Fri Jul 2, 11:46 pm)
Re: Generic rx-recycling and emergency skb pool, Eric Dumazet, (Sat Jul 3, 12:31 am)
Re: Generic rx-recycling and emergency skb pool, Sebastian Andrzej Si ..., (Thu Aug 26, 10:31 am)