From: Srikar Dronamraju <srikar@linux.vnet.ibm.com>
To: Peter Zijlstra <peterz@infradead.org>
Cc: Nathan Lynch <nathanl@linux.ibm.com>,
Gautham R Shenoy <ego@linux.vnet.ibm.com>,
Vincent Guittot <vincent.guittot@linaro.org>,
Rik van Riel <riel@surriel.com>,
linuxppc-dev@lists.ozlabs.org,
Scott Cheloha <cheloha@linux.ibm.com>,
Geetika Moolchandani <Geetika.Moolchandani1@ibm.com>,
LKML <linux-kernel@vger.kernel.org>,
Ingo Molnar <mingo@kernel.org>,
Thomas Gleixner <tglx@linutronix.de>,
Mel Gorman <mgorman@techsingularity.net>,
Valentin Schneider <valentin.schneider@arm.com>,
Dietmar Eggemann <dietmar.eggemann@arm.com>
Subject: Re: [PATCH 1/3] sched/topology: Allow archs to populate distance map
Date: Fri, 28 May 2021 15:54:34 +0530 [thread overview]
Message-ID: <20210528102434.GO2633526@linux.vnet.ibm.com> (raw)
In-Reply-To: <YLCtKziUgPTvPh1j@hirez.programming.kicks-ass.net>
* Peter Zijlstra <peterz@infradead.org> [2021-05-28 10:43:23]:
> On Mon, May 24, 2021 at 09:48:29PM +0530, Srikar Dronamraju wrote:
> > * Valentin Schneider <valentin.schneider@arm.com> [2021-05-24 15:16:09]:
>
> > > 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.
>
> Not really; or rather not more than already is the case AFAICT. Because
> currently your distance table will have *something* in it
> (LOCAL_DISTANCE afaict) for nodes that have never been online, which is
> what triggered the whole problem to begin with.
>
> Only after the node has come online for the first time, will it contain
> the right value.
>
> So both before and after this proposal the actual distance value changes
> after the first time a node goes online.
>
> Yes that's unfortunate, but I don't see a problem with pre-filling it
> with something useful in order to avoid aditional arch hooks.
>
>
Okay,
Will post a v2 with prefilling.
Thanks for the update.
--
Thanks and Regards
Srikar Dronamraju
WARNING: multiple messages have this Message-ID (diff)
From: Srikar Dronamraju <srikar@linux.vnet.ibm.com>
To: Peter Zijlstra <peterz@infradead.org>
Cc: Valentin Schneider <valentin.schneider@arm.com>,
Ingo Molnar <mingo@kernel.org>,
LKML <linux-kernel@vger.kernel.org>,
Mel Gorman <mgorman@techsingularity.net>,
Rik van Riel <riel@surriel.com>,
Thomas Gleixner <tglx@linutronix.de>,
Vincent Guittot <vincent.guittot@linaro.org>,
Dietmar Eggemann <dietmar.eggemann@arm.com>,
linuxppc-dev@lists.ozlabs.org,
Nathan Lynch <nathanl@linux.ibm.com>,
Michael Ellerman <mpe@ellerman.id.au>,
Scott Cheloha <cheloha@linux.ibm.com>,
Gautham R Shenoy <ego@linux.vnet.ibm.com>,
Geetika Moolchandani <Geetika.Moolchandani1@ibm.com>
Subject: Re: [PATCH 1/3] sched/topology: Allow archs to populate distance map
Date: Fri, 28 May 2021 15:54:34 +0530 [thread overview]
Message-ID: <20210528102434.GO2633526@linux.vnet.ibm.com> (raw)
In-Reply-To: <YLCtKziUgPTvPh1j@hirez.programming.kicks-ass.net>
* Peter Zijlstra <peterz@infradead.org> [2021-05-28 10:43:23]:
> On Mon, May 24, 2021 at 09:48:29PM +0530, Srikar Dronamraju wrote:
> > * Valentin Schneider <valentin.schneider@arm.com> [2021-05-24 15:16:09]:
>
> > > 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.
>
> Not really; or rather not more than already is the case AFAICT. Because
> currently your distance table will have *something* in it
> (LOCAL_DISTANCE afaict) for nodes that have never been online, which is
> what triggered the whole problem to begin with.
>
> Only after the node has come online for the first time, will it contain
> the right value.
>
> So both before and after this proposal the actual distance value changes
> after the first time a node goes online.
>
> Yes that's unfortunate, but I don't see a problem with pre-filling it
> with something useful in order to avoid aditional arch hooks.
>
>
Okay,
Will post a v2 with prefilling.
Thanks for the update.
--
Thanks and Regards
Srikar Dronamraju
next prev parent reply other threads:[~2021-05-28 10:25 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-20 15:44 [PATCH 0/3] Skip numa distance for offline nodes Srikar Dronamraju
2021-05-20 15:44 ` Srikar Dronamraju
2021-05-20 15:44 ` [PATCH 1/3] sched/topology: Allow archs to populate distance map Srikar Dronamraju
2021-05-20 15:44 ` Srikar Dronamraju
2021-05-20 18:56 ` Peter Zijlstra
2021-05-20 18:56 ` Peter Zijlstra
2021-05-21 2:38 ` Srikar Dronamraju
2021-05-21 2:38 ` Srikar Dronamraju
2021-05-21 8:14 ` Peter Zijlstra
2021-05-21 8:14 ` Peter Zijlstra
2021-05-21 9:28 ` Srikar Dronamraju
2021-05-21 9:28 ` Srikar Dronamraju
2021-05-24 14:16 ` Valentin Schneider
2021-05-24 14:16 ` Valentin Schneider
2021-05-24 16:18 ` Srikar Dronamraju
2021-05-24 16:18 ` Srikar Dronamraju
2021-05-25 10:21 ` Valentin Schneider
2021-05-25 10:21 ` Valentin Schneider
2021-05-25 11:32 ` Srikar Dronamraju
2021-05-25 11:32 ` Srikar Dronamraju
2021-05-28 5:21 ` Srikar Dronamraju
2021-05-28 5:21 ` Srikar Dronamraju
2021-05-28 8:43 ` Peter Zijlstra
2021-05-28 8:43 ` Peter Zijlstra
2021-05-28 10:24 ` Srikar Dronamraju [this message]
2021-05-28 10:24 ` Srikar Dronamraju
2021-05-20 15:44 ` [PATCH 2/3] powerpc/numa: Populate distance map correctly Srikar Dronamraju
2021-05-20 15:44 ` Srikar Dronamraju
2021-05-24 14:16 ` Valentin Schneider
2021-05-24 14:16 ` Valentin Schneider
2021-05-24 14:50 ` Srikar Dronamraju
2021-05-24 14:50 ` Srikar Dronamraju
2021-05-20 15:44 ` [PATCH 3/3] sched/topology: Skip updating masks for non-online nodes Srikar Dronamraju
2021-05-20 15:44 ` Srikar Dronamraju
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210528102434.GO2633526@linux.vnet.ibm.com \
--to=srikar@linux.vnet.ibm.com \
--cc=Geetika.Moolchandani1@ibm.com \
--cc=cheloha@linux.ibm.com \
--cc=dietmar.eggemann@arm.com \
--cc=ego@linux.vnet.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mgorman@techsingularity.net \
--cc=mingo@kernel.org \
--cc=nathanl@linux.ibm.com \
--cc=peterz@infradead.org \
--cc=riel@surriel.com \
--cc=tglx@linutronix.de \
--cc=valentin.schneider@arm.com \
--cc=vincent.guittot@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.