lkml.org 
[lkml]   [2017]   [Aug]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v10 2/2] sched/rt: Add support for SD_PREFER_SIBLING on find_lowest_rq()
On Fri, 25 Aug 2017 10:31:00 +0900
Byungchul Park <byungchul.park@lge.com> wrote:

> On Thu, Aug 24, 2017 at 09:55:14AM -0400, Steven Rostedt wrote:
> > On Thu, 24 Aug 2017 10:06:03 +0900
> > Byungchul Park <byungchul.park@lge.com> wrote:
> >
> > > Hello Steven,
> > >
> > > Can I keep your reviewed-by with comments modified?
> >
> > Yes, but I have one nit.
> >
> >
> > > @@ -1668,9 +1691,35 @@ static int find_lowest_rq(struct task_struct *task)
> > > return this_cpu;
> > > }
> > >
> > > - best_cpu = cpumask_first_and(lowest_mask,
> > > - sched_domain_span(sd));
> > > + /*
> > > + * If a cpu being in lowest_mask & current sd &
> > > + * ~prefer sd is valid, that becomes our choice.
> >
> > I can't parse the above sentence.
>
> I might have simplified the comment too much.
>
> ~prefer means we want to exclude the domain span having SD_PREFER_SIBLING,
> since they should be considered as fallback candidates.
>
> W/o ~prefer, a cpu in the domain might be chosen when we consider higher
> domain than the domain having SD_PREFER_SIBLING, as the best cpu, not
> fallback.

That actually wasn't the hard part. It was the entire sentence that is
very confusing. What is the definition of "is valid" in this context?
Do you just mean "< nr_cpu_ids"? If that's the case you are also being
redundant. Because if the "if" statement is true, then it will be
valid. What about just saying something like:


/*
* If a cpu exists that is in the lowest_mask and the current sd span,
* but not in the prefer sd span, then that becomes our choice.
*/

-- Steve

\
 
 \ /
  Last update: 2017-08-25 03:49    [W:0.035 / U:5.112 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site