netdev
[Top] [All Lists]

Re: netif_rx packet dumping

To: "David S. Miller" <davem@xxxxxxxxxxxxx>
Subject: Re: netif_rx packet dumping
From: Andi Kleen <ak@xxxxxx>
Date: 8 Mar 2005 19:18:44 +0100
Date: Tue, 8 Mar 2005 19:18:44 +0100
Cc: baruch@xxxxxxxxx, shemminger@xxxxxxxx, netdev@xxxxxxxxxxx
In-reply-to: <20050308100902.24b67b2f.davem@xxxxxxxxxxxxx>
References: <20050303123811.4d934249@xxxxxxxxxxxxxxxxx> <42278122.6000000@xxxxxxxxx> <20050303133659.0d224e61.davem@xxxxxxxxxxxxx> <42278554.2090902@xxxxxxxxx> <20050303135718.2e1a0170.davem@xxxxxxxxxxxxx> <422DC7CE.2040800@xxxxxxxxx> <m1y8cykr7i.fsf@xxxxxx> <20050308100902.24b67b2f.davem@xxxxxxxxxxxxx>
Sender: netdev-bounce@xxxxxxxxxxx
User-agent: Mutt/1.4.1i
> > You could also use a xor list in theory. But I'm not sure it's worth it.
> > Increasing cb by 4 bytes shouldn't be a very big issue.
> 
> Going from "40" to "44" takes 64-bit platforms onto another cache line
> for struct sk_buff, as I stated in another email.
> 
> And every time I let this happen, I get an email from David Mosberger because
> it shows up in performance tests on ia64. :-)

Ok, then use a XOR list or trim some other field.

There are some other savings possible e.g. from a quick look:
- skb->list is afaik totally unnecessary and probably even unused.
- struct timeval could be an optimized structure using 32bit
for the sub second part. 
(would need moving it somewhere else, otherwise alignment doesn't help)
- Are really three device pointers needed? Perhaps things can
be a bit optimized here.
- Hippi could be finally changed to use skb->cb instead of its
private field.
- is skb->security still needed? It should be obsolete with ->sec_path, no?
Would only help together with the timestamp optimization.

Of course these all wouldn't change the number of cache lines significantly,
but it would possible allow other optimizations that need new fields.

-Andi

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