Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Programming and Hacking > Development

Reply
 
Thread Tools Search this Thread Display Modes
Old 7th October 2021, 13:17   #1  |  Link
Atak_Snajpera
RipBot264 author
 
Atak_Snajpera's Avatar
 
Join Date: May 2006
Location: Poland
Posts: 7,624
Intel Alder Lake - How to check which logical CPU is P-CORE or E-CORE?

Do you guys have any idea how we could programmatically determine which logical processor belongs to Golden Cove cores and which to Gracemont cores?
Atak_Snajpera is offline   Reply With Quote
Old 7th October 2021, 20:31   #2  |  Link
LoRd_MuldeR
Software Developer
 
LoRd_MuldeR's Avatar
 
Join Date: Jun 2005
Location: Last House on Slunk Street
Posts: 13,229
Quote:
Originally Posted by Atak_Snajpera View Post
Do you guys have any idea how we could programmatically determine which logical processor belongs to Golden Cove cores and which to Gracemont cores?
Are the P-/E-cores even "visible" as separate cores to the OS and/or applications?

To my understanding, they said there will be a hardware unit, the so-called "Thread Director", which decides which thread should run on which type of core. So maybe this is completely "transparent" to the OS and/or applications.

I would think that if all the P-/E-cores were "visible" as separate cores, then most existing applications would probably create #P + #E threads, i.e. they would be loading all the P- and all the E-core at the same time.

But that's almost certainly not what is desired. What you'd want is that applications create only #P threads, so that these can be moved between the P-/E-cores as needed.

Anyways, if P-/E-cores actually are "visible" as separate cores, then maybe GetLogicalProcessorInformationEx will provide that info – possibly with some new extensions (available in Windows 11 only). Either that, or some CPUID magic

(Also possible that M$ adds some kind of "compatibility" layer for legacy applications that hides the details of P-/E-core and makes them "visible" only to new P-/E-core aware applications)
__________________
There was of course no way of knowing whether you were being watched at any given moment.
How often, or on what system, the Thought Police plugged in on any individual wire was guesswork.



Last edited by LoRd_MuldeR; 7th October 2021 at 20:46.
LoRd_MuldeR is offline   Reply With Quote
Old 8th October 2021, 08:56   #3  |  Link
Atak_Snajpera
RipBot264 author
 
Atak_Snajpera's Avatar
 
Join Date: May 2006
Location: Poland
Posts: 7,624
I'm pretty sure that all cores will be visible in system like in lakefield
Atak_Snajpera is offline   Reply With Quote
Old 11th October 2021, 00:28   #4  |  Link
LoRd_MuldeR
Software Developer
 
LoRd_MuldeR's Avatar
 
Join Date: Jun 2005
Location: Last House on Slunk Street
Posts: 13,229
Interestingly, task-manger shows 5 separate CPU graphs, but it also shows "100%" CPU load even though only 4 of 5 cores are utilized

And, how comes that Cinebench, apparently, only uses 4 of 5 cores?

I really have no idea what "NumberOfProcessors" an API like GetSystemInfo() would report on such system. Or how many processors the "SystemAffinityMask" of GetProcessAffinityMask() would indicate.

Assuming that all E- and P-cores are actually "visible" as separate (logical) cores to applications:

What should the number of threads that an application, such as video encoder, creates be based on? The number of P-cores or the total number of E- and P-cores? On the one hand, the more threads we can run in parallel the better – even if some threads run significantly slower due to being assigned to an E-core. On the other hand, the threading implementation of pretty much all existing applications is based on the assumption that all threads run (approximately) at the same speed. If, all of a sudden, some threads run significantly slower than others, it could result in the "fast" threads stalling all the time, because they have to wait for results from "slow" threads
__________________
There was of course no way of knowing whether you were being watched at any given moment.
How often, or on what system, the Thought Police plugged in on any individual wire was guesswork.



Last edited by LoRd_MuldeR; 11th October 2021 at 00:42.
LoRd_MuldeR is offline   Reply With Quote
Old 11th October 2021, 17:22   #5  |  Link
Atak_Snajpera
RipBot264 author
 
Atak_Snajpera's Avatar
 
Join Date: May 2006
Location: Poland
Posts: 7,624
According to anandtech system scheduler is programmed to use logical processors in this order:
Use P-CORE then
Use E-CORE then
Use SMT on P-CORE

BTW. lakefield was odd indeed because P-CORE was only used if you were doing strictly single threaded task like launching program. Lakefield was described by anandtech like 4+1 (E-CORE + P-CORE). System barely used all 5 cores at 100% during multithreaded computations.
Atak_Snajpera is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 19:12.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, vBulletin Solutions Inc.