> My untrained eye tells me that in the 'after patch' case (the worse > one), there are less branch misses, and less cache misses. So by all > perf metrics, the throughput should be better, but it isn't. What gives?
Maybe the frame has been pushed out of the L1 cache. The classify code is pulling it back in. It suffers some cache misses to get what it needs, but also in the background some speculative cache loads also happen, which are 'free'. By the time the DSA tagger is called, which also needs the header in the frame, it is all in L1 and the taggers work is fast. Without the classify, the tagger is getting a cold cache. And it ends up waiting around longer since it cannot benefit from the speculative 'free' loads? In your little patch, rather than a plain return, try calling prefetch() on the skb data so it might be warm by the time the tagger needs to manipulate it. Andrew