Go scheduler

本文基于Go 1.13。
Go提供了一套runtime机制,来提供其协程调度特性。实际上就是完成一种类似JavaScript的event-driven编程或者异步编程的范式。其带来的特性是,大大增加了Go app的并发特性(可达百万级,甚至更多的并发)。特别适用于所有并发都是无差别的场景下。例如网络连接。但因为没有优先级概念,实际上Go的调度框架对实时性是有损害的。
本文专注于分析调度框架,以及一些框架的实现细节。文末会列举我在阅读时参考的网页链接。

GPM

Go基于GPM这三个object来组织调度框架。大致结构如下:

  • G: Gourtines, 每个Goroutine对应一个G结构体,G保存Goroutine的运行堆栈,即并发任务状态。
  • P: Processors, 理想状态下一个P对应一个CPU核。对M来说,P提供了相关的执行环境(Context),如内存分配状态(mcache),任务队列(G)等
  • M: Machine, OS线程抽象,当和某个P绑定,从P的runq中不断取出G,切换堆栈并执行,M本身不具备执行状态,在需要任务切换时,M将堆栈状态写回G,任何其它M都能据此恢复执行。

schedule

调度始于Go bootstrap过程的mstart,每一轮调度,实际就是一次schedule函数的调用。
该函数定义在go/src/runtime/proc.go中。
本文针对调度器进行分析,仍然忽略以下特性,包括但不限于:

  • garbage collection
  • C Go
  • Linux signal处理
  • Trace操作
  • 栈操作
    一次调度的流程如下:
PHN2ZyBpZD0iZGpmNnB4MDFtdW8iIHdpZHRoPSIxMDAlIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHN0eWxlPSJtYXgtd2lkdGg6IDMwMC4zOTg0Mzc1cHg7IiB2aWV3Qm94PSIwIDAgMzAwLjM5ODQzNzUgOTc4LjE5ODQyNTI5Mjk2ODgiPjxzdHlsZT4KCgojZGpmNnB4MDFtdW8gLmxhYmVsIHsKICBmb250LWZhbWlseTogJ3RyZWJ1Y2hldCBtcycsIHZlcmRhbmEsIGFyaWFsOwogIGNvbG9yOiAjMzMzOyB9CgojZGpmNnB4MDFtdW8gLm5vZGUgcmVjdCwKI2RqZjZweDAxbXVvIC5ub2RlIGNpcmNsZSwKI2RqZjZweDAxbXVvIC5ub2RlIGVsb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5Ljc2NTYyNSIgaGVpZ2h0PSIzNi4yODEyNSI+PC9yZWN0PjxnIGNsYXNzPSJsYWJlbCIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoMCwwKSI+PGcgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoLTM5Ljg4MjgxMjUsLTguMTQwNjI1KSI+PHRleHQ+PHRzcGFuIHhtbDpzcGFjZT0icHJlc2VydmUiIGR5PSIxZW0iIHg9IjEiPnJlc2V0c3Bpbm5pbmc8L3RzcGFuPjwvdGV4dD48L2c+PC9nPjwvZz48ZyBjbGFzcz0ibm9kZSIgaWQ9IkYiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDE3Ni4yMDMxMjUsOTY0LjA1NzgwMDI5Mjk2ODgpIiBzdHlsZT0ib3BhY2l0eTogMTsiPjxyZWN0IHJ4PSIwIiByeT0iMCIgeD0iLTQ2LjA4NTkzNzUiIHk9Ii0xOC4xNDA2MjUiIHdpZHRoPSI5Mi4xNzE4NzUiIGhlaWdodD0iMzYuMjgxMjUiPjwvcmVjdD48ZyBjbGFzcz0ibGFiZWwiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDAsMCkiPjxnIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0zNi4wODU5Mzc1LC04LjE0MDYyNSkiPjx0ZXh0Pjx0c3BhbiB4bWw6c3BhY2U9InByZXNlcnZlIiBkeT0iMWVtIiB4PSIxIj5leGVjdXRlKGdwKTwvdHNwYW4+PC90ZXh0PjwvZz48L2c+PC9nPjwvZz48L2c+PC9nPjwvc3ZnPg==

globrunqget & runqget

这两个函数非常类似,一个从全局队列中取,一个从本地队列中取。取的时机各有不同。

globrunqget

Go调度器为了全局队列中的G不被饿死,没61次调度都会检查一下全局队列中的G,并取出运行。

PHN2ZyBpZD0iZDh5bzYzNGNnYWMiIHdpZHRoPSIxMDAlIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHN0eWxlPSJtYXgtd2lkdGg6IDM4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1IiB5PSItMTguMTQwNjI1IiB3aWR0aD0iMjYyLjM3NSIgaGVpZ2h0PSIzNi4yODEyNSI+PC9yZWN0PjxnIGNsYXNzPSJsYWJlbCIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoMCwwKSI+PGcgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoLTEyMS4xODc1LC04LjE0MDYyNSkiPjx0ZXh0Pjx0c3BhbiB4bWw6c3BhY2U9InByZXNlcnZlIiBkeT0iMWVtIiB4PSIxIj7ku45nbG9iYWwgcnVuceS4reWPluWHum7kuKpH77yM5pS+5YWlUOeahHJ1bnE8L3RzcGFuPjwvdGV4dD48L2c+PC9nPjwvZz48ZyBjbGFzcz0ibm9kZSIgaWQ9IkciIHRyYW5zZm9ybT0idHJhbnNsYXRlKDI1OS4xMjUsNTcyLjEwOTM3NSkiIHN0eWxlPSJvcGFjaXR5OiAxOyI+PHJlY3Qgcng9IjAiIHJ5PSIwIiB4PSItMzguMDA3ODEyNSIgeT0iLTE4LjE0MDYyNSIgd2lkdGg9Ijc2LjAxNTYyNSIgaGVpZ2h0PSIzNi4yODEyNSI+PC9yZWN0PjxnIGNsYXNzPSJsYWJlbCIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoMCwwKSI+PGcgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoLTI4LjAwNzgxMjUsLTguMTQwNjI1KSI+PHRleHQ+PHRzcGFuIHhtbDpzcGFjZT0icHJlc2VydmUiIGR5PSIxZW0iIHg9IjEiPnJldHVybiBncDwvdHNwYW4+PC90ZXh0PjwvZz48L2c+PC9nPjwvZz48L2c+PC9nPjwvc3ZnPg==

globrunqget的函数原型是:

func globrunqget(_p_ *p, max int32) *g

上图中n是要取出的G的个数。这里如果考虑max传入大于0的数,则n取值需要考虑:

  1. 不能超过runqsize,runqsize是此时global queue中G的个数
  2. 不能超过传入的max值
  3. 不能超过一个P的runqsize,该size定义在runtime2.go的type p声明中,当前值为256。
type p struct {
    ...
    runq     [256]guintptr
    ...
}

在schedule函数中globrunqget函数的max参数传入的是0,所以上述3个条件中的条件2就不用考虑了。

runqget

runqget会先查看P的runnext成员,如果有,则返回runnext指向的G
否则会取当前runqhead指向的runq数组的成员G。
runqhead和runqtail是两个int索引值。如果两值相等表示队列是空的。

findrunnable

findrunnable是一个阻塞型调用,来寻找runnable G。如果找不到,就会调用stopm,来休眠M。其基本流程如下:

