Closed RalfKornmannEnvision closed 3 years ago
@janvorli Could you please take a look at this? I would like to avoid differences between CoreCLR and CoreRT, but I am not sure what the right thing to do is here.
I think this needs to some tests or benchmarks that demonstrate the improvement. Do you have any tests like that?
It would be best to make the change in dotnet/runtime for CoreCLR first, and then port it to CoreRT. dotnet/runtime has dedicated people to check for performance regressions in different scenarios. If this were to cause any unexpected regressions (or improvements), we will be able to catch in dotnet/runtime.
Most likely it would improves things only in some edge cases. Might not worth all the hassle. I any case I will close this here for now.
implements GCToOSInterface::BoostThreadPriority & PalStartBackgroundWork highPriority
The default scheduler SCHED_OTHER doesn't have different priorities. This implementation tries to switch to 90% of the max priority of the SCHED_RR policy if the current policy don't allow different priorities.
But as this requires special privileges it might fail. In this case these thread will have the same priority as all the others. Therefore in the worst case anything will behaves like before. In the best cases these thread will have a higher priority as planend.