lkml.org 
[lkml]   [2023]   [Oct]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH RFC] cpumask: Randomly distribute the tasks within affinity mask
On Wed, Oct 11, 2023 at 04:55:35PM -0700, Josh Don wrote:
> Hey Peter,
>
> > +static struct cpumask *root_domain_allowed(struct cpumask *newmask,
> > + struct cpumask *scratch,
> > + struct cpumask *valid)
> > +{
> > + struct root_domain *rd;
> > + struct cpumask *mask;
> > + struct rq *rq;
> > +
> > + int first = cpumask_first_and(newmask, valid);
> > + if (first >= nr_cpu_ids)
> > + return NULL;
>
> This picks the first arbitrarily, but isn't it possible for the mask
> to span both isolated and non-isolated cpus? In which case, the rest
> of this just boils down to chance (ie. whatever the span happens to be
> for the first cpu here)?

Yes, but it matches historical behaviour :/

Like I said, ideally we'd flat out reject masks like this, but...

\
 
 \ /
  Last update: 2023-10-12 10:06    [W:1.226 / U:0.028 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site