{"action":"created","comment":{"url":"https://api.github.com/repos/ofiwg/libfabric/pulls/comments/32576686","id":32576686,"diff_hunk":"@@ -2453,6 +2456,67 @@ static void sock_pe_poll(struct sock_pe *pe)\n \t}\n }\n \n+#ifndef __APPLE__\n+static void sock_thread_set_affinity(char *s)\n+{\n+\tchar *saveptra, *saveptrb, *saveptrc;\n+\tchar *a, *b, *c;\n+\tint j, first, last,stride;\n+\tcpu_set_t mycpuset;\n+\tpthread_t mythread;\n+\n+\tmythread = pthread_self();\n+\tCPU_ZERO(&mycpuset);\n+\n+\ta = strtok_r(s,\",\", &saveptra);\n+\twhile (a)\n+\t{\n+\t\tfirst = last = -1;\n+\t\tstride = 1;\n+\t\tb = strtok_r(a,\"-\",&saveptrb);\n+\t\tfirst = atoi(b);\n+\t\t/* Check for range delimiter */\n+\t\tif ((b = strtok_r(NULL,\"-\",&saveptrb)))\n+\t\t{\n+\t\t\tc = strtok_r(b,\":\",&saveptrc);\n+\t\t\tlast = atoi(c);\n+\t\t\t/* Check for stride */\n+\t\t\tif ((c = strtok_r(NULL,\":\",&saveptrc))) {\n+\t\t\t\tstride = atoi(c);\n+\t\t\t}\n+\t\t}\n+\t\t\n+\t\tif (last == -1)\n+\t\t\tlast = first;\n+\t\t\n+\t\tfor (j = first; j<= last; j+=stride)\n+\t\t\tCPU_SET(j, &mycpuset);\n+\t\ta =  strtok_r(NULL,\",\", &saveptra);\n+\t}\n+\t\n+\tj = pthread_setaffinity_np(mythread, sizeof(cpu_set_t), &mycpuset);\n+\tif (j != 0) \n+\t\tSOCK_LOG_ERROR(\"pthread_setaffinity_np failed\\n\");\n+}\n+#endif\n+\n+static void sock_pe_set_affinity (void)\n+{\n+\tchar *s;\n+\tfi_var_register(&sock_prov, \"pe_affinity\",\n+\t\t\t\"Which logical core(s) to be used for binding the progress thread\\n\" \\\n+\t\t\t\"(This option is currently not supported on OS X).\\n\" \\\n+\t\t\t\"\\tUsage: core_id_start[-core_id_end[:stride]][,<next_rule>]\");\n+\tif (fi_var_get_str(&sock_prov, \"pe_affinity\", &s) != FI_SUCCESS)\n+\t\treturn;\n+\t\n+#ifndef __APPLE__\n+\tsock_thread_set_affinity(s);\n+#else\n+\tSOCK_LOG_ERROR(\"*** FI_SOCKETS_PE_AFFINITY is not supported on OS X\\n\");","path":"prov/sockets/src/sock_progress.c","position":394,"original_position":394,"commit_id":"04229fd8261c7263d2102ab8237907efd0eca8ed","original_commit_id":"04229fd8261c7263d2102ab8237907efd0eca8ed","user":{"login":"jsquyres","id":617316,"avatar_url":"https://avatars.githubusercontent.com/u/617316?v=3","gravatar_id":"","url":"https://api.github.com/users/jsquyres","html_url":"https://github.com/jsquyres","followers_url":"https://api.github.com/users/jsquyres/followers","following_url":"https://api.github.com/users/jsquyres/following{/other_user}","gists_url":"https://api.github.com/users/jsquyres/gists{/gist_id}","starred_url":"https://api.github.com/users/jsquyres/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jsquyres/subscriptions","organizations_url":"https://api.github.com/users/jsquyres/orgs","repos_url":"https://api.github.com/users/jsquyres/repos","events_url":"https://api.github.com/users/jsquyres/events{/privacy}","received_events_url":"https://api.github.com/users/jsquyres/received_events","type":"User","site_admin":false},"body":"You're absolutely right.  Ignore my comment.  :-)","created_at":"2015-06-16T22:04:40Z","updated_at":"2015-06-16T22:04:40Z","html_url":"https://github.com/ofiwg/libfabric/pull/1071#discussion_r32576686","pull_request_url":"https://api.github.com/repos/ofiwg/libfabric/pulls/1071","_links":{"self":{"href":"https://api.github.com/repos/ofiwg/libfabric/pulls/comments/32576686"},"html":{"href":"https://github.com/ofiwg/libfabric/pull/1071#discussion_r32576686"},"pull_request":{"href":"https://api.github.com/repos/ofiwg/libfabric/pulls/1071"}}},"pull_request":{"url":"https://api.github.com/repos/ofiwg/libfabric/pulls/1071","id":37725986,"html_url":"https://github.com/ofiwg/libfabric/pull/1071","diff_url":"https://github.com/ofiwg/libfabric/pull/1071.diff","patch_url":"https://github.com/ofiwg/libfabric/pull/1071.patch","issue_url":"https://api.github.com/repos/ofiwg/libfabric/issues/1071","number":1071,"state":"open","locked":false,"title":"sockets: minor updates","user":{"login":"jithinjosepkl","id":6690627,"avatar_url":"https://avatars.githubusercontent.com/u/6690627?v=3","gravatar_id":"","url":"https://api.github.com/users/jithinjosepkl","html_url":"https://github.com/jithinjosepkl","followers_url":"https://api.github.com/users/jithinjosepkl/followers","following_url":"https://api.github.com/users/jithinjosepkl/following{/other_user}","gists_url":"https://api.github.com/users/jithinjosepkl/gists{/gist_id}","starred_url":"https://api.github.com/users/jithinjosepkl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jithinjosepkl/subscriptions","organizations_url":"https://api.github.com/users/jithinjosepkl/orgs","repos_url":"https://api.github.com/users/jithinjosepkl/repos","events_url":"https://api.github.com/users/jithinjosepkl/events{/privacy}","received_events_url":"https://api.github.com/users/jithinjosepkl/received_events","type":"User","site_admin":false},"body":"- Enable option to set affinity for progress thread \r\n - thanks Robichaux, Joseph <joseph.robichaux@intel.com> for the patch.\r\n- Change SOCK_LOG_INFO as debug logs\r\n- Add check for progress mode in sock_pe_signal\r\n\r\n@shantonu ","created_at":"2015-06-15T19:24:13Z","updated_at":"2015-06-16T22:04:40Z","closed_at":null,"merged_at":null,"merge_commit_sha":"94af0c6c6e6a7e34136a8d3fdb06e01b674efbe5","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/ofiwg/libfabric/pulls/1071/commits","review_comments_url":"https://api.github.com/repos/ofiwg/libfabric/pulls/1071/comments","review_comment_url":"https://api.github.com/repos/ofiwg/libfabric/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ofiwg/libfabric/issues/1071/comments","statuses_url":"https://api.github.com/repos/ofiwg/libfabric/statuses/04229fd8261c7263d2102ab8237907efd0eca8ed","head":{"label":"jithinjosepkl:pr/devel","ref":"pr/devel","sha":"04229fd8261c7263d2102ab8237907efd0eca8ed","user":{"login":"jithinjosepkl","id":6690627,"avatar_url":"https://avatars.githubusercontent.com/u/6690627?v=3","gravatar_id":"","url":"https://api.github.com/users/jithinjosepkl","html_url":"https://github.com/jithinjosepkl","followers_url":"https://api.github.com/users/jithinjosepkl/followers","following_url":"https://api.github.com/users/jithinjosepkl/following{/other_user}","gists_url":"https://api.github.com/users/jithinjosepkl/gists{/gist_id}","starred_url":"https://api.github.com/users/jithinjosepkl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jithinjosepkl/subscriptions","organizations_url":"https://api.github.com/users/jithinjosepkl/orgs","repos_url":"https://api.github.com/users/jithinjosepkl/repos","events_url":"https://api.github.com/users/jithinjosepkl/events{/privacy}","received_events_url":"https://api.github.com/users/jithinjosepkl/received_events","type":"User","site_admin":false},"repo":{"id":25373287,"name":"libfabric","full_name":"jithinjosepkl/libfabric","owner":{"login":"jithinjosepkl","id":6690627,"avatar_url":"https://avatars.githubusercontent.com/u/6690627?v=3","gravatar_id":"","url":"https://api.github.com/users/jithinjosepkl","html_url":"https://github.com/jithinjosepkl","followers_url":"https://api.github.com/users/jithinjosepkl/followers","following_url":"https://api.github.com/users/jithinjosepkl/following{/other_user}","gists_url":"https://api.github.com/users/jithinjosepkl/gists{/gist_id}","starred_url":"https://api.github.com/users/jithinjosepkl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jithinjosepkl/subscriptions","organizations_url":"https://api.github.com/users/jithinjosepkl/orgs","repos_url":"https://api.github.com/users/jithinjosepkl/repos","events_url":"https://api.github.com/users/jithinjosepkl/events{/privacy}","received_events_url":"https://api.github.com/users/jithinjosepkl/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jithinjosepkl/libfabric","description":"Open Fabric Interfaces","fork":true,"url":"https://api.github.com/repos/jithinjosepkl/libfabric","forks_url":"https://api.github.com/repos/jithinjosepkl/libfabric/forks","keys_url":"https://api.github.com/repos/jithinjosepkl/libfabric/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jithinjosepkl/libfabric/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jithinjosepkl/libfabric/teams","hooks_url":"https://api.github.com/repos/jithinjosepkl/libfabric/hooks","issue_events_url":"https://api.github.com/repos/jithinjosepkl/libfabric/issues/events{/number}","events_url":"https://api.github.com/repos/jithinjosepkl/libfabric/events","assignees_url":"https://api.github.com/repos/jithinjosepkl/libfabric/assignees{/user}","branches_url":"https://api.github.com/repos/jithinjosepkl/libfabric/branches{/branch}","tags_url":"https://api.github.com/repos/jithinjosepkl/libfabric/tags","blobs_url":"https://api.github.com/repos/jithinjosepkl/libfabric/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jithinjosepkl/libfabric/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jithinjosepkl/libfabric/git/refs{/sha}","trees_url":"https://api.github.com/repos/jithinjosepkl/libfabric/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jithinjosepkl/libfabric/statuses/{sha}","languages_url":"https://api.github.com/repos/jithinjosepkl/libfabric/languages","stargazers_url":"https://api.github.com/repos/jithinjosepkl/libfabric/stargazers","contributors_url":"https://api.github.com/repos/jithinjosepkl/libfabric/contributors","subscribers_url":"https://api.github.com/repos/jithinjosepkl/libfabric/subscribers","subscription_url":"https://api.github.com/repos/jithinjosepkl/libfabric/subscription","commits_url":"https://api.github.com/repos/jithinjosepkl/libfabric/commits{/sha}","git_commits_url":"https://api.github.com/repos/jithinjosepkl/libfabric/git/commits{/sha}","comments_url":"https://api.github.com/repos/jithinjosepkl/libfabric/comments{/number}","issue_comment_url":"https://api.github.com/repos/jithinjosepkl/libfabric/issues/comments{/number}","contents_url":"https://api.github.com/repos/jithinjosepkl/libfabric/contents/{+path}","compare_url":"https://api.github.com/repos/jithinjosepkl/libfabric/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jithinjosepkl/libfabric/merges","archive_url":"https://api.github.com/repos/jithinjosepkl/libfabric/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jithinjosepkl/libfabric/downloads","issues_url":"https://api.github.com/repos/jithinjosepkl/libfabric/issues{/number}","pulls_url":"https://api.github.com/repos/jithinjosepkl/libfabric/pulls{/number}","milestones_url":"https://api.github.com/repos/jithinjosepkl/libfabric/milestones{/number}","notifications_url":"https://api.github.com/repos/jithinjosepkl/libfabric/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jithinjosepkl/libfabric/labels{/name}","releases_url":"https://api.github.com/repos/jithinjosepkl/libfabric/releases{/id}","created_at":"2014-10-17T19:16:22Z","updated_at":"2015-04-11T16:17:09Z","pushed_at":"2015-06-16T21:06:56Z","git_url":"git://github.com/jithinjosepkl/libfabric.git","ssh_url":"git@github.com:jithinjosepkl/libfabric.git","clone_url":"https://github.com/jithinjosepkl/libfabric.git","svn_url":"https://github.com/jithinjosepkl/libfabric","homepage":null,"size":6795,"stargazers_count":0,"watchers_count":0,"language":"C","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"ofiwg:master","ref":"master","sha":"acb888d28f1293b21e55250b63ecf2c1c2c7902c","user":{"login":"ofiwg","id":8459445,"avatar_url":"https://avatars.githubusercontent.com/u/8459445?v=3","gravatar_id":"","url":"https://api.github.com/users/ofiwg","html_url":"https://github.com/ofiwg","followers_url":"https://api.github.com/users/ofiwg/followers","following_url":"https://api.github.com/users/ofiwg/following{/other_user}","gists_url":"https://api.github.com/users/ofiwg/gists{/gist_id}","starred_url":"https://api.github.com/users/ofiwg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ofiwg/subscriptions","organizations_url":"https://api.github.com/users/ofiwg/orgs","repos_url":"https://api.github.com/users/ofiwg/repos","events_url":"https://api.github.com/users/ofiwg/events{/privacy}","received_events_url":"https://api.github.com/users/ofiwg/received_events","type":"Organization","site_admin":false},"repo":{"id":22996097,"name":"libfabric","full_name":"ofiwg/libfabric","owner":{"login":"ofiwg","id":8459445,"avatar_url":"https://avatars.githubusercontent.com/u/8459445?v=3","gravatar_id":"","url":"https://api.github.com/users/ofiwg","html_url":"https://github.com/ofiwg","followers_url":"https://api.github.com/users/ofiwg/followers","following_url":"https://api.github.com/users/ofiwg/following{/other_user}","gists_url":"https://api.github.com/users/ofiwg/gists{/gist_id}","starred_url":"https://api.github.com/users/ofiwg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ofiwg/subscriptions","organizations_url":"https://api.github.com/users/ofiwg/orgs","repos_url":"https://api.github.com/users/ofiwg/repos","events_url":"https://api.github.com/users/ofiwg/events{/privacy}","received_events_url":"https://api.github.com/users/ofiwg/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ofiwg/libfabric","description":"Open Fabric Interfaces","fork":false,"url":"https://api.github.com/repos/ofiwg/libfabric","forks_url":"https://api.github.com/repos/ofiwg/libfabric/forks","keys_url":"https://api.github.com/repos/ofiwg/libfabric/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ofiwg/libfabric/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ofiwg/libfabric/teams","hooks_url":"https://api.github.com/repos/ofiwg/libfabric/hooks","issue_events_url":"https://api.github.com/repos/ofiwg/libfabric/issues/events{/number}","events_url":"https://api.github.com/repos/ofiwg/libfabric/events","assignees_url":"https://api.github.com/repos/ofiwg/libfabric/assignees{/user}","branches_url":"https://api.github.com/repos/ofiwg/libfabric/branches{/branch}","tags_url":"https://api.github.com/repos/ofiwg/libfabric/tags","blobs_url":"https://api.github.com/repos/ofiwg/libfabric/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ofiwg/libfabric/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ofiwg/libfabric/git/refs{/sha}","trees_url":"https://api.github.com/repos/ofiwg/libfabric/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ofiwg/libfabric/statuses/{sha}","languages_url":"https://api.github.com/repos/ofiwg/libfabric/languages","stargazers_url":"https://api.github.com/repos/ofiwg/libfabric/stargazers","contributors_url":"https://api.github.com/repos/ofiwg/libfabric/contributors","subscribers_url":"https://api.github.com/repos/ofiwg/libfabric/subscribers","subscription_url":"https://api.github.com/repos/ofiwg/libfabric/subscription","commits_url":"https://api.github.com/repos/ofiwg/libfabric/commits{/sha}","git_commits_url":"https://api.github.com/repos/ofiwg/libfabric/git/commits{/sha}","comments_url":"https://api.github.com/repos/ofiwg/libfabric/comments{/number}","issue_comment_url":"https://api.github.com/repos/ofiwg/libfabric/issues/comments{/number}","contents_url":"https://api.github.com/repos/ofiwg/libfabric/contents/{+path}","compare_url":"https://api.github.com/repos/ofiwg/libfabric/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ofiwg/libfabric/merges","archive_url":"https://api.github.com/repos/ofiwg/libfabric/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ofiwg/libfabric/downloads","issues_url":"https://api.github.com/repos/ofiwg/libfabric/issues{/number}","pulls_url":"https://api.github.com/repos/ofiwg/libfabric/pulls{/number}","milestones_url":"https://api.github.com/repos/ofiwg/libfabric/milestones{/number}","notifications_url":"https://api.github.com/repos/ofiwg/libfabric/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ofiwg/libfabric/labels{/name}","releases_url":"https://api.github.com/repos/ofiwg/libfabric/releases{/id}","created_at":"2014-08-15T16:45:53Z","updated_at":"2015-06-12T16:46:06Z","pushed_at":"2015-06-16T21:24:21Z","git_url":"git://github.com/ofiwg/libfabric.git","ssh_url":"git@github.com:ofiwg/libfabric.git","clone_url":"https://github.com/ofiwg/libfabric.git","svn_url":"https://github.com/ofiwg/libfabric","homepage":"http://ofiwg.github.io/libfabric/","size":11367,"stargazers_count":35,"watchers_count":35,"language":"C","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":39,"mirror_url":null,"open_issues_count":59,"forks":39,"open_issues":59,"watchers":35,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ofiwg/libfabric/pulls/1071"},"html":{"href":"https://github.com/ofiwg/libfabric/pull/1071"},"issue":{"href":"https://api.github.com/repos/ofiwg/libfabric/issues/1071"},"comments":{"href":"https://api.github.com/repos/ofiwg/libfabric/issues/1071/comments"},"review_comments":{"href":"https://api.github.com/repos/ofiwg/libfabric/pulls/1071/comments"},"review_comment":{"href":"https://api.github.com/repos/ofiwg/libfabric/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ofiwg/libfabric/pulls/1071/commits"},"statuses":{"href":"https://api.github.com/repos/ofiwg/libfabric/statuses/04229fd8261c7263d2102ab8237907efd0eca8ed"}}}}