{"action":"created","comment":{"url":"https://api.github.com/repos/zfsonlinux/zfs/pulls/comments/83108509","pull_request_review_id":3963293,"id":83108509,"diff_hunk":"@@ -6676,6 +6721,10 @@ spa_sync(spa_t *spa, uint64_t txg)\n \n \tdsl_pool_sync_done(dp, txg);\n \n+\tmutex_enter(&spa->spa_alloc_lock);\n+\tVERIFY0(avl_numnodes(&spa->spa_alloc_tree));\n+\tmutex_exit(&spa->spa_alloc_lock);","path":"module/zfs/spa.c","position":116,"original_position":116,"commit_id":"15feb0f02144a5e3059cc680325eff1df6fa9081","original_commit_id":"15feb0f02144a5e3059cc680325eff1df6fa9081","user":{"login":"behlendorf","id":148917,"avatar_url":"https://avatars.githubusercontent.com/u/148917?v=3","gravatar_id":"","url":"https://api.github.com/users/behlendorf","html_url":"https://github.com/behlendorf","followers_url":"https://api.github.com/users/behlendorf/followers","following_url":"https://api.github.com/users/behlendorf/following{/other_user}","gists_url":"https://api.github.com/users/behlendorf/gists{/gist_id}","starred_url":"https://api.github.com/users/behlendorf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/behlendorf/subscriptions","organizations_url":"https://api.github.com/users/behlendorf/orgs","repos_url":"https://api.github.com/users/behlendorf/repos","events_url":"https://api.github.com/users/behlendorf/events{/privacy}","received_events_url":"https://api.github.com/users/behlendorf/received_events","type":"User","site_admin":false},"body":"Same.","created_at":"2016-10-12T22:01:54Z","updated_at":"2016-10-12T22:12:30Z","html_url":"https://github.com/zfsonlinux/zfs/pull/5258#discussion_r83108509","pull_request_url":"https://api.github.com/repos/zfsonlinux/zfs/pulls/5258","_links":{"self":{"href":"https://api.github.com/repos/zfsonlinux/zfs/pulls/comments/83108509"},"html":{"href":"https://github.com/zfsonlinux/zfs/pull/5258#discussion_r83108509"},"pull_request":{"href":"https://api.github.com/repos/zfsonlinux/zfs/pulls/5258"}}},"pull_request":{"url":"https://api.github.com/repos/zfsonlinux/zfs/pulls/5258","id":88730115,"html_url":"https://github.com/zfsonlinux/zfs/pull/5258","diff_url":"https://github.com/zfsonlinux/zfs/pull/5258.diff","patch_url":"https://github.com/zfsonlinux/zfs/pull/5258.patch","issue_url":"https://api.github.com/repos/zfsonlinux/zfs/issues/5258","number":5258,"state":"open","locked":false,"title":"OpenZFS 7090 - zfs should throttle allocations","user":{"login":"don-brady","id":12415697,"avatar_url":"https://avatars.githubusercontent.com/u/12415697?v=3","gravatar_id":"","url":"https://api.github.com/users/don-brady","html_url":"https://github.com/don-brady","followers_url":"https://api.github.com/users/don-brady/followers","following_url":"https://api.github.com/users/don-brady/following{/other_user}","gists_url":"https://api.github.com/users/don-brady/gists{/gist_id}","starred_url":"https://api.github.com/users/don-brady/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/don-brady/subscriptions","organizations_url":"https://api.github.com/users/don-brady/orgs","repos_url":"https://api.github.com/users/don-brady/repos","events_url":"https://api.github.com/users/don-brady/events{/privacy}","received_events_url":"https://api.github.com/users/don-brady/received_events","type":"User","site_admin":false},"body":"Authored by: George Wilson <george.wilson@delphix.com>\r\nReviewed by: Alex Reece <alex@delphix.com>\r\nReviewed by: Christopher Siden <christopher.siden@delphix.com>\r\nReviewed by: Dan Kimmel <dan.kimmel@delphix.com>\r\nReviewed by: Matthew Ahrens <mahrens@delphix.com>\r\nReviewed by: Paul Dagnelie <paul.dagnelie@delphix.com>\r\nReviewed by: Prakash Surya <prakash.surya@delphix.com>\r\nReviewed by: Sebastien Roy <sebastien.roy@delphix.com>\r\n\r\nApproved by: Matthew Ahrens <mahrens@delphix.com>\r\n\r\nWhen write I/Os are issued, they are issued in block order but the ZIO\r\npipeline will drive them asynchronously through the allocation stage\r\nwhich can result in blocks being allocated out-of-order. It would be\r\nnice to preserve as much of the logical order as possible.\r\n\r\nIn addition, the allocations are equally scattered across all top-level\r\nVDEVs but not all top-level VDEVs are created equally. The pipeline\r\nshould be able to detect devices that are more capable of handling\r\nallocations and should allocate more blocks to those devices. This\r\nallows for dynamic allocation distribution when devices are imbalanced\r\nas fuller devices will tend to be slower than empty devices.\r\n\r\nThe change includes a new pool-wide allocation queue which would\r\nthrottle and order allocations in the ZIO pipeline. The queue would be\r\nordered by issued time and offset and would provide an initial amount of\r\nallocation of work to each top-level vdev. The allocation logic utilizes\r\na reservation system to reserve allocations that will be performed by\r\nthe allocator. Once an allocation is successfully completed it's\r\nscheduled on a given top-level vdev. Each top-level vdev maintains a\r\nmaximum number of allocations that it can handle (mg_alloc_queue_depth).\r\nThe pool-wide reserved allocations (top-levels * mg_alloc_queue_depth)\r\nare distributed across the top-level vdevs metaslab groups and round\r\nrobin across all eligible metaslab groups to distribute the work. As\r\ntop-levels complete their work, they receive additional work from the\r\npool-wide allocation queue until the allocation queue is emptied.\r\n\r\nPorted-by: Don Brady <don.brady@intel.com>\r\nOpenZFS-issue: https://www.illumos.org/issues/7090\r\nOpenZFS-commit: https://github.com/openzfs/openzfs/commit/4756c3d7\r\n\r\nPorting Notes:\r\n\t- Maintained minimal stack in zio_done\r\n\t- Preserve linux-specific io sizes in zio_write_compress","created_at":"2016-10-10T20:58:32Z","updated_at":"2016-10-12T22:12:30Z","closed_at":null,"merged_at":null,"merge_commit_sha":"17195d6a65fdb4dc3de32cf868453b021e18c5bb","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/zfsonlinux/zfs/pulls/5258/commits","review_comments_url":"https://api.github.com/repos/zfsonlinux/zfs/pulls/5258/comments","review_comment_url":"https://api.github.com/repos/zfsonlinux/zfs/pulls/comments{/number}","comments_url":"https://api.github.com/repos/zfsonlinux/zfs/issues/5258/comments","statuses_url":"https://api.github.com/repos/zfsonlinux/zfs/statuses/15feb0f02144a5e3059cc680325eff1df6fa9081","head":{"label":"don-brady:allocation_throttle","ref":"allocation_throttle","sha":"15feb0f02144a5e3059cc680325eff1df6fa9081","user":{"login":"don-brady","id":12415697,"avatar_url":"https://avatars.githubusercontent.com/u/12415697?v=3","gravatar_id":"","url":"https://api.github.com/users/don-brady","html_url":"https://github.com/don-brady","followers_url":"https://api.github.com/users/don-brady/followers","following_url":"https://api.github.com/users/don-brady/following{/other_user}","gists_url":"https://api.github.com/users/don-brady/gists{/gist_id}","starred_url":"https://api.github.com/users/don-brady/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/don-brady/subscriptions","organizations_url":"https://api.github.com/users/don-brady/orgs","repos_url":"https://api.github.com/users/don-brady/repos","events_url":"https://api.github.com/users/don-brady/events{/privacy}","received_events_url":"https://api.github.com/users/don-brady/received_events","type":"User","site_admin":false},"repo":{"id":35576270,"name":"zfs","full_name":"don-brady/zfs","owner":{"login":"don-brady","id":12415697,"avatar_url":"https://avatars.githubusercontent.com/u/12415697?v=3","gravatar_id":"","url":"https://api.github.com/users/don-brady","html_url":"https://github.com/don-brady","followers_url":"https://api.github.com/users/don-brady/followers","following_url":"https://api.github.com/users/don-brady/following{/other_user}","gists_url":"https://api.github.com/users/don-brady/gists{/gist_id}","starred_url":"https://api.github.com/users/don-brady/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/don-brady/subscriptions","organizations_url":"https://api.github.com/users/don-brady/orgs","repos_url":"https://api.github.com/users/don-brady/repos","events_url":"https://api.github.com/users/don-brady/events{/privacy}","received_events_url":"https://api.github.com/users/don-brady/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/don-brady/zfs","description":"Native ZFS for Linux","fork":true,"url":"https://api.github.com/repos/don-brady/zfs","forks_url":"https://api.github.com/repos/don-brady/zfs/forks","keys_url":"https://api.github.com/repos/don-brady/zfs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/don-brady/zfs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/don-brady/zfs/teams","hooks_url":"https://api.github.com/repos/don-brady/zfs/hooks","issue_events_url":"https://api.github.com/repos/don-brady/zfs/issues/events{/number}","events_url":"https://api.github.com/repos/don-brady/zfs/events","assignees_url":"https://api.github.com/repos/don-brady/zfs/assignees{/user}","branches_url":"https://api.github.com/repos/don-brady/zfs/branches{/branch}","tags_url":"https://api.github.com/repos/don-brady/zfs/tags","blobs_url":"https://api.github.com/repos/don-brady/zfs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/don-brady/zfs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/don-brady/zfs/git/refs{/sha}","trees_url":"https://api.github.com/repos/don-brady/zfs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/don-brady/zfs/statuses/{sha}","languages_url":"https://api.github.com/repos/don-brady/zfs/languages","stargazers_url":"https://api.github.com/repos/don-brady/zfs/stargazers","contributors_url":"https://api.github.com/repos/don-brady/zfs/contributors","subscribers_url":"https://api.github.com/repos/don-brady/zfs/subscribers","subscription_url":"https://api.github.com/repos/don-brady/zfs/subscription","commits_url":"https://api.github.com/repos/don-brady/zfs/commits{/sha}","git_commits_url":"https://api.github.com/repos/don-brady/zfs/git/commits{/sha}","comments_url":"https://api.github.com/repos/don-brady/zfs/comments{/number}","issue_comment_url":"https://api.github.com/repos/don-brady/zfs/issues/comments{/number}","contents_url":"https://api.github.com/repos/don-brady/zfs/contents/{+path}","compare_url":"https://api.github.com/repos/don-brady/zfs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/don-brady/zfs/merges","archive_url":"https://api.github.com/repos/don-brady/zfs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/don-brady/zfs/downloads","issues_url":"https://api.github.com/repos/don-brady/zfs/issues{/number}","pulls_url":"https://api.github.com/repos/don-brady/zfs/pulls{/number}","milestones_url":"https://api.github.com/repos/don-brady/zfs/milestones{/number}","notifications_url":"https://api.github.com/repos/don-brady/zfs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/don-brady/zfs/labels{/name}","releases_url":"https://api.github.com/repos/don-brady/zfs/releases{/id}","deployments_url":"https://api.github.com/repos/don-brady/zfs/deployments","created_at":"2015-05-13T21:58:38Z","updated_at":"2016-03-16T23:19:41Z","pushed_at":"2016-10-10T20:57:23Z","git_url":"git://github.com/don-brady/zfs.git","ssh_url":"git@github.com:don-brady/zfs.git","clone_url":"https://github.com/don-brady/zfs.git","svn_url":"https://github.com/don-brady/zfs","homepage":"http://zfsonlinux.org/","size":32244,"stargazers_count":1,"watchers_count":1,"language":"C","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":1,"default_branch":"master"}},"base":{"label":"zfsonlinux:master","ref":"master","sha":"57f16600b981f38585a956ae674488640424f711","user":{"login":"zfsonlinux","id":575083,"avatar_url":"https://avatars.githubusercontent.com/u/575083?v=3","gravatar_id":"","url":"https://api.github.com/users/zfsonlinux","html_url":"https://github.com/zfsonlinux","followers_url":"https://api.github.com/users/zfsonlinux/followers","following_url":"https://api.github.com/users/zfsonlinux/following{/other_user}","gists_url":"https://api.github.com/users/zfsonlinux/gists{/gist_id}","starred_url":"https://api.github.com/users/zfsonlinux/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zfsonlinux/subscriptions","organizations_url":"https://api.github.com/users/zfsonlinux/orgs","repos_url":"https://api.github.com/users/zfsonlinux/repos","events_url":"https://api.github.com/users/zfsonlinux/events{/privacy}","received_events_url":"https://api.github.com/users/zfsonlinux/received_events","type":"Organization","site_admin":false},"repo":{"id":437011,"name":"zfs","full_name":"zfsonlinux/zfs","owner":{"login":"zfsonlinux","id":575083,"avatar_url":"https://avatars.githubusercontent.com/u/575083?v=3","gravatar_id":"","url":"https://api.github.com/users/zfsonlinux","html_url":"https://github.com/zfsonlinux","followers_url":"https://api.github.com/users/zfsonlinux/followers","following_url":"https://api.github.com/users/zfsonlinux/following{/other_user}","gists_url":"https://api.github.com/users/zfsonlinux/gists{/gist_id}","starred_url":"https://api.github.com/users/zfsonlinux/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zfsonlinux/subscriptions","organizations_url":"https://api.github.com/users/zfsonlinux/orgs","repos_url":"https://api.github.com/users/zfsonlinux/repos","events_url":"https://api.github.com/users/zfsonlinux/events{/privacy}","received_events_url":"https://api.github.com/users/zfsonlinux/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/zfsonlinux/zfs","description":"ZFS on Linux - the official OpenZFS implementation for Linux.","fork":false,"url":"https://api.github.com/repos/zfsonlinux/zfs","forks_url":"https://api.github.com/repos/zfsonlinux/zfs/forks","keys_url":"https://api.github.com/repos/zfsonlinux/zfs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/zfsonlinux/zfs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/zfsonlinux/zfs/teams","hooks_url":"https://api.github.com/repos/zfsonlinux/zfs/hooks","issue_events_url":"https://api.github.com/repos/zfsonlinux/zfs/issues/events{/number}","events_url":"https://api.github.com/repos/zfsonlinux/zfs/events","assignees_url":"https://api.github.com/repos/zfsonlinux/zfs/assignees{/user}","branches_url":"https://api.github.com/repos/zfsonlinux/zfs/branches{/branch}","tags_url":"https://api.github.com/repos/zfsonlinux/zfs/tags","blobs_url":"https://api.github.com/repos/zfsonlinux/zfs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/zfsonlinux/zfs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/zfsonlinux/zfs/git/refs{/sha}","trees_url":"https://api.github.com/repos/zfsonlinux/zfs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/zfsonlinux/zfs/statuses/{sha}","languages_url":"https://api.github.com/repos/zfsonlinux/zfs/languages","stargazers_url":"https://api.github.com/repos/zfsonlinux/zfs/stargazers","contributors_url":"https://api.github.com/repos/zfsonlinux/zfs/contributors","subscribers_url":"https://api.github.com/repos/zfsonlinux/zfs/subscribers","subscription_url":"https://api.github.com/repos/zfsonlinux/zfs/subscription","commits_url":"https://api.github.com/repos/zfsonlinux/zfs/commits{/sha}","git_commits_url":"https://api.github.com/repos/zfsonlinux/zfs/git/commits{/sha}","comments_url":"https://api.github.com/repos/zfsonlinux/zfs/comments{/number}","issue_comment_url":"https://api.github.com/repos/zfsonlinux/zfs/issues/comments{/number}","contents_url":"https://api.github.com/repos/zfsonlinux/zfs/contents/{+path}","compare_url":"https://api.github.com/repos/zfsonlinux/zfs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/zfsonlinux/zfs/merges","archive_url":"https://api.github.com/repos/zfsonlinux/zfs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/zfsonlinux/zfs/downloads","issues_url":"https://api.github.com/repos/zfsonlinux/zfs/issues{/number}","pulls_url":"https://api.github.com/repos/zfsonlinux/zfs/pulls{/number}","milestones_url":"https://api.github.com/repos/zfsonlinux/zfs/milestones{/number}","notifications_url":"https://api.github.com/repos/zfsonlinux/zfs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/zfsonlinux/zfs/labels{/name}","releases_url":"https://api.github.com/repos/zfsonlinux/zfs/releases{/id}","deployments_url":"https://api.github.com/repos/zfsonlinux/zfs/deployments","created_at":"2009-12-14T20:20:34Z","updated_at":"2016-10-12T18:49:08Z","pushed_at":"2016-10-12T20:24:03Z","git_url":"git://github.com/zfsonlinux/zfs.git","ssh_url":"git@github.com:zfsonlinux/zfs.git","clone_url":"https://github.com/zfsonlinux/zfs.git","svn_url":"https://github.com/zfsonlinux/zfs","homepage":"http://zfsonlinux.org/","size":60455,"stargazers_count":2082,"watchers_count":2082,"language":"C","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":520,"mirror_url":null,"open_issues_count":927,"forks":520,"open_issues":927,"watchers":2082,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/zfsonlinux/zfs/pulls/5258"},"html":{"href":"https://github.com/zfsonlinux/zfs/pull/5258"},"issue":{"href":"https://api.github.com/repos/zfsonlinux/zfs/issues/5258"},"comments":{"href":"https://api.github.com/repos/zfsonlinux/zfs/issues/5258/comments"},"review_comments":{"href":"https://api.github.com/repos/zfsonlinux/zfs/pulls/5258/comments"},"review_comment":{"href":"https://api.github.com/repos/zfsonlinux/zfs/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/zfsonlinux/zfs/pulls/5258/commits"},"statuses":{"href":"https://api.github.com/repos/zfsonlinux/zfs/statuses/15feb0f02144a5e3059cc680325eff1df6fa9081"}}}}
{"actor":{"display_login":"behlendorf"}}