)]}'
{"nova/tests/unit/virt/test_hardware.py":[{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"5e900ec4969d0dae6891d4f1e5d05f9b665c1acf","unresolved":false,"context_lines":[{"line_number":2255,"context_line":"                id\u003d0,"},{"line_number":2256,"context_line":"                cpuset\u003dset([0, 1, 2, 3, 4, 5, 6, 7]),"},{"line_number":2257,"context_line":"                memory\u003d4096, memory_usage\u003d0,"},{"line_number":2258,"context_line":"                pinned_cpus\u003dset([0, 1]),"},{"line_number":2259,"context_line":"                siblings\u003d[set([0, 4]), set([1, 5]), set([2, 6]), set([3, 7])],"},{"line_number":2260,"context_line":"                mempages\u003d[])"},{"line_number":2261,"context_line":"        inst_pin \u003d objects.InstanceNUMACell("}],"source_content_type":"text/x-python","patch_set":28,"id":"da6ed579_3a4232af","line":2258,"range":{"start_line":2258,"start_character":28,"end_line":2258,"end_character":40},"updated":"2016-01-14 10:40:58.000000000","message":"So we want a negative test here as well - when there are no fully free cores, as I think that case is bugged.","commit_id":"325f1e67ed55411c2c5e7eee872a29cc00a22f3d"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"e6e9b2a3f308a06f52ab389ba5007e69240d8d6d","unresolved":false,"context_lines":[{"line_number":2255,"context_line":"                id\u003d0,"},{"line_number":2256,"context_line":"                cpuset\u003dset([0, 1, 2, 3, 4, 5, 6, 7]),"},{"line_number":2257,"context_line":"                memory\u003d4096, memory_usage\u003d0,"},{"line_number":2258,"context_line":"                pinned_cpus\u003dset([0, 1]),"},{"line_number":2259,"context_line":"                siblings\u003d[set([0, 4]), set([1, 5]), set([2, 6]), set([3, 7])],"},{"line_number":2260,"context_line":"                mempages\u003d[])"},{"line_number":2261,"context_line":"        inst_pin \u003d objects.InstanceNUMACell("}],"source_content_type":"text/x-python","patch_set":28,"id":"da6ed579_95f8d0c4","line":2258,"range":{"start_line":2258,"start_character":28,"end_line":2258,"end_character":40},"in_reply_to":"da6ed579_3a4232af","updated":"2016-01-14 11:07:36.000000000","message":"Done","commit_id":"325f1e67ed55411c2c5e7eee872a29cc00a22f3d"}],"nova/virt/hardware.py":[{"author":{"_account_id":19124,"name":"Gerry Kopec","email":"gerry.kopec@windriver.com","username":"gkopec"},"change_message_id":"0e45b80e461368084bcfbe5544b0edc5f53a614b","unresolved":false,"context_lines":[{"line_number":720,"context_line":"                  {\u0027policy\u0027: instance_cell.cpu_threads_policy,"},{"line_number":721,"context_line":"                   \u0027cores\u0027: len(instance_cell)})"},{"line_number":722,"context_line":"        if (instance_cell.cpu_threads_policy \u003d\u003d thread_policies.ISOLATE):"},{"line_number":723,"context_line":"            threads_no \u003d threads_per_core"},{"line_number":724,"context_line":"        usable_cores \u003d map(lambda s: list(s)[:1], sibling_sets[threads_no])"},{"line_number":725,"context_line":""},{"line_number":726,"context_line":"        if len(usable_cores) \u003c len(instance_cell):"}],"source_content_type":"text/x-python","patch_set":17,"id":"fa80f949_d07c7c74","line":723,"updated":"2015-11-04 16:29:15.000000000","message":"As threads_no is also used to set VirtCPUTopology, this would mean the topology of the instance could have threads \u003e1 which doesn\u0027t make sense for isolate policy. This would be different from separate policy which would always have 1 thread.","commit_id":"497481bddb5cc0d1f5df7c8d8ca936610b118a09"},{"author":{"_account_id":8768,"name":"Chris Friesen","email":"chris.friesen@windriver.com","username":"cbf123"},"change_message_id":"c71761bdd7006ab3a333e57647c2e72ae622c73f","unresolved":false,"context_lines":[{"line_number":1249,"context_line":"                if instancecell.id \u003d\u003d hostcell.id:"},{"line_number":1250,"context_line":"                    memory_usage \u003d ("},{"line_number":1251,"context_line":"                            memory_usage + sign * instancecell.memory)"},{"line_number":1252,"context_line":"                    cpu_usage \u003d cpu_usage + sign * len(instancecell.cpuset)"},{"line_number":1253,"context_line":"                    if instancecell.pagesize and instancecell.pagesize \u003e 0:"},{"line_number":1254,"context_line":"                        newcell.mempages \u003d _numa_pagesize_usage_from_cell("},{"line_number":1255,"context_line":"                            hostcell, instancecell, sign)"}],"source_content_type":"text/x-python","patch_set":20,"id":"7a740942_70296f89","line":1252,"updated":"2015-12-08 20:21:57.000000000","message":"I think this cpu_usage calculation needs adjusting.  For a compute node running instances with dedicated CPUs, \"cpu_usage\" should always match len(pinned_cpus).  In pin_cpus_with_siblings() we pin the siblings, so we need to also subtract the siblings from cpu_usage.  I think we should be able to just multiply len(instancecell.cpuset) by \"host siblings per core\" if the \"isolate\" policy is in use.","commit_id":"1b4016a8f35c3330dad0a171ec38ae6dee6f3e9a"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"86dda02f06cece039faf511dcf487ee164fe5bf5","unresolved":false,"context_lines":[{"line_number":1249,"context_line":"                if instancecell.id \u003d\u003d hostcell.id:"},{"line_number":1250,"context_line":"                    memory_usage \u003d ("},{"line_number":1251,"context_line":"                            memory_usage + sign * instancecell.memory)"},{"line_number":1252,"context_line":"                    cpu_usage \u003d cpu_usage + sign * len(instancecell.cpuset)"},{"line_number":1253,"context_line":"                    if instancecell.pagesize and instancecell.pagesize \u003e 0:"},{"line_number":1254,"context_line":"                        newcell.mempages \u003d _numa_pagesize_usage_from_cell("},{"line_number":1255,"context_line":"                            hostcell, instancecell, sign)"}],"source_content_type":"text/x-python","patch_set":20,"id":"7a740942_de4ff868","line":1252,"in_reply_to":"7a740942_70296f89","updated":"2015-12-11 10:27:53.000000000","message":"Seems logical to me. Also looks like something that we don\u0027t test for but really should. I\u0027ll try add some (possibly in a separate commit)","commit_id":"1b4016a8f35c3330dad0a171ec38ae6dee6f3e9a"},{"author":{"_account_id":19124,"name":"Gerry Kopec","email":"gerry.kopec@windriver.com","username":"gkopec"},"change_message_id":"1e83beb43eb1c369fa67f4e0708fb7ed7862fe94","unresolved":false,"context_lines":[{"line_number":1257,"context_line":"                    if (instancecell.cpu_thread_policy \u003d\u003d"},{"line_number":1258,"context_line":"                            fields.CPUThreadAllocationPolicy.ISOLATE):"},{"line_number":1259,"context_line":"                        cpu_usage \u003d cpu_usage + sign * max("},{"line_number":1260,"context_line":"                                map(len, hostcell.siblings))"},{"line_number":1261,"context_line":"                    else:"},{"line_number":1262,"context_line":"                        cpu_usage \u003d cpu_usage + sign * len(instancecell.cpuset)"},{"line_number":1263,"context_line":"                    if instancecell.pagesize and instancecell.pagesize \u003e 0:"}],"source_content_type":"text/x-python","patch_set":24,"id":"7a740942_4a58b4fa","line":1260,"updated":"2015-12-11 00:05:56.000000000","message":"I think max should be multiplied by size of instance cpuset.  Plus should also check if siblings exist.","commit_id":"15a2e1e1c3759dc96c1e841c10710f5cd0812240"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"3ade542dd7b83999db13e8fe63fb49cd7a73ffa8","unresolved":false,"context_lines":[{"line_number":1257,"context_line":"                    if (instancecell.cpu_thread_policy \u003d\u003d"},{"line_number":1258,"context_line":"                            fields.CPUThreadAllocationPolicy.ISOLATE):"},{"line_number":1259,"context_line":"                        cpu_usage \u003d cpu_usage + sign * max("},{"line_number":1260,"context_line":"                                map(len, hostcell.siblings))"},{"line_number":1261,"context_line":"                    else:"},{"line_number":1262,"context_line":"                        cpu_usage \u003d cpu_usage + sign * len(instancecell.cpuset)"},{"line_number":1263,"context_line":"                    if instancecell.pagesize and instancecell.pagesize \u003e 0:"}],"source_content_type":"text/x-python","patch_set":24,"id":"7a740942_7e88c171","line":1260,"in_reply_to":"7a740942_4a58b4fa","updated":"2015-12-11 10:27:41.000000000","message":"You\u0027re right - it should. Unit tests expanded to validate this. Good catch","commit_id":"15a2e1e1c3759dc96c1e841c10710f5cd0812240"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"628b60f617398ef92856fa32f4c351a7549c8ea0","unresolved":false,"context_lines":[{"line_number":803,"context_line":"    instance_cell.pin_vcpus(*pinning)"},{"line_number":804,"context_line":"    instance_cell.cpu_topology \u003d topology"},{"line_number":805,"context_line":"    instance_cell.id \u003d host_cell_id"},{"line_number":806,"context_line":""},{"line_number":807,"context_line":"    return instance_cell"},{"line_number":808,"context_line":""},{"line_number":809,"context_line":""}],"source_content_type":"text/x-python","patch_set":26,"id":"fa69d971_9e8ff822","line":806,"updated":"2015-12-31 11:27:34.000000000","message":"random whitespace :(","commit_id":"0626097ddf4d211ae9762dacfc27e8857961b121"},{"author":{"_account_id":5441,"name":"Andrew Laski","email":"andrew@lascii.com","username":"alaski"},"change_message_id":"6e99c9acce60feaaae09d9f96503735807337642","unresolved":false,"context_lines":[{"line_number":821,"context_line":"        # Try to pack the instance cell onto cores"},{"line_number":822,"context_line":"        return _pack_instance_onto_cores("},{"line_number":823,"context_line":"            host_cell.free_siblings, instance_cell, host_cell.id,"},{"line_number":824,"context_line":"            max(map(len, host_cell.siblings)))"},{"line_number":825,"context_line":"    else:"},{"line_number":826,"context_line":"        # Straightforward to pin to available cpus when there is no"},{"line_number":827,"context_line":"        # hyperthreading on the host"}],"source_content_type":"text/x-python","patch_set":27,"id":"fa69d971_96275462","line":824,"updated":"2016-01-11 21:35:52.000000000","message":"This is the threads_per_core parameter for _pack_instance_onto_cores but using max() here makes it seem like this number could differ between cores.  If that\u0027s the case then is it safe to use max here, and if all cores have the same number of threads why not just take the first len()?","commit_id":"984071fecac3c9951baddb631879a91a1cb31f45"},{"author":{"_account_id":5441,"name":"Andrew Laski","email":"andrew@lascii.com","username":"alaski"},"change_message_id":"a7af32a8c21a5cfd1712fc920d5ea1ff508e279a","unresolved":false,"context_lines":[{"line_number":821,"context_line":"        # Try to pack the instance cell onto cores"},{"line_number":822,"context_line":"        return _pack_instance_onto_cores("},{"line_number":823,"context_line":"            host_cell.free_siblings, instance_cell, host_cell.id,"},{"line_number":824,"context_line":"            max(map(len, host_cell.siblings)))"},{"line_number":825,"context_line":"    else:"},{"line_number":826,"context_line":"        # Straightforward to pin to available cpus when there is no"},{"line_number":827,"context_line":"        # hyperthreading on the host"}],"source_content_type":"text/x-python","patch_set":27,"id":"da6ed579_e15f05e3","line":824,"in_reply_to":"da6ed579_7936c1e8","updated":"2016-01-14 13:29:35.000000000","message":"If scheduling will fail when max() is incorrect that\u0027s good enough for me for now.","commit_id":"984071fecac3c9951baddb631879a91a1cb31f45"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"a935253fc30ff1fc696cbd97ddf0109ee61b7a7b","unresolved":false,"context_lines":[{"line_number":821,"context_line":"        # Try to pack the instance cell onto cores"},{"line_number":822,"context_line":"        return _pack_instance_onto_cores("},{"line_number":823,"context_line":"            host_cell.free_siblings, instance_cell, host_cell.id,"},{"line_number":824,"context_line":"            max(map(len, host_cell.siblings)))"},{"line_number":825,"context_line":"    else:"},{"line_number":826,"context_line":"        # Straightforward to pin to available cpus when there is no"},{"line_number":827,"context_line":"        # hyperthreading on the host"}],"source_content_type":"text/x-python","patch_set":27,"id":"da6ed579_5dd3d238","line":824,"in_reply_to":"fa69d971_96275462","updated":"2016-01-12 15:52:14.000000000","message":"Assuming the number can differ between cores, scheduling will fail if not enough free cores are available. This handled on @738. I think the more important question is whether `len(siblings)` can actually vary. On an IA processor it won\u0027t, but I can\u0027t say for sure whether this is true for other architectures like POWER or ARM. I figured it was safer to assume that differing sibling counts were possible. How\u0027s that?","commit_id":"984071fecac3c9951baddb631879a91a1cb31f45"},{"author":{"_account_id":11647,"name":"Przemyslaw Czesnowicz","email":"przemyslaw.czesnowicz@intel.com","username":"pczesno"},"change_message_id":"e120f4b4ec8050690296dcc29ad7ee05f35531f5","unresolved":false,"context_lines":[{"line_number":821,"context_line":"        # Try to pack the instance cell onto cores"},{"line_number":822,"context_line":"        return _pack_instance_onto_cores("},{"line_number":823,"context_line":"            host_cell.free_siblings, instance_cell, host_cell.id,"},{"line_number":824,"context_line":"            max(map(len, host_cell.siblings)))"},{"line_number":825,"context_line":"    else:"},{"line_number":826,"context_line":"        # Straightforward to pin to available cpus when there is no"},{"line_number":827,"context_line":"        # hyperthreading on the host"}],"source_content_type":"text/x-python","patch_set":27,"id":"da6ed579_7936c1e8","line":824,"in_reply_to":"fa69d971_96275462","updated":"2016-01-13 08:52:22.000000000","message":"The number of siblings per core can be different between cores, because of the vcpu_pin_set config variable. The deployer could take out one of the siblings from vcpu_pin_set.\n\nhttp://git.openstack.org/cgit/openstack/nova/tree/nova/virt/libvirt/driver.py?id\u003d34cf19c8a4dababd1e723c0364a80823c0ac2637#n4999\n\nChecking for max is safer, but would fail in the odd scenario  when the deployer reserves at least one sibling on all cores.","commit_id":"984071fecac3c9951baddb631879a91a1cb31f45"},{"author":{"_account_id":5441,"name":"Andrew Laski","email":"andrew@lascii.com","username":"alaski"},"change_message_id":"6e99c9acce60feaaae09d9f96503735807337642","unresolved":false,"context_lines":[{"line_number":1257,"context_line":"                    if instancecell.pagesize and instancecell.pagesize \u003e 0:"},{"line_number":1258,"context_line":"                        newcell.mempages \u003d _numa_pagesize_usage_from_cell("},{"line_number":1259,"context_line":"                            hostcell, instancecell, sign)"},{"line_number":1260,"context_line":""},{"line_number":1261,"context_line":"                    if instance.cpu_pinning_requested:"},{"line_number":1262,"context_line":"                        pinned_cpus \u003d set(instancecell.cpu_pinning.values())"},{"line_number":1263,"context_line":"                        if free:"}],"source_content_type":"text/x-python","patch_set":27,"id":"fa69d971_96de743c","line":1260,"updated":"2016-01-11 21:35:52.000000000","message":"Please remove this if you respin.","commit_id":"984071fecac3c9951baddb631879a91a1cb31f45"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"5e900ec4969d0dae6891d4f1e5d05f9b665c1acf","unresolved":false,"context_lines":[{"line_number":762,"context_line":"    if (instance_cell.cpu_thread_policy \u003d\u003d"},{"line_number":763,"context_line":"            fields.CPUThreadAllocationPolicy.ISOLATE):"},{"line_number":764,"context_line":"        pinning \u003d _get_pinning(1,  # we only want to \"use\" one thread per core"},{"line_number":765,"context_line":"                               sibling_sets[threads_per_core],"},{"line_number":766,"context_line":"                               instance_cell.cpuset)"},{"line_number":767,"context_line":"    else:"},{"line_number":768,"context_line":"        # NOTE(ndipanov): We iterate over the sibling sets in descending order"}],"source_content_type":"text/x-python","patch_set":28,"id":"da6ed579_9a5a3e29","line":765,"range":{"start_line":765,"start_character":44,"end_line":765,"end_character":60},"updated":"2016-01-14 10:40:58.000000000","message":"so this can give us a KeyError I think... we set threads_per_core to the maximum size of a core, but sibling_sets goes up only to the number of free siblings.\n\nIf those 2 are not correct - we can\u0027t do isolate (as all cores have at least one thread taken) so just checking that here and failing should be enough.","commit_id":"325f1e67ed55411c2c5e7eee872a29cc00a22f3d"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"e6e9b2a3f308a06f52ab389ba5007e69240d8d6d","unresolved":false,"context_lines":[{"line_number":762,"context_line":"    if (instance_cell.cpu_thread_policy \u003d\u003d"},{"line_number":763,"context_line":"            fields.CPUThreadAllocationPolicy.ISOLATE):"},{"line_number":764,"context_line":"        pinning \u003d _get_pinning(1,  # we only want to \"use\" one thread per core"},{"line_number":765,"context_line":"                               sibling_sets[threads_per_core],"},{"line_number":766,"context_line":"                               instance_cell.cpuset)"},{"line_number":767,"context_line":"    else:"},{"line_number":768,"context_line":"        # NOTE(ndipanov): We iterate over the sibling sets in descending order"}],"source_content_type":"text/x-python","patch_set":28,"id":"da6ed579_f5e34da2","line":765,"range":{"start_line":765,"start_character":44,"end_line":765,"end_character":60},"in_reply_to":"da6ed579_9a5a3e29","updated":"2016-01-14 11:07:36.000000000","message":"Right you are. Exception path and test for path added to catch this. I didn\u0027t include a log the next commit in the series introduces a more generic one. OK with this?\n\nDone.","commit_id":"325f1e67ed55411c2c5e7eee872a29cc00a22f3d"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"5e900ec4969d0dae6891d4f1e5d05f9b665c1acf","unresolved":false,"context_lines":[{"line_number":796,"context_line":"    instance_cell.pin_vcpus(*pinning)"},{"line_number":797,"context_line":"    instance_cell.cpu_topology \u003d topology"},{"line_number":798,"context_line":"    instance_cell.id \u003d host_cell_id"},{"line_number":799,"context_line":""},{"line_number":800,"context_line":"    return instance_cell"},{"line_number":801,"context_line":""},{"line_number":802,"context_line":""}],"source_content_type":"text/x-python","patch_set":28,"id":"da6ed579_a48609d9","line":799,"updated":"2016-01-14 10:40:58.000000000","message":"random whitespace :(","commit_id":"325f1e67ed55411c2c5e7eee872a29cc00a22f3d"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"e6e9b2a3f308a06f52ab389ba5007e69240d8d6d","unresolved":false,"context_lines":[{"line_number":796,"context_line":"    instance_cell.pin_vcpus(*pinning)"},{"line_number":797,"context_line":"    instance_cell.cpu_topology \u003d topology"},{"line_number":798,"context_line":"    instance_cell.id \u003d host_cell_id"},{"line_number":799,"context_line":""},{"line_number":800,"context_line":"    return instance_cell"},{"line_number":801,"context_line":""},{"line_number":802,"context_line":""}],"source_content_type":"text/x-python","patch_set":28,"id":"da6ed579_b5be3563","line":799,"in_reply_to":"da6ed579_a48609d9","updated":"2016-01-14 11:07:36.000000000","message":"Oops - done.","commit_id":"325f1e67ed55411c2c5e7eee872a29cc00a22f3d"}]}
