看来,Kubernetes支持3类型的接入模式持续量:ReadWriteOnce
,ReadOnlyMany
,ReadWriteMany
.我真的很好奇使用ReadWriteOnce
模式卷的pod的调度程序策略.例如,我创建了一个具有pod num = 2的RC,我猜这两个pod将被安排到同一主机,因为它们使用具有ReadWriteOnce
模式的卷?我真的想知道这部分的源代码.
我正在阅读 golang(go1.6.2 linux/amd64) 的一些运行时代码,有人可以帮助我理解 runtime/stubs.go 文件中 getg() 函数的底层机制吗?
// getg returns the pointer to the current g.
// The compiler rewrites calls to this function into instructions
// that fetch the g directly (from TLS or from the dedicated register).
func getg() *g
Run Code Online (Sandbox Code Playgroud)
getg() 函数在这里如何操作?这个函数的主体是什么?