Harald Barth wrote:

> I'd like to hear more about the changes to rx that were made between
> 82 and 84, what was the intended outcome?

Analysis of RX on multi-processor and hyper-threaded systems showed
that having a single global queue to store free packet buffers was a
significant bottleneck.   Every thread involved in sending or receiving
an RX packet had to obtain exclusive access to the queue when obtaining
or discarding packets.   If instead of a single queue of free packets
we used a separate queue per thread, this bottleneck would be removed.

The logic is somewhat complicated by the fact that we need to ensure
that one thread does not end up with all of the free packet buffers
in its queue.   Therefore, there are bounds placed to ensure that if
one thread ends up with too many packets it will redistribute them back
to the global queue.

When a thread needs a packet buffer, it looks first in the thread local
queue; if that is empty it looks in the global queue; if that is empty
it allocates a new one.

Similar changes were made to the statistics gathering data structures.
Instead of updating a global table each time a value changes, there
are thread local tables and periodically these tables are merged into
the global table.

All of these changes combined significantly reduced the number of
global locks obtained by a thread while in the RX library.

Jeffrey Altman

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

Reply via email to