PHN2ZyBpZD0iZDg1OXV1aGtkNnciIHdpZHRoPSIxMDAlIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHN0eWxlPSJtYXgtd2lkdGg6IDYxOC4zMDQ2ODc1cHg7IiB2aWV3Qm94PSIwIDAgNjE4LjMwNDY4NzUgODA3LjY1NjI1Ij48c3R5bGU+CgoKI2Q4NTl1dWhrZDZ3IC5sYWJlbCB7CiAgZm9udC1mYW1pbHk6ICd0cmVidWNoZXQgbXMnLCB2ZXJkYW5hLCBhcmlhbDsKICBjb2xvcjogIzMzMzsgfQoKI2Q4NTl1dWhrZDZ3IC5ub2RlIHJlY3QsCiNkODU5dXVoa2Q2dyAubm9kZSBjaXJjbGUsCiNkODU5dXVoa2Q2dyAubm9kZSBlbGxpcHNlLAojZDg1OXV1aGtkNncgLm5vZGUgcG9seWdvbiB7CiAgZmlsbDogI0VDRUNGRjsKICBzdHJva2U6ICM5MzcwREI7CiAgc3Ryb2tlLXdpZHRoOiAxcHg7IH0KCiNkODU5dXVoa2Q2dyAubm9kZS5jbGlja2FibGUgewogIGN1cnNvcjogcG9pbnRlcjsgfQoKI2Q4NTl1dWhrZDZ3IC5hcnJvd2hlYWRQYXRoIHsKICBmaWxsOiAjMzMzMzMzOyB9CgojZDg1OXV1aGtkNncgLmVkZ2VQYXRoIC5wYXRoIHsKICBzdHJva2U6ICMzMzMzMzM7CiAgc3Ryb2tlLXdpZHRoOiAxLjVweDsgfQoKI2Q4NTl1dWhrZDZ3IC5lZGdlTGFiZWwgewogIGJhY2tncm91bmQtY29sb3I6IC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leHQ+PHRzcGFuIHhtbDpzcGFjZT0icHJlc2VydmUiIGR5PSIxZW0iIHg9IjEiPmJlZm9yZSBzdG9wLCBjaGVjayBhbGwgUDwvdHNwYW4+PC90ZXh0PjwvZz48L2c+PC9nPjxnIGNsYXNzPSJub2RlIiBpZD0iSSIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoNDkwLjUxNTYyNSw3OTMuNTE1NjI1KSIgc3R5bGU9Im9wYWNpdHk6IDE7Ij48cmVjdCByeD0iMCIgcnk9IjAiIHg9Ii0yOC40NzY1NjI1IiB5PSItMTguMTQwNjI1IiB3aWR0aD0iNTYuOTUzMTI1IiBoZWlnaHQ9IjM2LjI4MTI1Ij48L3JlY3Q+PGcgY2xhc3M9ImxhYmVsIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgwLDApIj48ZyB0cmFuc2Zvcm09InRyYW5zbGF0ZSgtMTguNDc2NTYyNSwtOC4xNDA2MjUpIj48dGV4dD48dHNwYW4geG1sOnNwYWNlPSJwcmVzZXJ2ZSIgZHk9IjFlbSIgeD0iMSI+c3RvcG08L3RzcGFuPjwvdGV4dD48L2c+PC9nPjwvZz48L2c+PC9nPjwvZz48L3N2Zz4=

这里忽略了net poller,这是用来处理异步系统调用的一种方式。
以上流程中除了常规的global q和local q操作,还有一段关于stealing G的算法,称为Go Stealing Scheduler,可以参考Go's work-stealing scheduler。具体代码如下:

for i := 0; i < 4; i++ {
    for enum := stealOrder.start(fastrand()); !enum.done(); enum.next() {
        if sched.gcwaiting != 0 {
            goto top
        }
        stealRunNextG := i > 2 // first look for ready queues with more than 1 g
        if gp := runqsteal(_p_, allp[enum.position()], stealRunNextG); gp != nil {
            return gp, false
        }
    }
}

说实话代码没有很看懂:

  • 这个i = [0..4]是怎么回事儿?
  • 第二个for循环似乎采用随机数来随机获得相应的P,来steal G,但是为啥有个stealRunNextG := i > 2

stealRunNextG根据代码理解,应该是bool变量,表示是否从P的runnext成员获取G。
runqsteal会从runnext偷取G,或者会偷取P的runq中一半的G

resetspinning

这个函数将原先为true的_g_.m.spinning设为false。当全局都没有spinning的M了,则要唤醒idle P。没有spinning M表示所有的M要么在工作(处理G),要么在休眠。如果此时有idle P,表示有CPU空闲,则此时是一个好的时机来唤醒M处理更多的工作。
实际上GPM三者都有自己的状态机,G和P比较清晰,M的状态就比较模糊,到底M有几种状态,特别的是M会在何时spinning。后文会介绍。

execute

简单来看,execute只做了两件事:

  1. 切换G status:_Grunnalbe --> _Grunning
  2. 调用gogo(&gp.sched)

ARM平台的gogo函数实现在:go/src/runtime/asm_arm.s,是一个汇编函数。主要做了以下几件事情:

  • 设置TLS中的G
  • 做context switch
  • 跳转到对应的PC取运行

GPM的状态变迁

GPM的状态变迁可以参考Golang 中 goroutine 的调度一文中关于GPM的一生的章节。

G & P

对G和P不做过多的解释,状态机还是很清晰的。
G由newproc函数创建,遵循下面的状态变化

P由bootstrap过程的procresize创建,遵循下面的状态机变迁:

M的状态

这里不讨论特殊的M,例如:sysmon或者finalizer
普通的M由startm函数创建。其大致流程如下:

PHN2ZyBpZD0iZHZia2ltbHVyZGsiIHdpZHRoPSIxMDAlIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHN0eWxlPSJtYXgtd2lkdGg6IDM1Ny43MTA5Mzc1cHg7IiB2aWV3Qm94PSIwIDAgMzU3LjcxMDkzNzUgNTE2LjI1Ij48c3R5bGU+CgoKI2R2YmtpbWx1cmRrIC5sYWJlbCB7CiAgZm9udC1mYW1pbHk6ICd0cmVidWNoZXQgbXMnLCB2ZXJkYW5hLCBhcmlhbDsKICBjb2xvcjogIzMzMzsgfQoKI2R2YmtpbWx1cmRrIC5ub2RlIHJlY3QsCiNkdmJraW1sdXJkayAubm9kZSBjaXJjbGUsCiNkdmJraW1sdXJkayAubm9kZSBlbGxpcHNlLAojZHZia2ltbHVyZGsgLm5vZGUgcG9seWdvbiB7CiAgZmlsbDogI0VDRUNGRjsKICBzdHJva2U6ICM5MzcwREI7CiAgc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sLTguMTQwNjI1KSI+PHRleHQ+PHRzcGFuIHhtbDpzcGFjZT0icHJlc2VydmUiIGR5PSIxZW0iIHg9IjEiPm5vdGV3YWtldXAoJmFtcDttcC5wYXJrKTwvdHNwYW4+PC90ZXh0PjwvZz48L2c+PC9nPjwvZz48L2c+PC9nPjwvc3ZnPg==
M的创建

这里跟M状态有关的就是M的线程函数,但请注意下面这个fn并不是线程函数。

