Y
Hacker News
new
|
ask
|
show
|
jobs
by
heavenlyblue
1514 days ago
You reschedule it only once so it doesn’t matter
1 comments
saagarjha
1514 days ago
I don’t see how? Once your quantum is up the thread gets put back into the scheduling pool and you have to do this all over again…
link
boardwaalk
1514 days ago
Couldn’t there be some flag on the thread that marks it as “P-core only”? Doesn’t seem hard. I don’t known Linux scheduler internals though.
link
pantalaimon
1514 days ago
Threads already have an affinity bit mask where you can select which cores they can be scheduled on.
https://man7.org/linux/man-pages/man2/sched_setaffinity.2.ht...
link
saagarjha
1514 days ago
Right but then you’d just have all processes with that flag all the time.
link
pantalaimon
1514 days ago
Only if glibc decides to use AVX512 for memset and such. I’m not sure if that makes sense to begin with, but it could also not do that if it detects a heterogeneous CPU.
link
heavenlyblue
1514 days ago
You don’t have to schedule your thread on another core at all
link