From: Tariq Toukan <ttoukan.linux@gmail.com>
To: Peter Zijlstra <peterz@infradead.org>, Tariq Toukan <tariqt@nvidia.com>
Cc: "David S. Miller" <davem@davemloft.net>,
Saeed Mahameed <saeedm@nvidia.com>,
Jakub Kicinski <kuba@kernel.org>, Ingo Molnar <mingo@redhat.com>,
Juri Lelli <juri.lelli@redhat.com>,
Eric Dumazet <edumazet@google.com>,
Paolo Abeni <pabeni@redhat.com>,
netdev@vger.kernel.org, Gal Pressman <gal@nvidia.com>,
Vincent Guittot <vincent.guittot@linaro.org>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH net-next 1/2] sched/topology: Expose sched_numa_find_closest
Date: Mon, 18 Jul 2022 14:42:52 +0300 [thread overview]
Message-ID: <72170546-fad0-0b96-e075-b755c3a48bec@gmail.com> (raw)
In-Reply-To: <YtUzu4d9F+V621tw@worktop.programming.kicks-ass.net>
On 7/18/2022 1:19 PM, Peter Zijlstra wrote:
> On Sun, Jul 17, 2022 at 08:23:00AM +0300, Tariq Toukan wrote:
>> This logic can help device drivers prefer some remote cpus
>> over others, according to the NUMA distance metrics.
>>
>> Reviewed-by: Gal Pressman <gal@nvidia.com>
>> Signed-off-by: Tariq Toukan <tariqt@nvidia.com>
>> ---
>> include/linux/sched/topology.h | 2 ++
>> kernel/sched/topology.c | 1 +
>> 2 files changed, 3 insertions(+)
>>
>> diff --git a/include/linux/sched/topology.h b/include/linux/sched/topology.h
>> index 56cffe42abbc..d467c30bdbb9 100644
>> --- a/include/linux/sched/topology.h
>> +++ b/include/linux/sched/topology.h
>> @@ -61,6 +61,8 @@ static inline int cpu_numa_flags(void)
>> {
>> return SD_NUMA;
>> }
>> +
>> +int sched_numa_find_closest(const struct cpumask *cpus, int cpu);
>> #endif
>>
>> extern int arch_asym_cpu_priority(int cpu);
>> diff --git a/kernel/sched/topology.c b/kernel/sched/topology.c
>> index 05b6c2ad90b9..688334ac4980 100644
>> --- a/kernel/sched/topology.c
>> +++ b/kernel/sched/topology.c
>> @@ -2066,6 +2066,7 @@ int sched_numa_find_closest(const struct cpumask *cpus, int cpu)
>>
>> return found;
>> }
>> +EXPORT_SYMBOL(sched_numa_find_closest);
>
> EXPORT_SYMBOL_GPL() if anything.
I'll fix.
>
> Also, this thing will be subject to sched_domains, that means that if
> someone uses cpusets or other means to partition the machine, that
> effects the result.
>
> Is that what you want?
Yes, it's good enough, at least as a first phase and basic functionality.
Later we might introduce whatever enhancements we find necessary.
Thanks,
Tariq
next prev parent reply other threads:[~2022-07-18 11:43 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-17 5:22 [PATCH net-next 0/2] mlx5: Use NUMA distance metrics Tariq Toukan
2022-07-17 5:23 ` [PATCH net-next 1/2] sched/topology: Expose sched_numa_find_closest Tariq Toukan
2022-07-18 10:19 ` Peter Zijlstra
2022-07-18 11:42 ` Tariq Toukan [this message]
2022-07-17 5:23 ` [PATCH net-next 2/2] net/mlx5: Improve remote NUMA preferences used for the IRQ affinity hints Tariq Toukan
2022-07-17 21:51 ` Saeed Mahameed
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=72170546-fad0-0b96-e075-b755c3a48bec@gmail.com \
--to=ttoukan.linux@gmail.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=gal@nvidia.com \
--cc=juri.lelli@redhat.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=peterz@infradead.org \
--cc=saeedm@nvidia.com \
--cc=tariqt@nvidia.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®