On Wed, Mar 2, 2022 at 11:32 AM Kevin Traynor <ktray...@redhat.com> wrote:
>
> Hi Mike, thanks for reviewing,
>
> On 02/03/2022 15:41, Mike Pattrick wrote:
> > On Tue, Mar 1, 2022 at 12:25 PM Kevin Traynor <ktray...@redhat.com> wrote:
> >>
> >> There are currently some checks for cross-numa polling cases to
> >> ensure that they won't effect the accuracy of the PMD ALB.
> >>
> >> If an rxq is pinned to a pmd core by the user it will not be
> >> reassigned by OVS, so even if it is non-local numa polled it
> >> will not impact PMD ALB accuracy.
> >>
> >> To establish this, a check was made on whether the pmd core was
> >> isolated or not. However, since other_config:pmd-rxq-isolate was
> >> introduced, rxqs may be pinned but the pmd core not isolated.
> >>
> >> It means that by setting pmd-rxq-isolate=false and doing non-local
> >> numa pinning, PMD ALB may not run where it should.
> >>
> >> If the core is isolated we can skip individual rxq checks but if not,
> >> we should check the individual rxqs for pinning before we disallow
> >> PMD ALB.
> >>
> >> Fixes: 6193e03267c1 ("dpif-netdev: Allow pin rxq and non-isolate PMD.")
> >>
> >> Signed-off-by: Kevin Traynor <ktray...@redhat.com>
> >> ---
> >>   lib/dpif-netdev.c | 5 ++++-
> >>   1 file changed, 4 insertions(+), 1 deletion(-)
> >>
> >> diff --git a/lib/dpif-netdev.c b/lib/dpif-netdev.c
> >> index 9ae488d6e..9df41e0b6 100644
> >> --- a/lib/dpif-netdev.c
> >> +++ b/lib/dpif-netdev.c
> >> @@ -5697,9 +5697,12 @@ sched_numa_list_cross_numa_polling(struct 
> >> sched_numa_list *numa_list)
> >>
> >>               sched_pmd = &numa->pmds[i];
> >> +            if (sched_pmd->isolated) {
> >> +                continue;
> >> +            }
> >>               /* For each rxq. */
> >>               for (unsigned k = 0; k < sched_pmd->n_rxq; k++) {
> >>                   struct dp_netdev_rxq *rxq = sched_pmd->rxqs[k];
> >>
> >> -                if (!sched_pmd->isolated &&
> >> +                if (rxq->core_id == OVS_CORE_UNSPEC &&
> >
> > Should this be an ||? Is there a case where core_id is set but cross numa?
> >
>
> yes, that case is possible. The options are,
>
> core_id == OVS_CORE_UNSPEC == rxq non-pinned
> core_id != OVS_CORE_UNSPEC == rxq pinned
>
> pmd core numa == rxq numa == rxq local numa polled
> pmd core numa != rxq numa == rxq non-local numa polled
>
> The function wants to find if there are any rxqs that are 'non-pinned
> AND non-local numa polled'.
>
> That is part of checks that indicate the rxq may get polled by a pmd
> core from a different numa after reassignment, so (for now anyway) we
> don't want proceed with the dry-run as the estimations about cycles
> required to process pkts from that rxq may be inaccurate.
>
> I can add some comments in the function to make it clearer, as it's not
> the most intuitive. wdyt?

Thanks for the explanation, now it makes more sense. I think this
function is a good candidate for a comment; what you've written here
makes it very clear, but that explanation is not so clear from the
code.

-M

>
> Kevin.
>
> >>                       rxq->pmd->numa_id !=
> >>                           netdev_get_numa_id(rxq->port->netdev)) {
> >> --
> >> 2.34.1
> >>
> >> _______________________________________________
> >> dev mailing list
> >> d...@openvswitch.org
> >> https://mail.openvswitch.org/mailman/listinfo/ovs-dev
> >>
> >
> > Cheers,
> > M
> >
>

_______________________________________________
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to