if spinning {
    // The caller incremented nmspinning, so set m.spinning in the new M.
    fn = mspinning
}

真正的线程函数在newosproc调用clone接口的时候传入。Linux平台的实现在os_linux.go中。如下:

func clone(flags int32, stk, mp, gp, fn unsafe.Pointer) int32

func newosproc(mp *m) {
    ...
	ret := clone(cloneFlags, stk, unsafe.Pointer(mp), unsafe.Pointer(mp.g0), unsafe.Pointer(funcPC(mstart)))
    ...
}

所以M的线程函数就是曾在bootstrap中出现过,运行M0的mstart函数。上面的mspinning函数在mstart1中被调用,它将线程设置为spinning状态。

idle M的管理

mget会去获取闲置的M。而所有的idle M并没有一个统一的保存位置,而是通过M.schedlink形成一个隐形的链表。看mput:

func mput(mp *m) {
	mp.schedlink = sched.midle
	sched.midle.set(mp)
	sched.nmidle++
    ...
}

假设调用了3次mput,那么此时的idle链表应该是这样的:

PHN2ZyBpZD0iZHU5dHBsMXdicDkiIHdpZHRoPSIxMDAlIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHN0eWxlPSJtYXgtd2lkdGg6IDYxMS4xNDA2MjVweDsiIHZpZXdCb3g9IjAgMCA2MTEuMTQwNjI1IDUyLjI4MTI1Ij48c3R5bGU+CgoKI2R1OXRwbDF3YnA5IC5sYWJlbCB7CiAgZm9udC1mYW1pbHk6ICd0cmVidWNoZXQgbXMnLCB2ZXJkYW5hLCBhcmlhbDsKICBjb2xvcjogIzMzMzsgfQoKI2R1OXRwbDF3YnA5IC5ub2RlIHJlY3QsCiNkdTl0cGwxd2JwOSAubm9kZSBjaXJjbGUsCiNkdTl0cGwxd2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xNDA2MjUiIHdpZHRoPSIyNy4zNDM3NSIgaGVpZ2h0PSIzNi4yODEyNSI+PC9yZWN0PjxnIGNsYXNzPSJsYWJlbCIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoMCwwKSI+PGcgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoLTMuNjcxODc1LC04LjE0MDYyNSkiPjx0ZXh0Pjx0c3BhbiB4bWw6c3BhY2U9InByZXNlcnZlIiBkeT0iMWVtIiB4PSIxIj4wPC90c3Bhbj48L3RleHQ+PC9nPjwvZz48L2c+PC9nPjwvZz48L2c+PC9zdmc+
M的状态变迁

M在创建的时候会被设置成spinning状态。还有其他的spinning状态吗?
有:

  1. 当findrunnable准备进入stealing scheduler时,会先设置spinning
  2. 当findrunnable查找allp时,发现还有G,要重新回到循环来获取G

所以可以总结的是M的spinning是一种忙等的状态,而且它不是一个那么重要的状态,它可以看作一种系统的性能指标。如果spinning状态的M太多了,说明正常工作的M太少了。系统会组织M进入spinning状态。

// If number of spinning M's >= number of busy P's, block.
// This is necessary to prevent excessive CPU consumption
// when GOMAXPROCS>>1 but the program parallelism is low.
if !_g_.m.spinning && 2*atomic.Load(&sched.nmspinning) >= procs-atomic.Load(&sched.npidle) {
    goto stop
}

那么M什么时候离开spinning状态呢?有这几种情况:

  1. schedule中,M即将开始运行G,resetspinning将其spinning标志位设为false
  2. findrunnable没找到G,M即将调用stopm进入休眠状态

借用Golang 中 goroutine 的调度中的这张状态图:

这张图的状态变迁是正确的,但我觉得并不够贴切。因为对于M来说,没有很严格的状态变迁。只要知道M可以处于spinning状态,表示一种中间状态,在忙等待。而在正常工作和休眠的时候,都不是spinning。
M可以通过notesleep进入futexsleep状态,可以通过notewakeup唤醒休眠的M。

参考文献

