[ovs-dev] [PATCH 5/5] dpif-netdev: Allow pin rxq and non-isolate PMD.

Kevin Traynor ktraynor at redhat.com
Thu Jul 1 23:23:51 UTC 2021


On 24/06/2021 16:24, David Marchand wrote:
> On Fri, Jun 4, 2021 at 11:19 PM Kevin Traynor <ktraynor at redhat.com> wrote:
>>
>> Pinning an rxq to a PMD with pmd-rxq-affinity may be done for
>> various reasons such as reserving a full PMD for an rxq, or to
>> ensure that multiple rxqs from a port are handled on different PMDs.
>>
>> Previously pmd-rxq-affinity always isolated the PMD so no other rxqs
>> could be assigned to it by OVS. There may be cases where there is
>> unused cycles on those pmds and the user would like other rxqs to
>> also be able to be assigned to it be OVS.
>>
>> Add an option to pin the rxq and non-isolate. The default behaviour is
>> unchanged, which is pin and isolate.
>>
>> In order to pin and non-isolate:
>> ovs-vsctl set Open_vSwitch . other_config:pmd-rxq-isolate=false
>>
>> Note this is available only with group assignment type.
> 
> I am actually wondering what impact it would have on having this
> config considered in other algorithms.
> Is there an issue?
> 

Yes, the main issue is that the other algorithms are based on a pmd
order on the assumption that they start from empty. For 'roundrobin' it
is to equally distribute num of rxqs on pmd RR - if we pin several rxqs
on one pmds, it is not clear what to do etc. Even worse for 'cycles' it
is based on placing rxqs in order of busy cycles on the pmds RR. If we
pin an rxq initially we are conflicting against how the algorithm operates.

Because 'group' algorithm is not tied to a defined pmd order, it is
better suited to be able to place a pinned rxq initially and be able to
consider that pmd on it's merits along with the others later.

> 
>>
>> Signed-off-by: Kevin Traynor <ktraynor at redhat.com>
>> ---
>>  Documentation/topics/dpdk/pmd.rst |  9 ++++++--
>>  lib/dpif-netdev.c                 | 37 +++++++++++++++++++++++++------
>>  vswitchd/vswitch.xml              | 19 ++++++++++++++++
>>  3 files changed, 56 insertions(+), 9 deletions(-)
>>
>> diff --git a/Documentation/topics/dpdk/pmd.rst b/Documentation/topics/dpdk/pmd.rst
>> index 29ba53954..a24a59430 100644
>> --- a/Documentation/topics/dpdk/pmd.rst
>> +++ b/Documentation/topics/dpdk/pmd.rst
>> @@ -102,6 +102,11 @@ like so:
>>  - Queue #3 pinned to core 8
>>
>> -PMD threads on cores where Rx queues are *pinned* will become *isolated*. This
>> -means that this thread will only poll the *pinned* Rx queues.
>> +PMD threads on cores where Rx queues are *pinned* will become *isolated* by
>> +default. This means that this thread will only poll the *pinned* Rx queues.
>> +
>> +If using ``pmd-rxq-assign=group`` PMD threads with *pinned* Rxqs can be
>> +*non-isolated* by setting::
>> +
>> +  $ ovs-vsctl set Open_vSwitch . other_config:pmd-isolate=false
> 
> pmd-rxq-isolate
> 
last minute change! fixed

> 
>>
>>  .. warning::
> 
> 



More information about the dev mailing list