[ovs-dev] [PATCH 3/5] dpif-netdev: Add group rxq scheduling assignment type.

David Marchand david.marchand at redhat.com
Thu Jun 24 15:21:56 UTC 2021


On Thu, Jun 24, 2021 at 4:52 PM David Marchand
<david.marchand at redhat.com> wrote:
> > @@ -5229,16 +5300,40 @@ get_available_rr_pmd(struct sched_numa *numa, bool updown)
> >
> >  static struct sched_pmd *
> > -get_next_pmd(struct sched_numa *numa, bool algo)
> > +get_next_pmd(struct sched_numa *numa, enum sched_assignment_type algo,
> > +             bool has_proc)
> >  {
> > -    return get_available_rr_pmd(numa, algo);
> > +    if (algo == SCHED_GROUP) {
> > +        struct sched_pmd *sched_pmd = NULL;
> > +
> > +        /* Check if the rxq has associated cycles. This is handled differently
> > +         * as adding an zero cycles rxq to a PMD will mean that the lowest
> > +         * core would not change on a subsequent call and all zero rxqs would
> > +         * be assigned to the same PMD. */
> > +        if (has_proc) {
> > +            sched_pmd = get_lowest_proc_pmd(numa);
> > +        } else {
> > +            sched_pmd = get_lowest_num_rxq_pmd(numa);
> > +        }
> > +        /* If there is a pmd selected, return it now. */
> > +        if (sched_pmd) {
> > +            return sched_pmd;
> > +        }
>
> The only case where sched_pmd == NULL is when n_pmds == 0 in which
> case the rr stuff would also lead to no pmd available.

Sorry, rather than n_pmds == 0, it is more that no non-isolated pmd is
available.
But the end result is the same.


> And it seems unintuitive that in non rr mode we would still call the
> rr pmd selector.
>
> I would simply return sched_pmd here.



-- 
David Marchand



More information about the dev mailing list