sched-ext / scx

sched_ext schedulers and tools
https://bit.ly/scx_slack
GNU General Public License v2.0
692 stars 48 forks source link

scx_rusty: Elimate data races possibility for domain min_vruntime #341

Closed vax-r closed 4 weeks ago

vax-r commented 1 month ago

Summary

READ_ONCE()/WRITE_ONCE() macros are added in commit 0932fde, we should be able to utilize the macros to get around the possibility of data races for domc->min_vruntime.

_Personally I think dom_min_vruntime function is redundant, it simply does the load operation of domc->min_vruntime, nothing special. It doesn't provide better readability either, the variable domc->min_vruntime is easy and trivial enough to understand itself._