[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210525113235.GM2633526@linux.vnet.ibm.com>
Date: Tue, 25 May 2021 17:02:35 +0530
From: Srikar Dronamraju <srikar@...ux.vnet.ibm.com>
To: Valentin Schneider <valentin.schneider@....com>
Cc: Peter Zijlstra <peterz@...radead.org>,
Ingo Molnar <mingo@...nel.org>,
LKML <linux-kernel@...r.kernel.org>,
Mel Gorman <mgorman@...hsingularity.net>,
Rik van Riel <riel@...riel.com>,
Thomas Gleixner <tglx@...utronix.de>,
Vincent Guittot <vincent.guittot@...aro.org>,
Dietmar Eggemann <dietmar.eggemann@....com>,
linuxppc-dev@...ts.ozlabs.org,
Nathan Lynch <nathanl@...ux.ibm.com>,
Michael Ellerman <mpe@...erman.id.au>,
Scott Cheloha <cheloha@...ux.ibm.com>,
Gautham R Shenoy <ego@...ux.vnet.ibm.com>,
Geetika Moolchandani <Geetika.Moolchandani1@....com>
Subject: Re: [PATCH 1/3] sched/topology: Allow archs to populate distance map
* Valentin Schneider <valentin.schneider@....com> [2021-05-25 11:21:02]:
> On 24/05/21 21:48, Srikar Dronamraju wrote:
> > * Valentin Schneider <valentin.schneider@....com> [2021-05-24 15:16:09]:
> >> Ok so from your arch you can figure out the *size* of the set of unique
> >> distances, but not the individual node_distance(a, b)... That's quite
> >> unfortunate.
> >
> > Yes, thats true.
> >
> >>
> >> I suppose one way to avoid the hook would be to write some "fake" distance
> >> values into your distance_lookup_table[] for offline nodes using your
> >> distance_ref_point_depth thing, i.e. ensure an iteration of
> >> node_distance(a, b) covers all distance values [1]. You can then keep patch
> >> 3 around, and that should roughly be it.
> >>
> >
> > Yes, this would suffice but to me its not very clean.
> > static int found[distance_ref_point_depth];
> >
> > for_each_node(node){
> > int i, nd, distance = LOCAL_DISTANCE;
> > goto out;
> >
> > nd = node_distance(node, first_online_node)
> > for (i=0; i < distance_ref_point_depth; i++, distance *= 2) {
> > if (node_online) {
> > if (distance != nd)
> > continue;
> > found[i] ++;
> > break;
> > }
> > if (found[i])
> > continue;
> > distance_lookup_table[node][i] = distance_lookup_table[first_online_node][i];
> > found[i] ++;
> > break;
> > }
> > }
> >
> > But do note: We are setting a precedent for node distance between two nodes
> > to change.
> >
>
> Indeed. AFAICT it's that or the unique-distance-values hook :/
Peter,
Please let me know which approach would you prefer.
I am open to try any other approach too.
In my humble opinion, unique-distance-values hook is more cleaner.
Do you still have any concerns with the unique-distance-values hook?
--
Thanks and Regards
Srikar Dronamraju
Powered by blists - more mailing lists