%E6%9C%AC%E6%96%87%E5%9F%BA%E4%BA%8EGo%201.13%E3%80%82%0AGo%E6%8F%90%E4%BE%9B%E4%BA%86%E4%B8%80%E5%A5%97runtime%E6%9C%BA%E5%88%B6%EF%BC%8C%E6%9D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%B3%E7%9A%84%E3%80%82%0A%E6%9C%AC%E6%96%87%E4%B8%93%E6%B3%A8%E4%BA%8E%E5%88%86%E6%9E%90%E8%B0%83%E5%BA%A6%E6%A1%86%E6%9E%B6%EF%BC%8C%E4%BB%A5%E5%8F%8A%E4%B8%80%E4%BA%9B%E6%A1%86%E6%9E%B6%E7%9A%84%E5%AE%9E%E7%8E%B0%E7%BB%86%E8%8A%82%E3%80%82%E6%96%87%E6%9C%AB%E4%BC%9A%E5%88%97%E4%B8%BE%E6%88%91%E5%9C%A8%E9%98%85%E8%AF%BB%E6%97%B6%E5%8F%82%E8%80%83%E7%9A%84%E7%BD%91%E9%A1%B5%E9%93%BE%E6%8E%A5%E3%80%82%0A%5Btoc%5D%0A%23%23%20GPM%0AGo%E5%9F%BA%E4%BA%8EGPM%E8%BF%99%E4%B8%89%E4%B8%AAobject%E6%9D%A5%E7%BB%84%E7%BB%87%E8%B0%83%E5%BA%A6%E6%A1%86%E6%9E%B6%E3%80%82%E5%A4%A7%E8%87%B4%E7%BB%93%E6%9E%84%E5%A6%82%E4%B8%8B%EF%BC%9A%0A!%5B11413e494428c2540e349637f34bbec3.png%5D(evernotecid%3A%2F%2F22617523-9521-4D00-B771-5F27B85F00EB%2Fappyinxiangcom%2F161681%2FENResource%2Fp6067)%0A%E5%85%B6%E4%B8%AD%EF%BC%9A%0A-%20G%3A%20Gourtines%2C%20%E6%AF%8F%E4%B8%AAGoroutine%E5%AF%B9%E5%BA%94%E4%B8%80%E4%B8%AAG%E7%BB%93%E6%9E%84%E4%BD%93%EF%BC%8CG%E4%BF%9D%E5%AD%98Goroutine%E7%9A%84%E8%BF%90%E8%A1%8C%E5%A0%86%E6%A0%88%EF%BC%8C%E5%8D%B3%E5%B9%B6%E5%8F%91%E4%BB%BB%E5%8A%A1%E7%8A%B6%E6%80%81%E3%80%82%0A-%20P%3A%20Processors%2C%20%E7%90%86%E6%83%B3%E7%8A%B6%E6%80%81%E4%B8%8B%E4%B8%80%E4%B8%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D%AE%E8%B0%83%E5%BA%A6%EF%BC%8C%E5%AE%9E%E9%99%85%E5%B0%B1%E6%98%AF%E4%B8%80%E6%AC%A1schedule%E5%87%BD%E6%95%B0%E7%9A%84%E8%B0%83%E7%94%A8%E3%80%82%0A%E8%AF%A5%E5%87%BD%E6%95%B0%E5%AE%9A%E4%B9%89%E5%9C%A8go%2Fsrc%2Fruntime%2Fproc.go%E4%B8%AD%E3%80%82%0A%E6%9C%AC%E6%96%87%E9%92%88%E5%AF%B9%E8%B0%83%E5%BA%A6%E5%99%A8%E8%BF%9B%E8%A1%8C%E5%88%86%E6%9E%90%EF%BC%8C%E4%BB%8D%E7%84%B6%E5%BF%BD%E7%95%A5%E4%BB%A5%E4%B8%8B%E7%89%B9%E6%80%A7%EF%BC%8C%E5%8C%85%E6%8B%AC%E4%BD%86%E4%B8%8D%E9%99%90%E4%BA%8E%EF%BC%9A%0A-%20garbage%20collection%0A-%20C%20Go%0A-%20Linux%20signal%E5%A4%84%E7%90%86%0A-%20Trace%E6%93%8D%E4%BD%9C%0A-%20%E6%A0%88%E6%93%8D%E4%BD%9C%0A%E4%B8%80%E6%AC%A1%E8%B0%83%E5%BA%A6%E7%9A%84%E6%B5%81%E7%A8%8B%E5%A6%82%E4%B8%8B%EF%BC%9A%0A%60%60%60mermaid%0Agraph%20TD%0AA%5Bschedule%5D%20--%3E%20B%7Bschedtick%20%25%2061%20%3D%3D%200%20%3F%7D%0AB%20--%3E%20%7CN%7C%20D%0AB%20--%3E%20%7CY%7C%20C%5B%22globrunqget(_g_.m.p)%22%5D%0AC%20--%3E%7Cgp%20%3D%3D%20nil%7C%20D%5B%22runqget(_g_.m.p)%22%5D%0AD%20--%3E%7Cgp%20%3D%3D%20nil%7C%20E%5Bfindrunnable%5D%0AE%20--%3E%20G%7B_g_.m.spinning%20%3D%3D%201%20%3F%7D%0AG%20--%3E%20%7CY%7C%20H%5Bresetspinning%5D%0AH%20--%3E%20F%5B%22execute(gp)%22%5D%0AC%20--%3E%7Cgp%20!%3D%20nil%7C%20G%0AD%20--%3E%7Cgp%20!%3D%20nil%7C%20G%0AG%20--%3E%20%7CN%7C%20F%0A%60%60%60%0A%23%23%23%20globrunqget%20%26%20runqget%0A%E8%BF%99%E4%B8%A4%E4%B8%AA%E5%87%BD%E6%95%B0%E9%9D%9E%E5%B8%B8%E7%B1%BB%E4%BC%BC%EF%BC%8C%E4%B8%80%E4%B8%AA%E4%BB%8E%E5%85%A8%E5%B1%80%E9%98%9F%E5%88%97%E4%B8%AD%E5%8F%96%EF%BC%8C%E4%B8%80%E4%B8%AA%E4%BB%8E%E6%9C%AC%E5%9C%B0%E9%98%9F%E5%88%97%E4%B8%AD%E5%8F%96%E3%80%82%E5%8F%96%E7%9A%84%E6%97%B6%E6%9C%BA%E5%90%84%E6%9C%89%E4%B8%8D%E5%90%8C%E3%80%82%0A%23%23%23%23%20globrunqget%0AGo%E8%B0%83%E5%BA%A6%E5%99%A8%E4%B8%BA%E4%BA%86%E5%85%A8%E5%B1%80%E9%98%9F%E5%88%97%E4%B8%AD%E7%9A%84G%E4%B8%8D%E8%A2%AB%E9%A5%BF%E6%AD%BB%EF%BC%8C%E6%B2%A161%E6%AC%A1%E8%B0%83%E5%BA%A6%E9%83%BD%E4%BC%9A%E6%A3%80%E6%9F%A5%E4%B8%80%E4%B8%8B%E5%85%A8%E5%B1%80%E9%98%9F%E5%88%97%E4%B8%AD%E7%9A%84G%EF%BC%8C%E5%B9%B6%E5%8F%96%E5%87%BA%E8%BF%90%E8%A1%8C%E3%80%82%0A%60%60%60mermaid%0Agraph%20TD%0AA%5Bglobrunqget%5D%20--%3E%20%7C%22runqsize%20%3D%3D%200%22%7C%20H%5B%E8%BF%94%E5%9B%9Enil%5D%0AA%20--%3E%20%7C%22runqsize%20!%3D%200%22%7C%20B%5Bn%20%3A%3D%20sched.runqsize%2Fgomaxprocs%20%2B%201%5D%0AB%20--%3E%20C%5B%E8%AE%BE%E7%BD%AE%E5%90%88%E9%80%82%E7%9A%84n%E5%80%BC%5D%0AC%20--%3E%20D%5Brunqsize%20-%3D%20n%5D%0AD%20--%3E%20E%5B%22%E4%BB%8Erunq%E4%B8%ADpop%20G%EF%BC%8Cz%E4%BD%9C%E4%B8%BA%E8%BF%94%E5%9B%9E%E5%80%BC%22%5D%0AE%20--%3E%20F%5B%22%E4%BB%8Eglobal%20runq%E4%B8%AD%E5%8F%96%E5%87%BAn%E4%B8%AAG%EF%BC%8C%E6%94%BE%E5%85%A5P%E7%9A%84runq%22%5D%0AF%20--%3E%20G%5Breturn%20gp%5D%0A%60%60%60%0Aglobrunqget%E7%9A%84%E5%87%BD%E6%95%B0%E5%8E%9F%E5%9E%8B%E6%98%AF%EF%BC%9A%0A%60%60%60go%0Afunc%20globrunqget(_p_%20*p%2C%20max%20int32)%20*g%0A%60%60%60%0A%E4%B8%8A%E5%9B%BE%E4%B8%ADn%E6%98%AF%E8%A6%81%E5%8F%96%E5%87%BA%E7%9A%84G%E7%9A%84%E4%B8%AA%E6%95%B0%E3%80%82%E8%BF%99%E9%87%8C%E5%A6%82%E6%9E%9C%E8%80%83%E8%99%91max%E4%BC%A0%E5%85%A5%E5%A4%A7%E4%BA%8E0%E7%9A%84%E6%95%B0%EF%BC%8C%E5%88%99n%E5%8F%96%E5%80%BC%E9%9C%80%E8%A6%81%E8%80%83%E8%99%91%EF%BC%9A%0A1.%20%E4%B8%8D%E8%83%BD%E8%B6%85%E8%BF%87runqsize%EF%BC%8Crunqsize%E6%98%AF%E6%AD%A4%E6%97%B6global%20queue%E4%B8%ADG%E7%9A%84%E4%B8%AA%E6%95%B0%0A2.%20%E4%B8%8D%E8%83%BD%E8%B6%85%E8%BF%87%E4%BC%A0%E5%85%A5%E7%9A%84max%E5%80%BC%0A3.%20%E4%B8%8D%E8%83%BD%E8%B6%85%E8%BF%87%E4%B8%80%E4%B8%AAP%E7%9A%84runqsize%EF%BC%8C%E8%AF%A5size%E5%AE%9A%E4%B9%89%E5%9C%A8runtime2.go%E7%9A%84type%20p%E5%A3%B0%E6%98%8E%E4%B8%AD%2C%E5%BD%93%E5%89%8D%E5%80%BC%E4%B8%BA256%E3%80%82%0A%60%60%60go%0Atype%20p%20struct%20%7B%0A%20%20%20%20...%0A%20%20%20%20runq%20%20%20%20%20%5B256%5Dguintptr%0A%20%20%20%20...%0A%7D%0A%60%60%60%0A%E5%9C%A8schedule%E5%87%BD%E6%95%B0%E4%B8%ADglobrunqget%E5%87%BD%E6%95%B0%E7%9A%84max%E5%8F%82%E6%95%B0%E4%BC%A0%E5%85%A5%E7%9A%84%E6%98%AF0%EF%BC%8C%E6%89%80%E4%BB%A5%E4%B8%8A%E8%BF%B03%E4%B8%AA%E6%9D%A1%E4%BB%B6%E4%B8%AD%E7%9A%84%E6%9D%A1%E4%BB%B62%E5%B0%B1%E4%B8%8D%E7%94%A8%E8%80%83%E8%99%91%E4%BA%86%E3%80%82%0A%23%23%23%23%20runqget%0Arunqget%E4%BC%9A%E5%85%88%E6%9F%A5%E7%9C%8BP%E7%9A%84runnext%E6%88%90%E5%91%98%EF%BC%8C%E5%A6%82%E6%9E%9C%E6%9C%89%EF%BC%8C%E5%88%99%E8%BF%94%E5%9B%9Erunnext%E6%8C%87%E5%90%91%E7%9A%84G%0A%E5%90%A6%E5%88%99%E4%BC%9A%E5%8F%96%E5%BD%93%E5%89%8Drunqhead%E6%8C%87%E5%90%91%E7%9A%84runq%E6%95%B0%E7%BB%84%E7%9A%84%E6%88%90%E5%91%98G%E3%80%82%0Arunqhead%E5%92%8Crunqtail%E6%98%AF%E4%B8%A4%E4%B8%AAint%E7%B4%A2%E5%BC%95%E5%80%BC%E3%80%82%E5%A6%82%E6%9E%9C%E4%B8%A4%E5%80%BC%E7%9B%B8%E7%AD%89%E8%A1%A8%E7%A4%BA%E9%98%9F%E5%88%97%E6%98%AF%E7%A9%BA%E7%9A%84%E3%80%82%0A%0A%23%23%23%20findrunnable%0Afindrunnable%E6%98%AF%E4%B8%80%E4%B8%AA%E9%98%BB%E5%A1%9E%E5%9E%8B%E8%B0%83%E7%94%A8%EF%BC%8C%E6%9D%A5%E5%AF%BB%E6%89%BErunnable%20G%E3%80%82%E5%A6%82%E6%9E%9C%E6%89%BE%E4%B8%8D%E5%88%B0%EF%BC%8C%E5%B0%B1%E4%BC%9A%E8%B0%83%E7%94%A8stopm%EF%BC%8C%E6%9D%A5%E4%BC%91%E7%9C%A0M%E3%80%82%E5%85%B6%E5%9F%BA%E6%9C%AC%E6%B5%81%E7%A8%8B%E5%A6%82%E4%B8%8B%EF%BC%9A%0A%60%60%60mermaid%0Agraph%20TD%0AA%5Bfindrunnable%5D%20--%3E%20B%5B%22runqget(_p_)%22%5D%0AB%20--%3E%20%7Cno%20G%7C%20C%5B%22globrunqget(_p_%2C%20max%3D0)%22%5D%0AB%20--%3E%20%7Chas%20G%7C%20J%5Breturn%5D%0AC%20--%3E%20%7Cno%20G%7C%20D%5Bsteal%20G%20from%20other%20P%5D%0AD%20--%3E%20%7Cno%20G%7C%20E%5Bgoing%20to%20stop%5D%0AE%20--%3E%20F%5Bbefore%20stop%2C%20check%20globrunqget%5D%0AF%20--%3E%20G%5B%22pidleput(_p_)%22%5D%0AG%20--%3E%20H%5Bbefore%20stop%2C%20check%20all%20P%5D%0AH%20--%3E%20I%5Bstopm%5D%0AI%20--%3E%20%7Cwakeup%7C%20B%0AF%20--%3E%20%7Csched.runqsize%20!%3D%200%7C%20B%0AH%20--%3E%20%7C!runqempty%7C%20B%0A%0AC%20--%3E%20%7Chas%20G%7C%20J%0AD%20--%3E%20%7Chas%20G%7C%20J%0A%60%60%60%0A%E8%BF%99%E9%87%8C%E5%BF%BD%E7%95%A5%E4%BA%86net%20poller%EF%BC%8C%E8%BF%99%E6%98%AF%E7%94%A8%E6%9D%A5%E5%A4%84%E7%90%86%E5%BC%82%E6%AD%A5%E7%B3%BB%E7%BB%9F%E8%B0%83%E7%94%A8%E7%9A%84%E4%B8%80%E7%A7%8D%E6%96%B9%E5%BC%8F%E3%80%82%0A%E4%BB%A5%E4%B8%8A%E6%B5%81%E7%A8%8B%E4%B8%AD%E9%99%A4%E4%BA%86%E5%B8%B8%E8%A7%84%E7%9A%84global%20q%E5%92%8Clocal%20q%E6%93%8D%E4%BD%9C%EF%BC%8C%E8%BF%98%E6%9C%89%E4%B8%80%E6%AE%B5%E5%85%B3%E4%BA%8Estealing%20G%E7%9A%84%E7%AE%97%E6%B3%95%EF%BC%8C%E7%A7%B0%E4%B8%BAGo%20Stealing%20Scheduler%EF%BC%8C%E5%8F%AF%E4%BB%A5%E5%8F%82%E8%80%83%5BGo's%20work-stealing%20scheduler%5D(https%3A%2F%2Frakyll.org%2Fscheduler%2F)%E3%80%82%E5%85%B7%E4%BD%93%E4%BB%A3%E7%A0%81%E5%A6%82%E4%B8%8B%EF%BC%9A%0A%60%60%60go%0Afor%20i%20%3A%3D%200%3B%20i%20%3C%204%3B%20i%2B%2B%20%7B%0A%20%20%20%20for%20enum%20%3A%3D%20stealOrder.start(fastrand())%3B%20!enum.done()%3B%20enum.next()%20%7B%0A%20%20%20%20%20%20%20%20if%20sched.gcwaiting%20!%3D%200%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20goto%20top%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20stealRunNextG%20%3A%3D%20i%20%3E%202%20%2F%2F%20first%20look%20for%20ready%20queues%20with%20more%20than%201%20g%0A%20%20%20%20%20%20%20%20if%20gp%20%3A%3D%20runqsteal(_p_%2C%20allp%5Benum.position()%5D%2C%20stealRunNextG)%3B%20gp%20!%3D%20nil%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20return%20gp%2C%20false%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%0A%7D%0A%60%60%60%0A%E8%AF%B4%E5%AE%9E%E8%AF%9D%E4%BB%A3%E7%A0%81%E6%B2%A1%E6%9C%89%E5%BE%88%E7%9C%8B%E6%87%82%EF%BC%9A%0A-%20%E8%BF%99%E4%B8%AAi%20%3D%20%5B0..4%5D%E6%98%AF%E6%80%8E%E4%B9%88%E5%9B%9E%E4%BA%8B%E5%84%BF%EF%BC%9F%0A-%20%E7%AC%AC%E4%BA%8C%E4%B8%AAfor%E5%BE%AA%E7%8E%AF%E4%BC%BC%E4%B9%8E%E9%87%87%E7%94%A8%E9%9A%8F%E6%9C%BA%E6%95%B0%E6%9D%A5%E9%9A%8F%E6%9C%BA%E8%8E%B7%E5%BE%97%E7%9B%B8%E5%BA%94%E7%9A%84P%EF%BC%8C%E6%9D%A5steal%20G%EF%BC%8C%E4%BD%86%E6%98%AF%E4%B8%BA%E5%95%A5%E6%9C%89%E4%B8%AA%60stealRunNextG%20%3A%3D%20i%20%3E%202%60%0A%0AstealRunNextG%E6%A0%B9%E6%8D%AE%E4%BB%A3%E7%A0%81%E7%90%86%E8%A7%A3%EF%BC%8C%E5%BA%94%E8%AF%A5%E6%98%AFbool%E5%8F%98%E9%87%8F%EF%BC%8C%E8%A1%A8%E7%A4%BA%E6%98%AF%E5%90%A6%E4%BB%8EP%E7%9A%84runnext%E6%88%90%E5%91%98%E8%8E%B7%E5%8F%96G%E3%80%82%0Arunqsteal%E4%BC%9A%E4%BB%8Erunnext%E5%81%B7%E5%8F%96G%EF%BC%8C%E6%88%96%E8%80%85%E4%BC%9A%E5%81%B7%E5%8F%96P%E7%9A%84runq%E4%B8%AD%E4%B8%80%E5%8D%8A%E7%9A%84G%0A%0A%23%23%23%20resetspinning%0A%E8%BF%99%E4%B8%AA%E5%87%BD%E6%95%B0%E5%B0%86%E5%8E%9F%E5%85%88%E4%B8%BAtrue%E7%9A%84_g_.m.spinning%E8%AE%BE%E4%B8%BAfalse%E3%80%82%E5%BD%93%E5%85%A8%E5%B1%80%E9%83%BD%E6%B2%A1%E6%9C%89spinning%E7%9A%84M%E4%BA%86%EF%BC%8C%E5%88%99%E8%A6%81%E5%94%A4%E9%86%92idle%20P%E3%80%82%E6%B2%A1%E6%9C%89spinning%20M%E8%A1%A8%E7%A4%BA%E6%89%80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%A2G%20status%EF%BC%9A_Grunnalbe%20--%3E%20%5C_Grunning%0A2.%20%E8%B0%83%E7%94%A8%60gogo(%26gp.sched)%60%0A%0AARM%E5%B9%B3%E5%8F%B0%E7%9A%84gogo%E5%87%BD%E6%95%B0%E5%AE%9E%E7%8E%B0%E5%9C%A8%EF%BC%9Ago%2Fsrc%2Fruntime%2Fasm_arm.s%EF%BC%8C%E6%98%AF%E4%B8%80%E4%B8%AA%E6%B1%87%E7%BC%96%E5%87%BD%E6%95%B0%E3%80%82%E4%B8%BB%E8%A6%81%E5%81%9A%E4%BA%86%E4%BB%A5%E4%B8%8B%E5%87%A0%E4%BB%B6%E4%BA%8B%E6%83%85%EF%BC%9A%0A-%20%E8%AE%BE%E7%BD%AETLS%E4%B8%AD%E7%9A%84G%0A-%20%E5%81%9Acontext%20switch%0A-%20%E8%B7%B3%E8%BD%AC%E5%88%B0%E5%AF%B9%E5%BA%94%E7%9A%84PC%E5%8F%96%E8%BF%90%E8%A1%8C%0A%0A%23%23%23%20GPM%E7%9A%84%E7%8A%B6%E6%80%81%E5%8F%98%E8%BF%81%0AGPM%E7%9A%84%E7%8A%B6%E6%80%81%E5%8F%98%E8%BF%81%E5%8F%AF%E4%BB%A5%E5%8F%82%E8%80%83%5BGolang%20%E4%B8%AD%20goroutine%20%E7%9A%84%E8%B0%83%E5%BA%A6%5D(https%3A%2F%2Fwww.ctolib.com%2Ftopics-133848.html)%E4%B8%80%E6%96%87%E4%B8%AD%E5%85%B3%E4%BA%8EGPM%E7%9A%84%E4%B8%80%E7%94%9F%E7%9A%84%E7%AB%A0%E8%8A%82%E3%80%82%0A%23%23%23%23%20G%20%26%20P%0A%E5%AF%B9G%E5%92%8CP%E4%B8%8D%E5%81%9A%E8%BF%87%E5%A4%9A%E7%9A%84%E8%A7%A3%E9%87%8A%EF%BC%8C%E7%8A%B6%E6%80%81%E6%9C%BA%E8%BF%98%E6%98%AF%E5%BE%88%E6%B8%85%E6%99%B0%E7%9A%84%E3%80%82%0AG%E7%94%B1newproc%E5%87%BD%E6%95%B0%E5%88%9B%E5%BB%BA%EF%BC%8C%E9%81%B5%E5%BE%AA%E4%B8%8B%E9%9D%A2%E7%9A%84%E7%8A%B6%E6%80%81%E5%8F%98%E5%8C%96%0A!%5Bf2c48d2f55f7311e173548cc09458871.png%5D(evernotecid%3A%2F%2F22617523-9521-4D00-B771-5F27B85F00EB%2Fappyinxiangcom%2F161681%2FENResource%2Fp6068)%0A%0AP%E7%94%B1bootstrap%E8%BF%87%E7%A8%8B%E7%9A%84procresize%E5%88%9B%E5%BB%BA%EF%BC%8C%E9%81%B5%E5%BE%AA%E4%B8%8B%E9%9D%A2%E7%9A%84%E7%8A%B6%E6%80%81%E6%9C%BA%E5%8F%98%E8%BF%81%EF%BC%9A%0A!%5B9e80b53de7666672eb5ce4e9174cdff6.png%5D(evernotecid%3A%2F%2F22617523-9521-4D00-B771-5F27B85F00EB%2Fappyinxiangcom%2F161681%2FENResource%2Fp6069)%0A%0A%23%23%23%23%20M%E7%9A%84%E7%8A%B6%E6%80%81%0A%E8%BF%99%E9%87%8C%E4%B8%8D%E8%AE%A8%E8%AE%BA%E7%89%B9%E6%AE%8A%E7%9A%84M%EF%BC%8C%E4%BE%8B%E5%A6%82%EF%BC%9Asysmon%E6%88%96%E8%80%85finalizer%0A%E6%99%AE%E9%80%9A%E7%9A%84M%E7%94%B1startm%E5%87%BD%E6%95%B0%E5%88%9B%E5%BB%BA%E3%80%82%E5%85%B6%E5%A4%A7%E8%87%B4%E6%B5%81%E7%A8%8B%E5%A6%82%E4%B8%8B%EF%BC%9A%0A%60%60%60mermaid%0Agraph%20TD%0AA%5B%22startm(_p_%2C%20spinning)%22%5D%20--%3E%7C_p_%20%3D%3D%20nil%7C%20B%5Bpidleget%5D%0AB%20--%3E%20%7Cfind%20idle%20P%7C%20C%5Bmget%5D%0AA%20--%3E%20C%0AB%20--%3E%20%7Cno%20idle%20P%7C%20G%5Breturn%5D%0AC%20--%3E%20%7Cmp%20%3D%3D%20nil%7C%20D%5Bnewm%5D%0AD%20--%3E%20G%0AC%20--%3E%20E%5B%22mp.nextp.set(_p_)%22%5D%0AE%20--%3E%20F%5B%22notewakeup(%26mp.park)%22%5D%0AF%20--%3E%20G%0A%60%60%60%0A%0A%23%23%23%23%23%20M%E7%9A%84%E5%88%9B%E5%BB%BA%0A%E8%BF%99%E9%87%8C%E8%B7%9FM%E7%8A%B6%E6%80%81%E6%9C%89%E5%85%B3%E7%9A%84%E5%B0%B1%E6%98%AFM%E7%9A%84%E7%BA%BF%E7%A8%8B%E5%87%BD%E6%95%B0%2C%E4%BD%86%E8%AF%B7%E6%B3%A8%E6%84%8F%E4%B8%8B%E9%9D%A2%E8%BF%99%E4%B8%AAfn%E5%B9%B6%E4%B8%8D%E6%98%AF%E7%BA%BF%E7%A8%8B%E5%87%BD%E6%95%B0%E3%80%82%0A%60%60%60go%0Aif%20spinning%20%7B%0A%20%20%20%20%2F%2F%20The%20caller%20incremented%20nmspinning%2C%20so%20set%20m.spinning%20in%20the%20new%20M.%0A%20%20%20%20fn%20%3D%20mspinning%0A%7D%0A%60%60%60%0A%E7%9C%9F%E6%AD%A3%E7%9A%84%E7%BA%BF%E7%A8%8B%E5%87%BD%E6%95%B0%E5%9C%A8newosproc%E8%B0%83%E7%94%A8clone%E6%8E%A5%E5%8F%A3%E7%9A%84%E6%97%B6%E5%80%99%E4%BC%A0%E5%85%A5%E3%80%82Linux%E5%B9%B3%E5%8F%B0%E7%9A%84%E5%AE%9E%E7%8E%B0%E5%9C%A8os_linux.go%E4%B8%AD%E3%80%82%E5%A6%82%E4%B8%8B%EF%BC%9A%0A%60%60%60go%0Afunc%20clone(flags%20int32%2C%20stk%2C%20mp%2C%20gp%2C%20fn%20unsafe.Pointer)%20int32%0A%0Afunc%20newosproc(mp%20*m)%20%7B%0A%20%20%20%20...%0A%09ret%20%3A%3D%20clone(cloneFlags%2C%20stk%2C%20unsafe.Pointer(mp)%2C%20unsafe.Pointer(mp.g0)%2C%20unsafe.Pointer(funcPC(mstart)))%0A%20%20%20%20...%0A%7D%0A%60%60%60%0A%E6%89%80%E4%BB%A5M%E7%9A%84%E7%BA%BF%E7%A8%8B%E5%87%BD%E6%95%B0%E5%B0%B1%E6%98%AF%E6%9B%BE%E5%9C%A8bootstrap%E4%B8%AD%E5%87%BA%E7%8E%B0%E8%BF%87%EF%BC%8C%E8%BF%90%E8%A1%8CM0%E7%9A%84mstart%E5%87%BD%E6%95%B0%E3%80%82%E4%B8%8A%E9%9D%A2%E7%9A%84mspinning%E5%87%BD%E6%95%B0%E5%9C%A8mstart1%E4%B8%AD%E8%A2%AB%E8%B0%83%E7%94%A8%EF%BC%8C%E5%AE%83%E5%B0%86%E7%BA%BF%E7%A8%8B%E8%AE%BE%E7%BD%AE%E4%B8%BAspinning%E7%8A%B6%E6%80%81%E3%80%82%0A%0A%23%23%23%23%23%20idle%20M%E7%9A%84%E7%AE%A1%E7%90%86%0Amget%E4%BC%9A%E5%8E%BB%E8%8E%B7%E5%8F%96%E9%97%B2%E7%BD%AE%E7%9A%84M%E3%80%82%E8%80%8C%E6%89%80%E6%9C%89%E7%9A%84idle%20M%E5%B9%B6%E6%B2%A1%E6%9C%89%E4%B8%80%E4%B8%AA%E7%BB%9F%E4%B8%80%E7%9A%84%E4%BF%9D%E5%AD%98%E4%BD%8D%E7%BD%AE%EF%BC%8C%E8%80%8C%E6%98%AF%E9%80%9A%E8%BF%87M.schedlink%E5%BD%A2%E6%88%90%E4%B8%80%E4%B8%AA%E9%9A%90%E5%BD%A2%E7%9A%84%E9%93%BE%E8%A1%A8%E3%80%82%E7%9C%8Bmput%EF%BC%9A%0A%60%60%60go%0Afunc%20mput(mp%20*m)%20%7B%0A%09mp.schedlink%20%3D%20sched.midle%0A%09sched.midle.set(mp)%0A%09sched.nmidle%2B%2B%0A%20%20%20%20...%0A%7D%0A%60%60%60%0A%E5%81%87%E8%AE%BE%E8%B0%83%E7%94%A8%E4%BA%863%E6%AC%A1mput%EF%BC%8C%E9%82%A3%E4%B9%88%E6%AD%A4%E6%97%B6%E7%9A%84idle%E9%93%BE%E8%A1%A8%E5%BA%94%E8%AF%A5%E6%98%AF%E8%BF%99%E6%A0%B7%E7%9A%84%EF%BC%9A%0A%60%60%60mermaid%0Agraph%20LR%0AA%5Bsched%5D%20--%3E%7Cmidle%7C%20B%5BM1%5D%0AB%20--%3E%20%7Cschedlink%7C%20C%5BM2%5D%0AC%20--%3E%20%7Cschedlink%7C%20D%5BM3%5D%0AD%20--%3E%20%7Cschedlink%7C%20E%5B0%5D%0A%60%60%60%0A%0A%23%23%23%23%23%20M%E7%9A%84%E7%8A%B6%E6%80%81%E5%8F%98%E8%BF%81%0AM%E5%9C%A8%E5%88%9B%E5%BB%BA%E7%9A%84%E6%97%B6%E5%80%99%E4%BC%9A%E8%A2%AB%E8%AE%BE%E7%BD%AE%E6%88%90spinning%E7%8A%B6%E6%80%81%E3%80%82%E8%BF%98%E6%9C%89%E5%85%B6%E4%BB%96%E7%9A%84spinning%E7%8A%B6%E6%80%81%E5%90%97%EF%BC%9F%0A%E6%9C%89%EF%BC%9A%0A1.%20%E5%BD%93findrunnable%E5%87%86%E5%A4%87%E8%BF%9B%E5%85%A5stealing%20scheduler%E6%97%B6%EF%BC%8C%E4%BC%9A%E5%85%88%E8%AE%BE%E7%BD%AEspinning%0A2.%20%E5%BD%93findrunnable%E6%9F%A5%E6%89%BEallp%E6%97%B6%EF%BC%8C%E5%8F%91%E7%8E%B0%E8%BF%98%E6%9C%89G%EF%BC%8C%E8%A6%81%E9%87%8D%E6%96%B0%E5%9B%9E%E5%88%B0%E5%BE%AA%E7%8E%AF%E6%9D%A5%E8%8E%B7%E5%8F%96G%0A%0A%E6%89%80%E4%BB%A5%E5%8F%AF%E4%BB%A5%E6%80%BB%E7%BB%93%E7%9A%84%E6%98%AFM%E7%9A%84spinning%E6%98%AF%E4%B8%80%E7%A7%8D%E5%BF%99%E7%AD%89%E7%9A%84%E7%8A%B6%E6%80%81%EF%BC%8C%E8%80%8C%E4%B8%94%E5%AE%83%E4%B8%8D%E6%98%AF%E4%B8%80%E4%B8%AA%E9%82%A3%E4%B9%88%E9%87%8D%E8%A6%81%E7%9A%84%E7%8A%B6%E6%80%81%EF%BC%8C%E5%AE%83%E5%8F%AF%E4%BB%A5%E7%9C%8B%E4%BD%9C%E4%B8%80%E7%A7%8D%E7%B3%BB%E7%BB%9F%E7%9A%84%E6%80%A7%E8%83%BD%E6%8C%87%E6%A0%87%E3%80%82%E5%A6%82%E6%9E%9Cspinning%E7%8A%B6%E6%80%81%E7%9A%84M%E5%A4%AA%E5%A4%9A%E4%BA%86%EF%BC%8C%E8%AF%B4%E6%98%8E%E6%AD%A3%E5%B8%B8%E5%B7%A5%E4%BD%9C%E7%9A%84M%E5%A4%AA%E5%B0%91%E4%BA%86%E3%80%82%E7%B3%BB%E7%BB%9F%E4%BC%9A%E7%BB%84%E7%BB%87M%E8%BF%9B%E5%85%A5spinning%E7%8A%B6%E6%80%81%E3%80%82%0A%60%60%60go%0A%2F%2F%20If%20number%20of%20spinning%20M's%20%3E%3D%20number%20of%20busy%20P's%2C%20block.%0A%2F%2F%20This%20is%20necessary%20to%20prevent%20excessive%20CPU%20consumption%0A%2F%2F%20when%20GOMAXPROCS%3E%3E1%20but%20the%20program%20parallelism%20is%20low.%0Aif%20!_g_.m.spinning%20%26%26%202*atomic.Load(%26sched.nmspinning)%20%3E%3D%20procs-atomic.Load(%26sched.npidle)%20%7B%0A%20%20%20%20goto%20stop%0A%7D%0A%60%60%60%0A%0A%E9%82%A3%E4%B9%88M%E4%BB%80%E4%B9%88%E6%97%B6%E5%80%99%E7%A6%BB%E5%BC%80spinning%E7%8A%B6%E6%80%81%E5%91%A2%EF%BC%9F%E6%9C%89%E8%BF%99%E5%87%A0%E7%A7%8D%E6%83%85%E5%86%B5%EF%BC%9A%0A1.%20schedule%E4%B8%AD%EF%BC%8CM%E5%8D%B3%E5%B0%86%E5%BC%80%E5%A7%8B%E8%BF%90%E8%A1%8CG%EF%BC%8Cresetspinning%E5%B0%86%E5%85%B6spinning%E6%A0%87%E5%BF%97%E4%BD%8D%E8%AE%BE%E4%B8%BAfalse%0A2.%20findrunnable%E6%B2%A1%E6%89%BE%E5%88%B0G%EF%BC%8CM%E5%8D%B3%E5%B0%86%E8%B0%83%E7%94%A8stopm%E8%BF%9B%E5%85%A5%E4%BC%91%E7%9C%A0%E7%8A%B6%E6%80%81%0A%0A%E5%80%9F%E7%94%A8%5BGolang%20%E4%B8%AD%20goroutine%20%E7%9A%84%E8%B0%83%E5%BA%A6%5D(https%3A%2F%2Fwww.ctolib.com%2Ftopics-133848.html)%E4%B8%AD%E7%9A%84%E8%BF%99%E5%BC%A0%E7%8A%B6%E6%80%81%E5%9B%BE%EF%BC%9A%0A!%5B55d559f0bfd46d4bfecb35a969213c1c.png%5D(evernotecid%3A%2F%2F22617523-9521-4D00-B771-5F27B85F00EB%2Fappyinxiangcom%2F161681%2FENResource%2Fp6070)%0A%0A%E8%BF%99%E5%BC%A0%E5%9B%BE%E7%9A%84%E7%8A%B6%E6%80%81%E5%8F%98%E8%BF%81%E6%98%AF%E6%AD%A3%E7%A1%AE%E7%9A%84%EF%BC%8C%E4%BD%86%E6%88%91%E8%A7%89%E5%BE%97%E5%B9%B6%E4%B8%8D%E5%A4%9F%E8%B4%B4%E5%88%87%E3%80%82%E5%9B%A0%E4%B8%BA%E5%AF%B9%E4%BA%8EM%E6%9D%A5%E8%AF%B4%EF%BC%8C%E6%B2%A1%E6%9C%89%E5%BE%88%E4%B8%A5%E6%A0%BC%E7%9A%84%E7%8A%B6%E6%80%81%E5%8F%98%E8%BF%81%E3%80%82%E5%8F%AA%E8%A6%81%E7%9F%A5%E9%81%93M%E5%8F%AF%E4%BB%A5%E5%A4%84%E4%BA%8Espinning%E7%8A%B6%E6%80%81%EF%BC%8C%E8%A1%A8%E7%A4%BA%E4%B8%80%E7%A7%8D%E4%B8%AD%E9%97%B4%E7%8A%B6%E6%80%81%EF%BC%8C%E5%9C%A8%E5%BF%99%E7%AD%89%E5%BE%85%E3%80%82%E8%80%8C%E5%9C%A8%E6%AD%A3%E5%B8%B8%E5%B7%A5%E4%BD%9C%E5%92%8C%E4%BC%91%E7%9C%A0%E7%9A%84%E6%97%B6%E5%80%99%EF%BC%8C%E9%83%BD%E4%B8%8D%E6%98%AFspinning%E3%80%82%0AM%E5%8F%AF%E4%BB%A5%E9%80%9A%E8%BF%87notesleep%E8%BF%9B%E5%85%A5futexsleep%E7%8A%B6%E6%80%81%EF%BC%8C%E5%8F%AF%E4%BB%A5%E9%80%9A%E8%BF%87notewakeup%E5%94%A4%E9%86%92%E4%BC%91%E7%9C%A0%E7%9A%84M%E3%80%82%0A%0A%23%23%20%E5%8F%82%E8%80%83%E6%96%87%E7%8C%AE%0A-%20%5BScheduling%20In%20Go%20%3A%20Part%20II%20-%20Go%20Scheduler%5D(https%3A%2F%2Fwww.ardanlabs.com%2Fblog%2F2018%2F08%2Fscheduling-in-go-part2.html)%0A-%20%5BGo%20%E8%B0%83%E5%BA%A6%E6%A8%A1%E5%9E%8B%5D(https%3A%2F%2Fwudaijun.com%2F2018%2F01%2Fgo-scheduler%2F)%0A-%20%5BGo's%20work-stealing%20scheduler%5D(https%3A%2F%2Frakyll.org%2Fscheduler%2F)%0A-%20%5BGolang%20%E4%B8%AD%20goroutine%20%E7%9A%84%E8%B0%83%E5%BA%A6%5D(https%3A%2F%2Fwww.ctolib.com%2Ftopics-133848.html)