MQ Patch.

Andre Oppermann andre at freebsd.org
Wed Oct 30 11:51:10 UTC 2013


On 30.10.2013 07:41, John-Mark Gurney wrote:
> Andre Oppermann wrote this message on Tue, Oct 29, 2013 at 22:25 +0100:
>> b) the driver assigns the DMA rings to particular cores which by that,
>> through
>>     a critnest++ can drive them lockless.  The drivers (*if_transmit) will
>>     look
>>     up the core it got called on and push the traffic out on that DMA ring.
>>     The problem is the actual upper stacks affinity which is not guaranteed.
>>     This has to consequences: there may be reordering of packets of the same
>>     flow because the protocols send function happens to be called from a
>>     different core the second time.  Or the drivers (*if_transmit) has to
>>     switch to the right core to complete the transmit for this flow if the
>>     upper stack migrated/bounced around.  It is rather difficult to assure
>>     full affinity from userspace down through the upper stack and then to
>>     the driver.
>
> I'll point you to the paper:
> http://arxiv.org/abs/1106.0443
>
> Please don't reorder packets.
>
> Binding TX queues to cores seems not very useful, sure you can do a
> lockless implementation, but is running the scheduler to change cpu's
> really cheaper than paying the cost of migrating the lock?
>
> I'll admit I haven't run benchmarks, but I doubt it.

Don't worry.  My list was about the possible ways of dealing with it
and their constrains/disadvantage.  Packet reordering is one part of it
that pretty much makes approach b) non-viable as you correctly point out.

-- 
Andre



More information about the freebsd-net mailing list