We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6857406 commit 4973617Copy full SHA for 4973617
netpoll.md
@@ -397,6 +397,10 @@ func poll_runtime_pollOpen(fd uintptr) (*pollDesc, int) {
397
```go
398
func netpollopen(fd uintptr, pd *pollDesc) int32 {
399
var ev epollevent
400
+ // linux 下 epoll 采用了 ET 模式
401
+ // epoll 下用户可以 watch 的 descriptors 是有上限的
402
+ // 具体上限的查看及配置可以通过 /proc/sys/fs/epoll/max_user_watches 系统虚拟文件进行操作
403
+ // https://github.com/torvalds/linux/blob/v4.9/fs/eventpoll.c#L259-L263
404
ev.events = _EPOLLIN | _EPOLLOUT | _EPOLLRDHUP | _EPOLLET
405
*(**pollDesc)(unsafe.Pointer(&ev.data)) = pd
406
return -epollctl(epfd, _EPOLL_CTL_ADD, int32(fd), &ev)
0 commit comments