Hi

I am reading the design of go scheduler, and don't quite understand this in 
"Scalable Go Scheduler Design Doc"

https://docs.google.com/document/d/1TTj4T2JO42uD5ID9e89oa0sLKhJYD0Y_kqxDv3I3XMw/edit#

Spinning is mostly passive (yield to OS, sched_yield()), but may include a 
> little bit of active spinning (loop burnging CPU) (requires investigation 
> and tuning).
>



My question is:

When M is spinning, what's the actual work it is doing?

I looked into the doc and code, it seems that when M is spinning it just 
looks for available work to do (look for G, look for P);

but why the design doc said "Spinning is mostly passive (yield to OS, 
sched_yield()"? 

If the spinning thread mostly just do sched_yield(), it just let other 
thread doing its job, then what's is the "spinning"

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to