Go SYSCALL
本文基于Go 1.13。
Golang runtime库有一套完全基于用户态的协程(goroutine)调度框架。为了配合协程调度框架,提升系统调用时的并发性能,Go对SYSCALL调用机制进行了封装。
通常一个系统调用,在类platform OS上都会进行地址空间的切换,这相当于一个大型的Context Switch,先不论具体是哪个SYSCALL,即使这样一次Context Switch的损耗也是很大的。所以Go的SYSCALL机制,利用了操作系统的并行计算(parallelism)来缓和这一开销,而将其对并发的损害降低。
TEXT ·Syscall(SB),NOSPLIT,$0-28
BL runtime·entersyscall(SB)
...
SWI $0
...
BL runtime·exitsyscall(SB)
Syscall总接口定义在操作系统相关的文件。Linux平台是go/src/syscall/asm_linux_arm.s
Go框架在真正的进内核调用系统调用前后进行接管,插入了配合调度的代码。
entersyscall
假设调用Syscall之前,GPM运行的状态如下图:
PM解绑
当调用了Syscall以后,进入entersyscall,P和M会解绑,变成下面这张图:
这张图不是很准确,当M1和P解绑时,M2并没有立即上位,P处于_Psyscall状态。P是否与新的M绑定由sysmon这个特殊M来完成。后面sysmon一节会专门介绍。
pp := _g_.m.p.ptr()
pp.m = 0
_g_.m.oldp.set(pp)
_g_.m.p = 0
此时原先的P被记入了m.oldp,未来会用到。
exitsyscall
当系统调用结束以后,调用Syscall的G需要归位
PHN2ZyBpZD0iZG1xZ2ppdWNrMXYiIHdpZHRoPSIxMDAlIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHN0eWxlPSJtYXgtd2lkdGg6IDM0Mi44OTA2MjVweDsiIHZpZXdCb3g9IjAgMCAzNDIuODkwNjI1IDMyNy40MDYyNSI+PHN0eWxlPgoKCiNkbXFnaml1Y2sxdiAubGFiZWwgewogIGZvbnQtZmFtaWx5OiAndHJlYnVjaGV0IG1zJywgdmVyZGFuYSwgYXJpYWw7CiAgY29sb3I6ICMzMzM7IH0KCiNkbXFnaml1Y2sxdiAubm9kZSByZWN0LAojZG1xZ2ppdWNrMXYgLm5vZGUgY2lyY2xlLAojZG1xZ2ppdWNrMXY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bnNsYXRlKDAsMCkiPjxnIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0xOC45Mzc1LC04LjE0MDYyNSkiPjx0ZXh0Pjx0c3BhbiB4bWw6c3BhY2U9InByZXNlcnZlIiBkeT0iMWVtIiB4PSIxIj5yZXR1cm48L3RzcGFuPjwvdGV4dD48L2c+PC9nPjwvZz48L2c+PC9nPjwvZz48L3N2Zz4=
这其中涉及两个重要函数:
- exitsyscallfast
- exitsyscall0
exitsyscallfast
该函数会尝试先绑定oldp,如果不成功,会在尝试其他idlep。M绑定P使用wirep函数。
如果P,M绑定成功,那么G是不需要切换任何队列,G会继续运行。
如果无法绑定,则会停止M,并找到地方放置G。这一过程在exitsyscall0。
exitsyscall0
PHN2ZyBpZD0iZHF5emhzenN2N2giIHdpZHRoPSIxMDAlIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHN0eWxlPSJtYXgtd2lkdGg6IDMxNC4xNzE4NzVweDsiIHZpZXdCb3g9IjAgMCAzMTQuMTcxODc1IDU4Ni4yNSI+PHN0eWxlPgoKCiNkcXl6aHN6c3Y3aCAubGFiZWwgewogIGZvbnQtZmFtaWx5OiAndHJlYnVjaGV0IG1zJywgdmVyZGFuYSwgYXJpYWw7CiAgY29sb3I6ICMzMzM7IH0KCiNkcXl6aHN6c3Y3aCAubm9kZSByZWN0LAojZHF5emhzenN2N2ggLm5vZGUgY2lyY2xlLAojZHF5emhzenN2N2ggLm5vZGUgZWxsaXBzZSwKI2RxeXpoc3pzdjdoIC5ub2RlIHBvbHlnb24gewogIGZpbGw6ICNFQ0VDRkY7CiAgc3Ryb2tlOiAjOTM3MERCOwogIHN0cm9rZS13aWR0aDogMXB4OyB9CgojZHF5emhzenN2N2ggLm5vZGUuY2xpY2thYmxlIHsKICBjdXJzb3I6IHBvaW50ZXI7IH0KCiNkcXl6aHN6c3Y3aCAuYXJyb3doZWFkUGF0aCB7CiAgZmlsbDogIzMzMzMzMzsgfQoKI2RxeXpoc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IxZW0iIHg9IjEiPnNjaGVkdWxlPC90c3Bhbj48L3RleHQ+PC9nPjwvZz48L2c+PGcgY2xhc3M9Im5vZGUiIGlkPSJJIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgyNDAuNTkzNzUsNDg1LjgyODEyNSkiIHN0eWxlPSJvcGFjaXR5OiAxOyI+PHJlY3Qgcng9IjAiIHJ5PSIwIiB4PSItNTYuOTc2NTYyNSIgeT0iLTE4LjE0MDYyNSIgd2lkdGg9IjExMy45NTMxMjUiIGhlaWdodD0iMzYuMjgxMjUiPjwvcmVjdD48ZyBjbGFzcz0ibGFiZWwiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDAsMCkiPjxnIHRyYW5zZm9ybT0idHJhbnNsYXRlKC00Ni45NzY1NjI1LC04LjE0MDYyNSkiPjx0ZXh0Pjx0c3BhbiB4bWw6c3BhY2U9InByZXNlcnZlIiBkeT0iMWVtIiB4PSIxIj5uZXZlciByZXR1cm4gLi4uPC90c3Bhbj48L3RleHQ+PC9nPjwvZz48L2c+PC9nPjwvZz48L2c+PC9zdmc+
exitsyscall0仍然会尝试获取P,如果能获取到,则会acquirep,acquirep会调用wirep完成P和M的绑定。之后调用execute函数,并且不会再返回。因为在execute G的时候,仍然会遇到调度点。
注:如果没有遇到调度点的情况没有想明白。
如果exitsyscall0仍然没有获取P,则会调用stopm来停止当前M,直到被唤醒。唤醒之后会直接进入调度。
sysmon
sysmon是一个由runtime启动的M,也叫监控线程,它无需P也可以运行,它每20us~10ms唤醒一次,主要执行:
- 释放闲置超过5分钟的span物理内存;
- 如果超过2分钟没有垃圾回收,强制执行;
- 将长时间未处理的netpoll结果添加到任务队列;
- 向长时间运行的G任务发出抢占调度;
- 收回因syscall长时间阻塞的P;
入口在src/runtime/proc.go:sysmon函数。
因为我主要关注的是Go调度框架,所以sysmon中关于GC,CGO,trace等部分都忽略掉了。所以只剩下retake函数。retake会对syscall和长时间运行的G进行接管。
retake
retake会遍历所有的P,即allp数组,做两件事。
- 抢占运行过久的G
- handoff处于_Psyscall过久的P
preempt G
这里表示在某一个P上,即一个某个CPU核上运行的G运行时间过于久。
判断G运行过久的方法是:
- retake传入的参数now = noontime()
- retake会记录每次调用retake的时间点在_p_.sysmontick.schedwhen中
- 如果
schedwhen+forcePreemptNS <= now
表示G运行过久,其中forcePreemptNS = 10ms
handoff P
与上一节类似,此处要判断P处于_Psyscall的时间过久。
每一次retake,记录时间到_p_.sysmontick.schedwhen。当发生下面的情况,则表示P处于_Psyscall时间太久:
syscallwhen+10*1000*1000 <= now
之后将P的状态切换为_Pidle,然后调用handoffp来绑定P和一个新的M。
实际上这里才完成了这幅图上M2与P的绑定: