{"action":"created","issue":{"url":"https://api.github.com/repos/facebook/folly/issues/378","repository_url":"https://api.github.com/repos/facebook/folly","labels_url":"https://api.github.com/repos/facebook/folly/issues/378/labels{/name}","comments_url":"https://api.github.com/repos/facebook/folly/issues/378/comments","events_url":"https://api.github.com/repos/facebook/folly/issues/378/events","html_url":"https://github.com/facebook/folly/pull/378","id":142858944,"number":378,"title":"Add memory padding and alignment to prevent false sharing","user":{"login":"rigtorp","id":178027,"avatar_url":"https://avatars.githubusercontent.com/u/178027?v=3","gravatar_id":"","url":"https://api.github.com/users/rigtorp","html_url":"https://github.com/rigtorp","followers_url":"https://api.github.com/users/rigtorp/followers","following_url":"https://api.github.com/users/rigtorp/following{/other_user}","gists_url":"https://api.github.com/users/rigtorp/gists{/gist_id}","starred_url":"https://api.github.com/users/rigtorp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rigtorp/subscriptions","organizations_url":"https://api.github.com/users/rigtorp/orgs","repos_url":"https://api.github.com/users/rigtorp/repos","events_url":"https://api.github.com/users/rigtorp/events{/privacy}","received_events_url":"https://api.github.com/users/rigtorp/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/facebook/folly/labels/CLA%20Signed","name":"CLA Signed","color":"009900"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":13,"created_at":"2016-03-23T04:41:51Z","updated_at":"2016-07-06T22:47:37Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/facebook/folly/pulls/378","html_url":"https://github.com/facebook/folly/pull/378","diff_url":"https://github.com/facebook/folly/pull/378.diff","patch_url":"https://github.com/facebook/folly/pull/378.patch"},"body":"Ensure no thirdparty thread writes to a cacheline shared by our ringbuffer, readIndex and writeIndex.\r\nEnsure readIndex and writeIndex are located on different cachelines."},"comment":{"url":"https://api.github.com/repos/facebook/folly/issues/comments/230930609","html_url":"https://github.com/facebook/folly/pull/378#issuecomment-230930609","issue_url":"https://api.github.com/repos/facebook/folly/issues/378","id":230930609,"user":{"login":"elliottneilclark","id":169547,"avatar_url":"https://avatars.githubusercontent.com/u/169547?v=3","gravatar_id":"","url":"https://api.github.com/users/elliottneilclark","html_url":"https://github.com/elliottneilclark","followers_url":"https://api.github.com/users/elliottneilclark/followers","following_url":"https://api.github.com/users/elliottneilclark/following{/other_user}","gists_url":"https://api.github.com/users/elliottneilclark/gists{/gist_id}","starred_url":"https://api.github.com/users/elliottneilclark/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elliottneilclark/subscriptions","organizations_url":"https://api.github.com/users/elliottneilclark/orgs","repos_url":"https://api.github.com/users/elliottneilclark/repos","events_url":"https://api.github.com/users/elliottneilclark/events{/privacy}","received_events_url":"https://api.github.com/users/elliottneilclark/received_events","type":"User","site_admin":false},"created_at":"2016-07-06T22:47:37Z","updated_at":"2016-07-06T22:47:37Z","body":"What benchmarks are you using to test this? Can you include them with the PR?\r\n\r\nFor the existing benchmark that's in the folly directory I see this:\r\n\r\n\r\n# Before Applying the PR\r\n```\r\n7\t8\t28127\t196889\r\n8\t9\t71014\t568112\r\n9\t10\t482\t4338\r\n10\t11\t55\t550\r\n11\t12\t156\t1716\r\n12\t13\t117\t1404\r\n13\t14\t38\t494\r\n14\t15\t10\t140\r\n16\t17\t1\t16\r\n============================================================================\r\nfolly/test/ProducerConsumerQueueBenchmark.cpp   relative  time/iter  iters/s\r\n============================================================================\r\n----------------------------------------------------------------------------\r\nBM_ProducerConsumer(1048574)                               101.14ns    9.89M\r\nBM_ProducerConsumerAffinity(1048574)                        89.32ns   11.20M\r\nBM_ProducerConsumerLatency(1048574)                         1.67min   10.00m\r\n============================================================================\r\n```\r\n\r\n# After Applying the PR\r\n\r\n```\r\n7\t8\t62230\t435610\r\n8\t9\t37130\t297040\r\n9\t10\t250\t2250\r\n10\t11\t60\t600\r\n11\t12\t125\t1375\r\n12\t13\t88\t1056\r\n13\t14\t96\t1248\r\n14\t15\t18\t252\r\n15\t16\t2\t30\r\n16\t17\t1\t16\r\n============================================================================\r\nfolly/test/ProducerConsumerQueueBenchmark.cpp   relative  time/iter  iters/s\r\n============================================================================\r\n----------------------------------------------------------------------------\r\nBM_ProducerConsumer(1048574)                               100.29ns    9.97M\r\nBM_ProducerConsumerAffinity(1048574)                       106.94ns    9.35M\r\nBM_ProducerConsumerLatency(1048574)                         1.67min   10.00m\r\n============================================================================\r\n```\r\n\r\nSo from what I see this doesn't seem to make anything faster. It makes the case where threads have affinity worse."}}
{"actor":{"display_login":"elliottneilclark"}}