{"action":"created","comment":{"url":"https://api.github.com/repos/squid-cache/squid/pulls/comments/199351806","pull_request_review_id":133456333,"id":199351806,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5OTM1MTgwNg==","diff_hunk":"@@ -168,7 +168,7 @@ Comm::SetSelect(int fd, unsigned int type, PF * handler, void *client_data, time\n {\n     fde *F = &fd_table[fd];\n     assert(fd >= 0);\n-    assert(F->flags.open);\n+    assert(F->flags.open || (!handler && !client_data));","path":"src/comm/ModKqueue.cc","position":5,"original_position":5,"commit_id":"461ce1f70601368a8dfe165c8a8019e9abfb4cf3","original_commit_id":"461ce1f70601368a8dfe165c8a8019e9abfb4cf3","user":{"login":"yadij","id":9123754,"node_id":"MDQ6VXNlcjkxMjM3NTQ=","avatar_url":"https://avatars0.githubusercontent.com/u/9123754?v=4","gravatar_id":"","url":"https://api.github.com/users/yadij","html_url":"https://github.com/yadij","followers_url":"https://api.github.com/users/yadij/followers","following_url":"https://api.github.com/users/yadij/following{/other_user}","gists_url":"https://api.github.com/users/yadij/gists{/gist_id}","starred_url":"https://api.github.com/users/yadij/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yadij/subscriptions","organizations_url":"https://api.github.com/users/yadij/orgs","repos_url":"https://api.github.com/users/yadij/repos","events_url":"https://api.github.com/users/yadij/events{/privacy}","received_events_url":"https://api.github.com/users/yadij/received_events","type":"User","site_admin":false},"body":"I don't think so. SetSelect supports changing the timeout when only FD number itself is known/knowable.","created_at":"2018-07-01T14:44:50Z","updated_at":"2018-07-01T14:44:50Z","html_url":"https://github.com/squid-cache/squid/pull/235#discussion_r199351806","pull_request_url":"https://api.github.com/repos/squid-cache/squid/pulls/235","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/squid-cache/squid/pulls/comments/199351806"},"html":{"href":"https://github.com/squid-cache/squid/pull/235#discussion_r199351806"},"pull_request":{"href":"https://api.github.com/repos/squid-cache/squid/pulls/235"}},"in_reply_to_id":199334156},"pull_request":{"url":"https://api.github.com/repos/squid-cache/squid/pulls/235","id":198470072,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk4NDcwMDcy","html_url":"https://github.com/squid-cache/squid/pull/235","diff_url":"https://github.com/squid-cache/squid/pull/235.diff","patch_url":"https://github.com/squid-cache/squid/pull/235.patch","issue_url":"https://api.github.com/repos/squid-cache/squid/issues/235","number":235,"state":"open","locked":false,"title":"Optimization: Fewer epoll(2) system calls when closing a socket","user":{"login":"eduard-bagdasaryan","id":13069213,"node_id":"MDQ6VXNlcjEzMDY5MjEz","avatar_url":"https://avatars3.githubusercontent.com/u/13069213?v=4","gravatar_id":"","url":"https://api.github.com/users/eduard-bagdasaryan","html_url":"https://github.com/eduard-bagdasaryan","followers_url":"https://api.github.com/users/eduard-bagdasaryan/followers","following_url":"https://api.github.com/users/eduard-bagdasaryan/following{/other_user}","gists_url":"https://api.github.com/users/eduard-bagdasaryan/gists{/gist_id}","starred_url":"https://api.github.com/users/eduard-bagdasaryan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eduard-bagdasaryan/subscriptions","organizations_url":"https://api.github.com/users/eduard-bagdasaryan/orgs","repos_url":"https://api.github.com/users/eduard-bagdasaryan/repos","events_url":"https://api.github.com/users/eduard-bagdasaryan/events{/privacy}","received_events_url":"https://api.github.com/users/eduard-bagdasaryan/received_events","type":"User","site_admin":false},"body":"Squid was calling epoll(2) twice to clear a socket interest. One call is\r\nmore than enough: Technically, close(2) is supposed to clear epoll(2)\r\nregistration for us, but I did not risk relying on that.\r\n\r\nIn other environments, socket interest changes are pooled together\r\nbefore being submitted to the OS, so Squid was doing a bit of extra\r\nwork, but not making (many) extra system calls AFAICT.\r\n\r\nAlso fixed (previously unused) Comm::ResetSelect() on these platforms:\r\n* epoll(2): The old resetting code did not clear our interest AFAICT.\r\n* kqueue(2): The old resetting code made no sense to me at all.\r\n* poll(2): There was no code at all.\r\n* select(Win32): There was no code at all.\r\n\r\nEven though Comm::ResetSelect() implementation is now the same for all\r\nplatforms, I did not make that code platform-agnostic because it is\r\npossible to optimize it further in platform-specific ways.","created_at":"2018-06-30T10:12:30Z","updated_at":"2018-07-01T14:44:50Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5818674bfd5cb5b318e761595abc03cc36844d54","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/squid-cache/squid/pulls/235/commits","review_comments_url":"https://api.github.com/repos/squid-cache/squid/pulls/235/comments","review_comment_url":"https://api.github.com/repos/squid-cache/squid/pulls/comments{/number}","comments_url":"https://api.github.com/repos/squid-cache/squid/issues/235/comments","statuses_url":"https://api.github.com/repos/squid-cache/squid/statuses/461ce1f70601368a8dfe165c8a8019e9abfb4cf3","head":{"label":"measurement-factory:SQUID-381-fewer-epoll-system-calls","ref":"SQUID-381-fewer-epoll-system-calls","sha":"461ce1f70601368a8dfe165c8a8019e9abfb4cf3","user":{"login":"measurement-factory","id":5461029,"node_id":"MDEyOk9yZ2FuaXphdGlvbjU0NjEwMjk=","avatar_url":"https://avatars1.githubusercontent.com/u/5461029?v=4","gravatar_id":"","url":"https://api.github.com/users/measurement-factory","html_url":"https://github.com/measurement-factory","followers_url":"https://api.github.com/users/measurement-factory/followers","following_url":"https://api.github.com/users/measurement-factory/following{/other_user}","gists_url":"https://api.github.com/users/measurement-factory/gists{/gist_id}","starred_url":"https://api.github.com/users/measurement-factory/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/measurement-factory/subscriptions","organizations_url":"https://api.github.com/users/measurement-factory/orgs","repos_url":"https://api.github.com/users/measurement-factory/repos","events_url":"https://api.github.com/users/measurement-factory/events{/privacy}","received_events_url":"https://api.github.com/users/measurement-factory/received_events","type":"Organization","site_admin":false},"repo":{"id":97358214,"node_id":"MDEwOlJlcG9zaXRvcnk5NzM1ODIxNA==","name":"squid","full_name":"measurement-factory/squid","owner":{"login":"measurement-factory","id":5461029,"node_id":"MDEyOk9yZ2FuaXphdGlvbjU0NjEwMjk=","avatar_url":"https://avatars1.githubusercontent.com/u/5461029?v=4","gravatar_id":"","url":"https://api.github.com/users/measurement-factory","html_url":"https://github.com/measurement-factory","followers_url":"https://api.github.com/users/measurement-factory/followers","following_url":"https://api.github.com/users/measurement-factory/following{/other_user}","gists_url":"https://api.github.com/users/measurement-factory/gists{/gist_id}","starred_url":"https://api.github.com/users/measurement-factory/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/measurement-factory/subscriptions","organizations_url":"https://api.github.com/users/measurement-factory/orgs","repos_url":"https://api.github.com/users/measurement-factory/repos","events_url":"https://api.github.com/users/measurement-factory/events{/privacy}","received_events_url":"https://api.github.com/users/measurement-factory/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/measurement-factory/squid","description":"Squid Web Proxy Cache","fork":true,"url":"https://api.github.com/repos/measurement-factory/squid","forks_url":"https://api.github.com/repos/measurement-factory/squid/forks","keys_url":"https://api.github.com/repos/measurement-factory/squid/keys{/key_id}","collaborators_url":"https://api.github.com/repos/measurement-factory/squid/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/measurement-factory/squid/teams","hooks_url":"https://api.github.com/repos/measurement-factory/squid/hooks","issue_events_url":"https://api.github.com/repos/measurement-factory/squid/issues/events{/number}","events_url":"https://api.github.com/repos/measurement-factory/squid/events","assignees_url":"https://api.github.com/repos/measurement-factory/squid/assignees{/user}","branches_url":"https://api.github.com/repos/measurement-factory/squid/branches{/branch}","tags_url":"https://api.github.com/repos/measurement-factory/squid/tags","blobs_url":"https://api.github.com/repos/measurement-factory/squid/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/measurement-factory/squid/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/measurement-factory/squid/git/refs{/sha}","trees_url":"https://api.github.com/repos/measurement-factory/squid/git/trees{/sha}","statuses_url":"https://api.github.com/repos/measurement-factory/squid/statuses/{sha}","languages_url":"https://api.github.com/repos/measurement-factory/squid/languages","stargazers_url":"https://api.github.com/repos/measurement-factory/squid/stargazers","contributors_url":"https://api.github.com/repos/measurement-factory/squid/contributors","subscribers_url":"https://api.github.com/repos/measurement-factory/squid/subscribers","subscription_url":"https://api.github.com/repos/measurement-factory/squid/subscription","commits_url":"https://api.github.com/repos/measurement-factory/squid/commits{/sha}","git_commits_url":"https://api.github.com/repos/measurement-factory/squid/git/commits{/sha}","comments_url":"https://api.github.com/repos/measurement-factory/squid/comments{/number}","issue_comment_url":"https://api.github.com/repos/measurement-factory/squid/issues/comments{/number}","contents_url":"https://api.github.com/repos/measurement-factory/squid/contents/{+path}","compare_url":"https://api.github.com/repos/measurement-factory/squid/compare/{base}...{head}","merges_url":"https://api.github.com/repos/measurement-factory/squid/merges","archive_url":"https://api.github.com/repos/measurement-factory/squid/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/measurement-factory/squid/downloads","issues_url":"https://api.github.com/repos/measurement-factory/squid/issues{/number}","pulls_url":"https://api.github.com/repos/measurement-factory/squid/pulls{/number}","milestones_url":"https://api.github.com/repos/measurement-factory/squid/milestones{/number}","notifications_url":"https://api.github.com/repos/measurement-factory/squid/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/measurement-factory/squid/labels{/name}","releases_url":"https://api.github.com/repos/measurement-factory/squid/releases{/id}","deployments_url":"https://api.github.com/repos/measurement-factory/squid/deployments","created_at":"2017-07-16T03:46:50Z","updated_at":"2018-06-28T23:16:22Z","pushed_at":"2018-06-30T10:07:22Z","git_url":"git://github.com/measurement-factory/squid.git","ssh_url":"git@github.com:measurement-factory/squid.git","clone_url":"https://github.com/measurement-factory/squid.git","svn_url":"https://github.com/measurement-factory/squid","homepage":"http://www.squid-cache.org/","size":170605,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":4,"license":{"key":"gpl-2.0","name":"GNU General Public License v2.0","spdx_id":"GPL-2.0","url":"https://api.github.com/licenses/gpl-2.0","node_id":"MDc6TGljZW5zZTg="},"forks":0,"open_issues":4,"watchers":0,"default_branch":"master"}},"base":{"label":"squid-cache:master","ref":"master","sha":"5810a9946568f69319ee79dc93c4795e47a07cd7","user":{"login":"squid-cache","id":363029,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM2MzAyOQ==","avatar_url":"https://avatars3.githubusercontent.com/u/363029?v=4","gravatar_id":"","url":"https://api.github.com/users/squid-cache","html_url":"https://github.com/squid-cache","followers_url":"https://api.github.com/users/squid-cache/followers","following_url":"https://api.github.com/users/squid-cache/following{/other_user}","gists_url":"https://api.github.com/users/squid-cache/gists{/gist_id}","starred_url":"https://api.github.com/users/squid-cache/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/squid-cache/subscriptions","organizations_url":"https://api.github.com/users/squid-cache/orgs","repos_url":"https://api.github.com/users/squid-cache/repos","events_url":"https://api.github.com/users/squid-cache/events{/privacy}","received_events_url":"https://api.github.com/users/squid-cache/received_events","type":"Organization","site_admin":false},"repo":{"id":24519987,"node_id":"MDEwOlJlcG9zaXRvcnkyNDUxOTk4Nw==","name":"squid","full_name":"squid-cache/squid","owner":{"login":"squid-cache","id":363029,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM2MzAyOQ==","avatar_url":"https://avatars3.githubusercontent.com/u/363029?v=4","gravatar_id":"","url":"https://api.github.com/users/squid-cache","html_url":"https://github.com/squid-cache","followers_url":"https://api.github.com/users/squid-cache/followers","following_url":"https://api.github.com/users/squid-cache/following{/other_user}","gists_url":"https://api.github.com/users/squid-cache/gists{/gist_id}","starred_url":"https://api.github.com/users/squid-cache/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/squid-cache/subscriptions","organizations_url":"https://api.github.com/users/squid-cache/orgs","repos_url":"https://api.github.com/users/squid-cache/repos","events_url":"https://api.github.com/users/squid-cache/events{/privacy}","received_events_url":"https://api.github.com/users/squid-cache/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/squid-cache/squid","description":"Squid Web Proxy Cache","fork":false,"url":"https://api.github.com/repos/squid-cache/squid","forks_url":"https://api.github.com/repos/squid-cache/squid/forks","keys_url":"https://api.github.com/repos/squid-cache/squid/keys{/key_id}","collaborators_url":"https://api.github.com/repos/squid-cache/squid/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/squid-cache/squid/teams","hooks_url":"https://api.github.com/repos/squid-cache/squid/hooks","issue_events_url":"https://api.github.com/repos/squid-cache/squid/issues/events{/number}","events_url":"https://api.github.com/repos/squid-cache/squid/events","assignees_url":"https://api.github.com/repos/squid-cache/squid/assignees{/user}","branches_url":"https://api.github.com/repos/squid-cache/squid/branches{/branch}","tags_url":"https://api.github.com/repos/squid-cache/squid/tags","blobs_url":"https://api.github.com/repos/squid-cache/squid/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/squid-cache/squid/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/squid-cache/squid/git/refs{/sha}","trees_url":"https://api.github.com/repos/squid-cache/squid/git/trees{/sha}","statuses_url":"https://api.github.com/repos/squid-cache/squid/statuses/{sha}","languages_url":"https://api.github.com/repos/squid-cache/squid/languages","stargazers_url":"https://api.github.com/repos/squid-cache/squid/stargazers","contributors_url":"https://api.github.com/repos/squid-cache/squid/contributors","subscribers_url":"https://api.github.com/repos/squid-cache/squid/subscribers","subscription_url":"https://api.github.com/repos/squid-cache/squid/subscription","commits_url":"https://api.github.com/repos/squid-cache/squid/commits{/sha}","git_commits_url":"https://api.github.com/repos/squid-cache/squid/git/commits{/sha}","comments_url":"https://api.github.com/repos/squid-cache/squid/comments{/number}","issue_comment_url":"https://api.github.com/repos/squid-cache/squid/issues/comments{/number}","contents_url":"https://api.github.com/repos/squid-cache/squid/contents/{+path}","compare_url":"https://api.github.com/repos/squid-cache/squid/compare/{base}...{head}","merges_url":"https://api.github.com/repos/squid-cache/squid/merges","archive_url":"https://api.github.com/repos/squid-cache/squid/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/squid-cache/squid/downloads","issues_url":"https://api.github.com/repos/squid-cache/squid/issues{/number}","pulls_url":"https://api.github.com/repos/squid-cache/squid/pulls{/number}","milestones_url":"https://api.github.com/repos/squid-cache/squid/milestones{/number}","notifications_url":"https://api.github.com/repos/squid-cache/squid/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/squid-cache/squid/labels{/name}","releases_url":"https://api.github.com/repos/squid-cache/squid/releases{/id}","deployments_url":"https://api.github.com/repos/squid-cache/squid/deployments","created_at":"2014-09-27T00:59:40Z","updated_at":"2018-06-30T20:56:13Z","pushed_at":"2018-07-01T10:12:24Z","git_url":"git://github.com/squid-cache/squid.git","ssh_url":"git@github.com:squid-cache/squid.git","clone_url":"https://github.com/squid-cache/squid.git","svn_url":"https://github.com/squid-cache/squid","homepage":"http://www.squid-cache.org/","size":161461,"stargazers_count":355,"watchers_count":355,"language":"C++","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":141,"mirror_url":null,"archived":false,"open_issues_count":25,"license":{"key":"gpl-2.0","name":"GNU General Public License v2.0","spdx_id":"GPL-2.0","url":"https://api.github.com/licenses/gpl-2.0","node_id":"MDc6TGljZW5zZTg="},"forks":141,"open_issues":25,"watchers":355,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/squid-cache/squid/pulls/235"},"html":{"href":"https://github.com/squid-cache/squid/pull/235"},"issue":{"href":"https://api.github.com/repos/squid-cache/squid/issues/235"},"comments":{"href":"https://api.github.com/repos/squid-cache/squid/issues/235/comments"},"review_comments":{"href":"https://api.github.com/repos/squid-cache/squid/pulls/235/comments"},"review_comment":{"href":"https://api.github.com/repos/squid-cache/squid/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/squid-cache/squid/pulls/235/commits"},"statuses":{"href":"https://api.github.com/repos/squid-cache/squid/statuses/461ce1f70601368a8dfe165c8a8019e9abfb4cf3"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"yadij"}}