[ovs-dev] [PATCH v3] dpif-netdev: fix race for queues between pmd threads

Ilya Maximets i.maximets at samsung.com
Tue Aug 4 12:26:59 UTC 2015


Will anyone plan to apply this patch?

Best regards, Ilya Maximets.

On 28.07.2015 23:48, Flavio Leitner wrote:
> On Tue, Jul 28, 2015 at 09:55:52AM +0300, Ilya Maximets wrote:
>> Currently pmd threads select queues in pmd_load_queues() according to
>> get_n_pmd_threads_on_numa(). This behavior leads to race between pmds,
>> beacause dp_netdev_set_pmds_on_numa() starts them one by one and
>> current number of threads changes incrementally.
>>
>> As a result we may have the following situation with 2 pmd threads:
>>
>> * dp_netdev_set_pmds_on_numa()
>> * pmd12 thread started. Currently only 1 pmd thread exists.
>> dpif_netdev(pmd12)|INFO|Core 1 processing port 'port_1'
>> dpif_netdev(pmd12)|INFO|Core 1 processing port 'port_2'
>> * pmd14 thread started. 2 pmd threads exists.
>> dpif_netdev|INFO|Created 2 pmd threads on numa node 0
>> dpif_netdev(pmd14)|INFO|Core 2 processing port 'port_2'
>>
>> We have:
>> core 1 --> port 1, port 2
>> core 2 --> port 2
>>
>> Fix this by starting pmd threads only after all of them have
>> been configured.
>>
>> Cc: Daniele Di Proietto <diproiettod at vmware.com>
>> Cc: Dyasly Sergey <s.dyasly at samsung.com>
>> Signed-off-by: Ilya Maximets <i.maximets at samsung.com>
>> ---
> 
> 
> Looks good to me.
> Acked-by: Flavio Leitner <fbl at sysclose.org>
> 
> 
> 



More information about the dev mailing list