Re: [hwloc-users] Support for Intel's hybrid architecture - can I restrict hwloc-distrib to P cores only?

2023-11-24 Thread Jirka Hladky
Thank you, Brice!

I'm testing it on a Lenovo P1 laptop with an i7-12800H CPU with 6P +
8E. --cpukinds option solves the problem for me:-)

hwloc-calc  --cpukind 1 all

BTW, Intel's patches to improve Linux scheduling on hybrid architectures
were significantly improved this year and released recently in kernel
version 6.6.
https://www.phoronix.com/news/Intel-Hybrid-Cluster-Sched-v3

Jirka

On Fri, Nov 24, 2023 at 9:19 AM Brice Goglin  wrote:

>
> Le 24/11/2023 à 08:51, John Hearns a écrit :
> > Good question.  Maybe not an answer referring to hwloc.
> > When managing a large NUMA machine, SGI UV, I ran the OS processes in
> > a boot cpuset which was restricted to (AFAIR) the first 8 Cpus.
> > On Intel architecures with E and P cores could we think of running OS
> > on E cores only and having the batch system schedule compute tasks on
> > P cores?
> >
>
> That's certainly possible. Linux has things like isolcpus to force
> isolate some cores away from the OS tasks, should work for these
> platforms too (by the way, it's also for ARM big.LITTLE platforms
> running Linux, including Apple M1, etc).
>
> However, keep in mind that splitting P+E CPUs is not like splitting NUMA
> platforms: isolating NUMA node #0 on SGI left tons of cores available
> for HPC tasks on NUMA nodes. Current P+E from Intel usually have more E
> than P, and several models are even 2P+8E, that would be a lot of
> E-cores for the OS and very few P-cores for real apps. Your idea would
> apply better if we rather had 2E+8P but that's not the trend.
>
> Things might be more interesting with MeteorLake which (according to
>
> https://www.hardwaretimes.com/intel-14th-gen-meteor-lake-cpu-cores-almost-identical-to-13th-gen-its-a-tic/)
>
> has P+E as usual but also 2 "low-power E" on the side. There, you could
> put the OS on those 2 Low-Power E.
>
> By the way, the Linux scheduler is supposed to get enhanced to
> automatically find out which tasks to put on P and E core but they've
> been discussing things for a long time and it's hard to know what's
> actually working well already.
>
> Brice
>
>
> ___
> hwloc-users mailing list
> hwloc-users@lists.open-mpi.org
> https://lists.open-mpi.org/mailman/listinfo/hwloc-users



-- 
-Jirka
___
hwloc-users mailing list
hwloc-users@lists.open-mpi.org
https://lists.open-mpi.org/mailman/listinfo/hwloc-users

Re: [hwloc-users] Support for Intel's hybrid architecture - can I restrict hwloc-distrib to P cores only?

2023-11-24 Thread Brice Goglin


Le 24/11/2023 à 08:51, John Hearns a écrit :

Good question.  Maybe not an answer referring to hwloc.
When managing a large NUMA machine, SGI UV, I ran the OS processes in 
a boot cpuset which was restricted to (AFAIR) the first 8 Cpus.
On Intel architecures with E and P cores could we think of running OS 
on E cores only and having the batch system schedule compute tasks on 
P cores?




That's certainly possible. Linux has things like isolcpus to force 
isolate some cores away from the OS tasks, should work for these 
platforms too (by the way, it's also for ARM big.LITTLE platforms 
running Linux, including Apple M1, etc).


However, keep in mind that splitting P+E CPUs is not like splitting NUMA 
platforms: isolating NUMA node #0 on SGI left tons of cores available 
for HPC tasks on NUMA nodes. Current P+E from Intel usually have more E 
than P, and several models are even 2P+8E, that would be a lot of 
E-cores for the OS and very few P-cores for real apps. Your idea would 
apply better if we rather had 2E+8P but that's not the trend.


Things might be more interesting with MeteorLake which (according to 
https://www.hardwaretimes.com/intel-14th-gen-meteor-lake-cpu-cores-almost-identical-to-13th-gen-its-a-tic/) 
has P+E as usual but also 2 "low-power E" on the side. There, you could 
put the OS on those 2 Low-Power E.


By the way, the Linux scheduler is supposed to get enhanced to 
automatically find out which tasks to put on P and E core but they've 
been discussing things for a long time and it's hard to know what's 
actually working well already.


Brice




OpenPGP_signature
Description: OpenPGP digital signature
___
hwloc-users mailing list
hwloc-users@lists.open-mpi.org
https://lists.open-mpi.org/mailman/listinfo/hwloc-users

Re: [hwloc-users] Support for Intel's hybrid architecture - can I restrict hwloc-distrib to P cores only?

2023-11-24 Thread Brice Goglin

Le 23/11/2023 à 19:29, Jirka Hladky a écrit :

Hi Brice,

I have a question about the hwloc's support for Intel's hybrid 
architectures, like in Alder Lake CPUs:

https://en.wikipedia.org/wiki/Alder_Lake

There are P (performance) and E (efficiency) cores. Is hwloc able to 
detect which core is which? Can I, for example, restrict hwloc-distrib 
to P cores only?


Pseudocode:
hwloc-distrib --single --restrict <> <>



Hello

On machines with 2 kinds of cores (P and E), P are the second cpukinds 
in hwloc (cpukinds are ordered by energy-efficiency first):


$ lstopo  --cpukinds
CPU kind #0 efficiency 0 cpuset 0x000ff000
  CoreType = IntelAtom
CPU kind #1 efficiency 1 cpuset 0x0fff
  CoreType = IntelCore

These cpusets may be returned by hwloc-calc either by index or by info 
attribute:


$ hwloc-calc  --cpukind 1 all
0x0fff
$ hwloc-calc --cpukind CoreType=IntelCore all
0x0fff

So just pass --restrict $(hwloc-calc --cpukind 1 all) to hwloc-distrib 
and you should be good.


Brice




OpenPGP_signature
Description: OpenPGP digital signature
___
hwloc-users mailing list
hwloc-users@lists.open-mpi.org
https://lists.open-mpi.org/mailman/listinfo/hwloc-users

Re: [hwloc-users] Support for Intel's hybrid architecture - can I restrict hwloc-distrib to P cores only?

2023-11-23 Thread John Hearns
Good question.  Maybe not an answer referring to hwloc.
When managing a large NUMA machine, SGI UV, I ran the OS processes in a
boot cpuset which was restricted to (AFAIR) the first 8 Cpus.
On Intel architecures with E and P cores could we think of running OS on E
cores only and having the batch system schedule compute tasks on P cores?

On Thu, 23 Nov 2023 at 18:31, Jirka Hladky  wrote:

> Hi Brice,
>
> I have a question about the hwloc's support for Intel's hybrid
> architectures, like in Alder Lake CPUs:
> https://en.wikipedia.org/wiki/Alder_Lake
>
> There are P (performance) and E (efficiency) cores. Is hwloc able to
> detect which core is which? Can I, for example, restrict hwloc-distrib to P
> cores only?
>
> Pseudocode:
> hwloc-distrib --single --restrict <> <>
>
> Merci beaucoup!
> Jirka
>
>
>
> ___
> hwloc-users mailing list
> hwloc-users@lists.open-mpi.org
> https://lists.open-mpi.org/mailman/listinfo/hwloc-users
___
hwloc-users mailing list
hwloc-users@lists.open-mpi.org
https://lists.open-mpi.org/mailman/listinfo/hwloc-users