--- Comment #3 from Bill Fischofer <> ---
Here's an example of what we're dealing with.

If you look at the delta in the path for odp_packet_alloc() you see that it
consists of exactly three additional odp_packet_hdr_t field assignments. The
rest of the code is identical before and after this patch set.

In init_segments() the pkt_hdr->ref_count field is set to 1. This is done via
direct assignment rather than an atomic op since at alloc time there can be no
other references to the packet. 

Then in packet_init() there are two additional assignments:

pkt_hdr->unshared_len = len;
pkt_hdr->ref_hdr = NULL;

So that's a total of three additional assignments for single-segment packet
allocs. For multi-segment allocs the init_segment() routine would set the
ref_count to 1 in each of the additional segments, so again a trivial delta.

The total pathlength for packet allocation is well over 100 instructions, and
yet the microbenchmark is reporting a ~40% degradation introduced by these
three additional assignments. I don't see how such a measurement is possible.
Any theories to explain this?

You are receiving this mail because:
You are on the CC list for the bug.

Reply via email to