{"action":"created","issue":{"url":"https://api.github.com/repos/gperftools/gperftools/issues/1023","repository_url":"https://api.github.com/repos/gperftools/gperftools","labels_url":"https://api.github.com/repos/gperftools/gperftools/issues/1023/labels{/name}","comments_url":"https://api.github.com/repos/gperftools/gperftools/issues/1023/comments","events_url":"https://api.github.com/repos/gperftools/gperftools/issues/1023/events","html_url":"https://github.com/gperftools/gperftools/issues/1023","id":344249548,"node_id":"MDU6SXNzdWUzNDQyNDk1NDg=","number":1023,"title":"Why is the default kPageShift 13 is it ok to modify ?","user":{"login":"bkannadassan","id":37536487,"node_id":"MDQ6VXNlcjM3NTM2NDg3","avatar_url":"https://avatars3.githubusercontent.com/u/37536487?v=4","gravatar_id":"","url":"https://api.github.com/users/bkannadassan","html_url":"https://github.com/bkannadassan","followers_url":"https://api.github.com/users/bkannadassan/followers","following_url":"https://api.github.com/users/bkannadassan/following{/other_user}","gists_url":"https://api.github.com/users/bkannadassan/gists{/gist_id}","starred_url":"https://api.github.com/users/bkannadassan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bkannadassan/subscriptions","organizations_url":"https://api.github.com/users/bkannadassan/orgs","repos_url":"https://api.github.com/users/bkannadassan/repos","events_url":"https://api.github.com/users/bkannadassan/events{/privacy}","received_events_url":"https://api.github.com/users/bkannadassan/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-07-25T00:30:44Z","updated_at":"2018-08-05T00:06:39Z","closed_at":"2018-08-05T00:06:39Z","author_association":"NONE","body":"#if defined(TCMALLOC_32K_PAGES)\r\nstatic const size_t kPageShift  = 15;\r\n#elif defined(TCMALLOC_64K_PAGES)\r\nstatic const size_t kPageShift  = 16;\r\n#else\r\nstatic const size_t kPageShift  = 13;\r\n#endif\r\n\r\nFor 32 and 64k understand 15/16. In my system pagesize is 4k so here we have default as 13 which is 8k is this because we can't support arrays mapping to pageid for >>12 ?. I would like to understand so is their no relation between what pagesize system supports to whats chosen ?. If so does making 15/16 I can get better performance ?. Btw I see that we use this shift to find the pageID, so since in my system 4k is the pagesize will 2 page fall into a single Span ?. \r\n\r\n$206 = {start = 18419, length = 1, next = 0x8029380, prev = 0x80250f0, objects = 0x8fe6fc0, refcount = 37, sizeclass = 10, location = 0, sample = 0}\r\n(gdb) p (void **)0x8fe6fc0\r\n$207 = (void **) 0x8fe6fc0\r\n(gdb) p *$207\r\n$208 = (void *) 0x8fe7050\r\n(gdb) p (void **)$208\r\n$209 = (void **) 0x8fe7050\r\n(gdb) p *$209\r\n$210 = (void *) 0x8fe70e0\r\n(gdb) p tcmalloc::ThreadCache::threadlocal_data_.fast_path_heap.list_[10]\r\n$211 = {list_ = 0x8fe7710, length_ = 12, lowater_ = 8, max_length_ = 128, length_overages_ = 1, size_ = 144}\r\n(gdb) p /x 144\r\n$212 = 0x90\r\n(gdb) p /x 144 + 0x6fc0\r\n$213 = 0x7050\r\n\r\nReason for asking above is I see we are having in span objects adjacent linked. If its going to be 2 page chunk will their be an impact on sorting and inserting while freeing ?. Can you clarify on how this is done so that it will help us to know the impact.\r\n\r\nrgds\r\nBalaji Kamal Kannadassan "},"comment":{"url":"https://api.github.com/repos/gperftools/gperftools/issues/comments/410485684","html_url":"https://github.com/gperftools/gperftools/issues/1023#issuecomment-410485684","issue_url":"https://api.github.com/repos/gperftools/gperftools/issues/1023","id":410485684,"node_id":"MDEyOklzc3VlQ29tbWVudDQxMDQ4NTY4NA==","user":{"login":"alk","id":14850,"node_id":"MDQ6VXNlcjE0ODUw","avatar_url":"https://avatars3.githubusercontent.com/u/14850?v=4","gravatar_id":"","url":"https://api.github.com/users/alk","html_url":"https://github.com/alk","followers_url":"https://api.github.com/users/alk/followers","following_url":"https://api.github.com/users/alk/following{/other_user}","gists_url":"https://api.github.com/users/alk/gists{/gist_id}","starred_url":"https://api.github.com/users/alk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alk/subscriptions","organizations_url":"https://api.github.com/users/alk/orgs","repos_url":"https://api.github.com/users/alk/repos","events_url":"https://api.github.com/users/alk/events{/privacy}","received_events_url":"https://api.github.com/users/alk/received_events","type":"User","site_admin":false},"created_at":"2018-08-05T00:06:39Z","updated_at":"2018-08-05T00:06:39Z","author_association":"CONTRIBUTOR","body":"Those are logical pages. They're independent from hardware page size. Yes it is possible to modify this at compile time.\r\n\r\nThis is workload-dependent. Larger pages are typically little faster, but cause a little more fragmentation.\r\n\r\nClosing since I think I answered your question."}}
{"actor":{"display_login":"alk"}}