22 ms·
Intel’s Thread Director: Assisting the OS to make task placement decisions
- jfoutz 5y agoHobbyist me thinks this is really cool. Thinking about how different runtimes might hint allocation of resources is fascinating. Professional me knows I'll be stuck figuring out that some bursty process that really needs p1 access all the time, in spite of usually being idle is going to be super pissed off when he gets paged at 2am. and he'll be stuck spending a lot of time figuring out how to pin that process to that core. Worker drone me is going to be sad thinking that slack and chrome are snarfing the good cores while my compile times suffer. Bit of a hot take, but it's a tragedy of the commons situation. Programmers are smart, they'll find tricks to grab the fast cores. There are a maybe zero organizations that can get alignment to keep important processes on fast cores, it's way better to just be fast and point the finger at other teams for being slow. What a time to be alive. It's super cool. it has potential to be amazing. But even forcing every task to run on an E-core, and a heavy bias to fast cores being idle will be gamed. I guess it's better to know than be surprised.
- omegalulw 5y agoHow? This just gives more control to the OS. It's the OS's job to ensure that process priorities are enforced. I don't see how you get around that.
- jfoutz 5y agomy (flawed?) impression is, the OS implementation is heuristic. putting a process on a core is not much different than putting state in swap. it's not that important with nvram disks, but it's not that hard to keep your data out of swap. There's bound to be a way to keep a process on the fast core. Just do some useless work that keeps the process on the fast core. Or cooperate with the os to keep the critical process on the fast core.
- deleted 5y ago[deleted]
- Dylan16807 5y ago> Professional me knows I'll be stuck figuring out that some bursty process that really needs p1 access all the time, in spite of usually being idle is going to be super pissed off when he gets paged at 2am. In a way that can't wait tens of microseconds? > and he'll be stuck spending a lot of time figuring out how to pin that process to that core. Pinning to cores is really easy. > Worker drone me is going to be sad thinking that slack and chrome are snarfing the good cores while my compile times suffer. I'd say something about adjusting priorities but there's a much more important thing to realize here. If your CPU didn't have this, you'd have 6 fewer cores. Or probably 12 in the next version. Even if your compiler can't use two of the fast cores, it's going to run much faster overall. > tragedy of the commons situation If you want to improve your own responsiveness at the expense of other programs you could already busy loop everything. And nobody does that. I don't think it's something to worry about.
- eptcyka 5y agoFor years, there were multiple Android SoCs with stupid amounts of cores, a mixup between 2 or 3 core types, and the end result is that pretty much all contemporary matchups between the best and worst Apple SoCs and ARM SoCs put in Android phones were favoring the glorious fruit company.
- ajtulloch 5y agoUnderappreciated fact - the Apple SoCs since A10 (iPhone 7, etc) are also big.LITTLE designs! https://en.m.wikipedia.org/wiki/Apple_A10 https://en.m.wikipedia.org/wiki/Apple_A10
- jjoonathan 5y agoDesktop GUIs are really lagging when it comes to giving the user tools to corral unruly apps. I know, they were born in a more trusting time, but mobile has understood for many years that the user-app relationship can get slightly adversarial. It's high time for the desktop to take a more solid swing at it. Hey, maybe we could even have kept Flash around if it were easy to prevent flash ads from fighting each other to take 100% CPU. It might have taken some iteration to figure out how to map a simple GUI-appropriate slider to a scheduling policy (10% -> 10ms every 100ms?) but I bet it could have been done. It would have had a nice side effect of appropriately directing user outrage at offending applications, too.
- deleted 5y ago[deleted]
- specialist 5y agoBrowsers should support resource quotas. I wouldn't mind the client side scripts so much if they behaved. Even with uBlock and such, random pages will peg my CPU, drain my battery. IIRC, allrecipes.com, imdb.com, and of course youtube.com. Forcing Reader View often helps, but it's hit & miss. The Great Suspender worked ok for Chrome. But I'm now 90% Safari and 10% FireFox. Adjacent Idea: Browser history should also include other meta. Like page size. (weight), resources consumed, time spent on page, when page was closed, permissions requested & granted, etc.
- jayd16 5y agoI don't know. I don't really spend a lot of time dealing with gamed process priority. Would this be all that different?
- kfprt 5y agoDidn't Intel already try something like this with Lakefield? It didn't go well. Let's say the thread starts on a high performance core and enables the code paths for features the efficiency core doesn't have. How will the software know to not move the thread to the efficiency core? If it did do so wouldn't it throw errors? I frankly don't see how they can solve this problem with software and not have to recompile everything to be hybrid arch aware. In the android space everyone throws their phones away every few years so this hasn't been an issue. To me it seems like Intel is creating another Itanic situation where no one is going to compile their software to target the hybrid paradigm.
- praseodym 5y agoAlder Lake fixes this issue by including all features on the efficiency cores, so a thread should be able to move between performance and efficiency cores seamlessly. It also drops AVX-512 support entirely, presumably because the efficiency cores don’t support it and the problem you mention isn’t easily solvable.
- kfprt 5y agoIt seems you are correct. https://en.wikipedia.org/wiki/Golden_Cove https://en.wikipedia.org/wiki/Golden_Cove https://en.wikipedia.org/wiki/Gracemont_(microarchitecture) https://en.wikipedia.org/wiki/Gracemont_(microarchitecture) Does this mean we will get RPi style Gracemont SBC's or did Intel drop that after Edison?
- jiggawatts 5y ago> It also drops AVX-512 support entirely I wonder if Zen 4 will have AVX-512 support. If so, given that it will use a 5nm process instead of this processor's 7nm process, it will absolutely blow it out of the water. It would be somewhat ironic to see Intel being trounced by an instruction set they invented and then stopped using!
- sroussey 5y agoPlease, no. AVX-512 was a mistake, causing Intel lots of issues for the benefit of a new benchmark. It heats up and clocks down the chip for other work. And it takes up too much space. Again, please, no.
- mnd999 5y agoIt doesn’t sound like anyone outside of Intel and Microsoft actually knows how this works. How are Linux and the BSDs going to be able to support this?
- yvdriess 5y agoThe way it usually goes, Intel submits a kernel patch.
- dgan 5y agoDo they need to support this? Another proprietary blob that takes decisions what process to run where? Just asking
- mnd999 5y agoIf Windows is making changes at scheduler level to support it, I would think yes, they do.
- Thev00d00 5y agoAndroid phones have had big.LITTLE a while now, you would hope that scheduler support has matured in that time.
- lincpa 5y agoIn many aspects, such as intelligence, versatility, heterogeneous computer support, it is much worse than the scheduler of "Warehouse/Workshop Model". https://github.com/linpengcheng/PurefunctionPipelineDataflow#The-unification-with-Computer-Hardware-Architecture https://github.com/linpengcheng/PurefunctionPipelineDataflow...
- didibus 5y agoI'm surprised they prioritized Windows 11 and not Linux. Is this meant to most benefit consumers? I'd think something so complex would have been first targeted at servers.
- arvinsim 5y agoPerhaps the first chips created with this are consumer-oriented.
- voiper1 5y agoThe huge CPU-disparity is more on mobile and coming to desktops. It's "just" hyperthreading on servers right now that could benefit from this.
- qzw 5y agoThis is supposed to help bring intel’s perf/watt closer to the M1. So it’s primarily a consumer play at this point.
- pjmlp 5y agoThey always do. Just like whatever Khronos does, AMD, Intel and NVidia collaborate with Microsoft in doig native DirectX hardware support and only afterwards those features show up on OpenGL and Vulkan extensions soup.
- garaetjjte 5y agoVendor OpenGL extensions for new features frequently appeared before DirectX support.
- pjmlp 5y agoLike what? Hardware T&L, GPU shaders, Mesh Shaders, Compute Shaders, Ray Tracing, certainly not.
- garaetjjte 5y ago
- sharikone 5y agoIt seems Microsoft and Intel are threatened by the M1 and had to do this hastily. Hence the rush for Windows support in spite of Linux.
- pjmlp 5y agoM1 threatens no one besides wishful thinking, Apple isn't going to start selling M1, and their laptops/desktops account for about 10% worldwide market share.
- earthnail 5y agoApple does dominate the premium segment, though. Raw market share isn’t enough; share of actual profit is more interesting.
- pjmlp 5y agoIt is still 10% of the world. Volkswagen doesn't need to worry about Polo sales just because Ferrari outperforms them.
- lifty 5y agoWhile I can't really know for sure, but based on perceived performance and smoothness, most likely M1 + MacOS already does something similar in terms of thread and process prioritisation. iOS has done this for a long time, making sure that rendering threads are not resource starved.
- vbezhenar 5y agoAFAIK apple runs background tasks on slow cores which is supposed to free fast cores for foreground tasks. I still don't understand why is it necessary in an OS which can juggle threads hundreds times per second using priority system. At least ignoring power efficiency aspect and concentrating only on performance or perceived performance aspects.
- 5y ago
- w7 5y agoMy big question is how will hypervisors handle this heterogenous architecture, and how much it will affect them. All cores are not equal which means vCPUs are no longer just vCPUs. I believe most guest workloads are somewhat opaque to the hypervisor, and as far as I know there isn't yet a way for guests to be aware of or demand on what cores its workloads are scheduled on any of the major hypervisors.
- Wowfunhappy 5y agoHow does this work today with processors that have more threads than physical cores?
- jiggawatts 5y agoCurrently, all hyperthreads are equal. In this new model, some cores are hyperthreaded, and some aren't. Some cores are "full spec", some aren't.
- sudosysgen 5y agoHyper threads are not equal! If you thread a task over two hyper threads that belong to the same core you will see much less of a performance improvement. Similarly, even if a hyperthread has low utilisation, if it's twin is busy you will see lower performance.
- jiggawatts 5y agoThey're all equal in the sense that physically they're all the same. If you load every hardware thread equally, they run at equal speed. In a sense each thread is exactly 1/2 of a core. It's not like "logical CPU 3" is slower than "logical CPU 7"! This is like a highway with equal width lanes. Sure, there might be more traffic in some lanes, but the lanes themselves are equal. The new Intel CPU is like 8 wide lanes that can be used by up to 16 motorcycles or 8 cars (or combinations thereof), alongside 8 medium-width lanes only usable by small cars. It's bizarre for a desktop CPU. PS: Looking at the die shots, it boggles the mind that they didn't include 16 efficiency cores! They're so tiny that it would have been a negligible area increase, but given the relative performance it seems like it would have been worthwhile. I'm guessing memory bandwidth limits are holding them back somewhere...
- lincpa 5y agoThe Intel's architecture is still far behind "the Warehouse/Workshop Model"! https://github.com/linpengcheng/PurefunctionPipelineDataflow#The-unification-with-Computer-Hardware-Architecture https://github.com/linpengcheng/PurefunctionPipelineDataflow...
- blibble 5y ago> This fundamental change is one reason why Windows 11 exists. they couldn't change the thread scheduler without a new major release? pull the other one
- lloydatkinson 5y agoYes, its a blatant lie for sure. Just like Windows has for a long supported the existence or not of certain CPU features. It's a very obvious ploy of latching on to some new CPU feature with "perfect timing" to force people on "older" hardware to upgrade. My Skylake i7 for example is "too old" for Windows 11. It's a complete joke.
- roblabla 5y agoFun fact: Windows 10 21H1 and 11 share the exact same kernel binary (ntoskrnl.exe). Which, of course, contains the scheduler. So, yeah, that's a lie if I've ever seen one.
- 10000truths 5y agoPerhaps it's already included in both kernels, and only used based on a runtime CPUID check?
- dragontamer 5y ago> they couldn't change the thread scheduler without a new major release? I'd argue that thread schedulers are a core component of any operating system. That being said: Windows8 had support for heterogenous processors (aka: ARM's big.LITTLE), so I'm not sure if a fundamental change was really needed here. Microsoft already put a lot of hard work for those Windows8 phones (which used the same kernel as Windows8 desktop).
- 656565656565 5y agoFrom the article “In previous versions of Windows, the scheduler had to rely on analysing the programs on its own, inferring performance requirements of a thread but with no real underlying understanding of what was happening.” Does anyone know what is meant by the scheduler analyses the program?
- saagarjha 5y agoThe scheduler looks at resource consumption by the program and guesses what it is doing and when it should be scheduled.
- 656565656565 5y agoThanks. Any references on how this works?
- saagarjha 5y agoWikipedia has a basic overview: https://en.wikipedia.org/wiki/Scheduling_(computing) https://en.wikipedia.org/wiki/Scheduling_(computing)