)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":8768,"name":"Chris Friesen","email":"chris.friesen@windriver.com","username":"cbf123"},"change_message_id":"77a4f4b694b66811eea17b5d5f32b41b99d01b56","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Stephen Finucane \u003cstephen.finucane@intel.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2015-07-27 11:41:13 +0100"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Add \u0027hw:cpu_threads_policy\u003drequire\u0027 scheduling"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Make use of the \u0027require\u0027 policy more explicit. The \u0027require\u0027 policy"},{"line_number":10,"context_line":"should and will only be used when explicitly requested by the instance"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":10,"id":"3a50d1a3_b041070c","line":7,"updated":"2015-07-29 22:14:16.000000000","message":"The blueprint/spec talks about \"prefer\", not \"require\".  Are you going to update the blueprint/spec?","commit_id":"a4ceb1b5245aa58c72821322435791d218a4bb36"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"20981fd661d4d3f3fbf37c49818c2c7538541c0d","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Stephen Finucane \u003cstephen.finucane@intel.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2015-07-27 11:41:13 +0100"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Add \u0027hw:cpu_threads_policy\u003drequire\u0027 scheduling"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Make use of the \u0027require\u0027 policy more explicit. The \u0027require\u0027 policy"},{"line_number":10,"context_line":"should and will only be used when explicitly requested by the instance"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":10,"id":"3a50d1a3_e8231157","line":7,"in_reply_to":"3a50d1a3_b041070c","updated":"2015-07-30 10:33:29.000000000","message":"Yes, we need to update the blueprint/spec. Unfortunately we missed the deadline for Liberty so it won\u0027t be until the M release :(","commit_id":"a4ceb1b5245aa58c72821322435791d218a4bb36"}],"nova/scheduler/filters/numa_topology_filter.py":[{"author":{"_account_id":8768,"name":"Chris Friesen","email":"chris.friesen@windriver.com","username":"cbf123"},"change_message_id":"77a4f4b694b66811eea17b5d5f32b41b99d01b56","unresolved":false,"context_lines":[{"line_number":53,"context_line":"                                  \"enabled but \u0027avoid\u0027 threads policy was \""},{"line_number":54,"context_line":"                                  \"requested.\", {\u0027host_state\u0027: host_state})"},{"line_number":55,"context_line":"                        return False"},{"line_number":56,"context_line":"            elif (cpu_policy \u003d\u003d cpu_policies.DEDICATED and"},{"line_number":57,"context_line":"                  cpu_threads_policy \u003d\u003d thread_policies.REQUIRE):"},{"line_number":58,"context_line":"                for cell in host_topology.cells:"},{"line_number":59,"context_line":"                    # the presence of siblings indicates hyperthreading (HT)"}],"source_content_type":"text/x-python","patch_set":10,"id":"3a50d1a3_5043e341","line":56,"updated":"2015-07-29 22:14:16.000000000","message":"Maybe pull out the cpu_policy check instead of duplicating it?  Something like:\n\nif (cpu_policy !\u003d cpu_policies.DEDICATED):\n    return True","commit_id":"a4ceb1b5245aa58c72821322435791d218a4bb36"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"20981fd661d4d3f3fbf37c49818c2c7538541c0d","unresolved":false,"context_lines":[{"line_number":53,"context_line":"                                  \"enabled but \u0027avoid\u0027 threads policy was \""},{"line_number":54,"context_line":"                                  \"requested.\", {\u0027host_state\u0027: host_state})"},{"line_number":55,"context_line":"                        return False"},{"line_number":56,"context_line":"            elif (cpu_policy \u003d\u003d cpu_policies.DEDICATED and"},{"line_number":57,"context_line":"                  cpu_threads_policy \u003d\u003d thread_policies.REQUIRE):"},{"line_number":58,"context_line":"                for cell in host_topology.cells:"},{"line_number":59,"context_line":"                    # the presence of siblings indicates hyperthreading (HT)"}],"source_content_type":"text/x-python","patch_set":10,"id":"3a50d1a3_689141f1","line":56,"in_reply_to":"3a50d1a3_5043e341","updated":"2015-07-30 10:33:29.000000000","message":"Good call. I\u0027ll do that.","commit_id":"a4ceb1b5245aa58c72821322435791d218a4bb36"},{"author":{"_account_id":19124,"name":"Gerry Kopec","email":"gerry.kopec@windriver.com","username":"gkopec"},"change_message_id":"776ce7b5a82f38a67c473afb063e01fa654d3789","unresolved":false,"context_lines":[{"line_number":31,"context_line":"        host_topology, _ \u003d hardware.host_topology_and_format_from_host("},{"line_number":32,"context_line":"            host_state)"},{"line_number":33,"context_line":"        cpu_policy \u003d extra_specs.get(\u0027hw:cpu_policy\u0027)"},{"line_number":34,"context_line":"        cpu_thread_policy \u003d extra_specs.get(\u0027hw:cpu_thread_policy\u0027)"},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"        if not host_topology or cpu_policy !\u003d cpu_policies.DEDICATED:"},{"line_number":37,"context_line":"            return True"}],"source_content_type":"text/x-python","patch_set":26,"id":"9a8ffd7b_fe42d667","line":34,"updated":"2015-11-30 22:01:53.000000000","message":"Shouldn\u0027t the image properties also be checked if the policy is not defined in the flavor.","commit_id":"6667a6f61f2f5f7956ab0ed8450cf420e9bc1d84"},{"author":{"_account_id":8768,"name":"Chris Friesen","email":"chris.friesen@windriver.com","username":"cbf123"},"change_message_id":"61d2caaa319024c7a0b9af74aef41b2dc4ad280a","unresolved":false,"context_lines":[{"line_number":31,"context_line":"        host_topology, _ \u003d hardware.host_topology_and_format_from_host("},{"line_number":32,"context_line":"            host_state)"},{"line_number":33,"context_line":"        cpu_policy \u003d extra_specs.get(\u0027hw:cpu_policy\u0027)"},{"line_number":34,"context_line":"        cpu_thread_policy \u003d extra_specs.get(\u0027hw:cpu_thread_policy\u0027)"},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"        if not host_topology or cpu_policy !\u003d cpu_policies.DEDICATED:"},{"line_number":37,"context_line":"            return True"}],"source_content_type":"text/x-python","patch_set":27,"id":"9a8ffd7b_1c20cff6","line":34,"updated":"2015-12-01 16:46:26.000000000","message":"As Gerry mentioned in the previous version this is only checking the flavor extra specs, but it\u0027s possible to set both cpu policy and thread policy on the image as well (which uses the \"hw_cpu_...\" format for metadata keys).","commit_id":"a0039fb7a5193f0c347dda715868f51ed8307199"},{"author":{"_account_id":16389,"name":"Naga Praveen Illa","email":"nilla@cisco.com","username":"nilla"},"change_message_id":"71b22990527ffab86d1f0866fdbaca5d74aaf3a8","unresolved":false,"context_lines":[{"line_number":76,"context_line":"        if pci_requests:"},{"line_number":77,"context_line":"            pci_requests \u003d pci_requests.requests"},{"line_number":78,"context_line":""},{"line_number":79,"context_line":"        if not self._satisfies_cpu_policy(host_state, extra_specs,"},{"line_number":80,"context_line":"                                          image_props):"},{"line_number":81,"context_line":"            return False"},{"line_number":82,"context_line":""}],"source_content_type":"text/x-python","patch_set":35,"id":"7a740942_167f0bac","line":79,"updated":"2015-12-11 18:01:52.000000000","message":"Is it bad to get the \u0027cpu_policy\u0027 and \u0027cpu_threads_policy\u0027 from\n\"requested_topology.cells\" ? \nInstead of referring to flavor and image properties again which I think is already resolved for conflicts in nova api layer in \"hardware.numa_get_constraints()\"?","commit_id":"e8f495b2ebd22ebdaa1870423b71e311432b0c4a"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"f57121b5d49086315254b80e087525d266c0e9fd","unresolved":false,"context_lines":[{"line_number":31,"context_line":"            host_state)"},{"line_number":32,"context_line":"        # NOTE(stephenfin): There can be conflicts between the policy"},{"line_number":33,"context_line":"        # specified by the image and that specified by the instance, but this"},{"line_number":34,"context_line":"        # is not the place to resolve these. We do this during scheduling."},{"line_number":35,"context_line":"        cpu_policy \u003d [extra_specs.get(\u0027hw:cpu_policy\u0027),"},{"line_number":36,"context_line":"                      image_props.get(\u0027hw_cpu_policy\u0027)]"},{"line_number":37,"context_line":"        cpu_thread_policy \u003d [extra_specs.get(\u0027hw:cpu_thread_policy\u0027),"}],"source_content_type":"text/x-python","patch_set":36,"id":"fa69d971_bea0bcf5","line":34,"range":{"start_line":34,"start_character":63,"end_line":34,"end_character":72},"updated":"2015-12-31 11:22:30.000000000","message":"I think you mean \"during building up the request in the API\" but that\u0027s a nit.","commit_id":"b1dd4f3adc189fa6442c1addcf9e2759ad328455"},{"author":{"_account_id":5441,"name":"Andrew Laski","email":"andrew@lascii.com","username":"alaski"},"change_message_id":"14ff90a42ec654af50d8d09687aafdd16685f908","unresolved":false,"context_lines":[{"line_number":31,"context_line":"            host_state)"},{"line_number":32,"context_line":"        # NOTE(stephenfin): There can be conflicts between the policy"},{"line_number":33,"context_line":"        # specified by the image and that specified by the instance, but this"},{"line_number":34,"context_line":"        # is not the place to resolve these. We do this during scheduling."},{"line_number":35,"context_line":"        cpu_policy \u003d [extra_specs.get(\u0027hw:cpu_policy\u0027),"},{"line_number":36,"context_line":"                      image_props.get(\u0027hw_cpu_policy\u0027)]"},{"line_number":37,"context_line":"        cpu_thread_policy \u003d [extra_specs.get(\u0027hw:cpu_thread_policy\u0027),"}],"source_content_type":"text/x-python","patch_set":37,"id":"fa69d971_b5493533","line":34,"range":{"start_line":34,"start_character":45,"end_line":34,"end_character":73},"updated":"2016-01-11 20:44:52.000000000","message":"This is during scheduling :)\n\nIt might be nice to clarify this in a followup.","commit_id":"50ab6ac7ad2cee07a7166c725f946e5cb6e71825"},{"author":{"_account_id":5441,"name":"Andrew Laski","email":"andrew@lascii.com","username":"alaski"},"change_message_id":"14ff90a42ec654af50d8d09687aafdd16685f908","unresolved":false,"context_lines":[{"line_number":66,"context_line":"        host_topology, _fmt \u003d hardware.host_topology_and_format_from_host("},{"line_number":67,"context_line":"                host_state)"},{"line_number":68,"context_line":"        pci_requests \u003d spec_obj.pci_requests"},{"line_number":69,"context_line":""},{"line_number":70,"context_line":"        if pci_requests:"},{"line_number":71,"context_line":"            pci_requests \u003d pci_requests.requests"},{"line_number":72,"context_line":""}],"source_content_type":"text/x-python","patch_set":37,"id":"fa69d971_75b3bd4d","line":69,"updated":"2016-01-11 20:44:52.000000000","message":"Unnecessary whitespace changes are generally nitpicked.  It would be best to leave them out in the future.","commit_id":"50ab6ac7ad2cee07a7166c725f946e5cb6e71825"}],"nova/tests/unit/virt/test_hardware.py":[{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"9a04afb053d4df6b74b7c8a32c32725aac25ed32","unresolved":false,"context_lines":[{"line_number":2150,"context_line":"        inst_pin \u003d hw._numa_fit_instance_cell_with_pinning(host_pin, inst_pin)"},{"line_number":2151,"context_line":"        self.assertInstanceCellPinned(inst_pin)"},{"line_number":2152,"context_line":"        got_topo \u003d objects.VirtCPUTopology(sockets\u003d1, cores\u003d2, threads\u003d2)"},{"line_number":2153,"context_line":"        self.assertEqualTopology(got_topo, inst_pin.cpu_topology)"},{"line_number":2154,"context_line":""},{"line_number":2155,"context_line":"    def test_get_pinning_host_siblings_instance_odd_fit(self):"},{"line_number":2156,"context_line":"        host_pin \u003d objects.NUMACell(id\u003d0, cpuset\u003dset([0, 1, 2, 3, 4, 5, 6, 7]),"}],"source_content_type":"text/x-python","patch_set":37,"id":"fa69d971_feeadbab","line":2153,"updated":"2016-01-07 17:06:52.000000000","message":"~nit: We can see topology is good, but unfortunately we cannot see whether vCPUs are pinned on good host CPUs.","commit_id":"50ab6ac7ad2cee07a7166c725f946e5cb6e71825"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"433d6962f5504c7deb527660d28953c794a65c30","unresolved":false,"context_lines":[{"line_number":2150,"context_line":"        inst_pin \u003d hw._numa_fit_instance_cell_with_pinning(host_pin, inst_pin)"},{"line_number":2151,"context_line":"        self.assertInstanceCellPinned(inst_pin)"},{"line_number":2152,"context_line":"        got_topo \u003d objects.VirtCPUTopology(sockets\u003d1, cores\u003d2, threads\u003d2)"},{"line_number":2153,"context_line":"        self.assertEqualTopology(got_topo, inst_pin.cpu_topology)"},{"line_number":2154,"context_line":""},{"line_number":2155,"context_line":"    def test_get_pinning_host_siblings_instance_odd_fit(self):"},{"line_number":2156,"context_line":"        host_pin \u003d objects.NUMACell(id\u003d0, cpuset\u003dset([0, 1, 2, 3, 4, 5, 6, 7]),"}],"source_content_type":"text/x-python","patch_set":37,"id":"fa69d971_dfac23a1","line":2153,"in_reply_to":"fa69d971_feeadbab","updated":"2016-01-11 11:37:38.000000000","message":"If possible, I\u0027d like to fix this in a follow up commit so I can get this through","commit_id":"50ab6ac7ad2cee07a7166c725f946e5cb6e71825"}],"nova/virt/hardware.py":[{"author":{"_account_id":8768,"name":"Chris Friesen","email":"chris.friesen@windriver.com","username":"cbf123"},"change_message_id":"77a4f4b694b66811eea17b5d5f32b41b99d01b56","unresolved":false,"context_lines":[{"line_number":696,"context_line":"                continue"},{"line_number":697,"context_line":""},{"line_number":698,"context_line":"            if instance_cell.cpu_topology:"},{"line_number":699,"context_line":"                if instance_cell.cpu_topology.threads \u003e threads_no:"},{"line_number":700,"context_line":"                    continue"},{"line_number":701,"context_line":"                pinning \u003d zip(itertools.chain(*instance_cell.siblings),"},{"line_number":702,"context_line":"                              itertools.chain(*usable_cores))"}],"source_content_type":"text/x-python","patch_set":10,"id":"3a50d1a3_ebd7a420","line":699,"updated":"2015-07-29 22:14:16.000000000","message":"I\u0027m still working through the logic here...are we saying that we can\u0027t have more threads per core in the guest than we do in the host?","commit_id":"a4ceb1b5245aa58c72821322435791d218a4bb36"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"20981fd661d4d3f3fbf37c49818c2c7538541c0d","unresolved":false,"context_lines":[{"line_number":696,"context_line":"                continue"},{"line_number":697,"context_line":""},{"line_number":698,"context_line":"            if instance_cell.cpu_topology:"},{"line_number":699,"context_line":"                if instance_cell.cpu_topology.threads \u003e threads_no:"},{"line_number":700,"context_line":"                    continue"},{"line_number":701,"context_line":"                pinning \u003d zip(itertools.chain(*instance_cell.siblings),"},{"line_number":702,"context_line":"                              itertools.chain(*usable_cores))"}],"source_content_type":"text/x-python","patch_set":10,"id":"3a50d1a3_4898051c","line":699,"in_reply_to":"3a50d1a3_ebd7a420","updated":"2015-07-30 10:33:29.000000000","message":"Exactly. If the user specifically requested a topology with 4 threads, it would be a lie to use 2 sets of 2 threads and pretend they were siblings. This is also existing behavior - see L690 of base patchset.","commit_id":"a4ceb1b5245aa58c72821322435791d218a4bb36"},{"author":{"_account_id":8768,"name":"Chris Friesen","email":"chris.friesen@windriver.com","username":"cbf123"},"change_message_id":"77a4f4b694b66811eea17b5d5f32b41b99d01b56","unresolved":false,"context_lines":[{"line_number":702,"context_line":"                              itertools.chain(*usable_cores))"},{"line_number":703,"context_line":"                break"},{"line_number":704,"context_line":"            elif threads_no \u003e 1:"},{"line_number":705,"context_line":"                if len(instance_cell) % threads_no !\u003d 0:"},{"line_number":706,"context_line":"                    continue"},{"line_number":707,"context_line":"                pinning \u003d zip(sorted(instance_cell.cpuset),"},{"line_number":708,"context_line":"                              itertools.chain(*usable_cores))"}],"source_content_type":"text/x-python","patch_set":10,"id":"3a50d1a3_ebf2446e","line":705,"updated":"2015-07-29 22:14:16.000000000","message":"Are we saying that the number of vCPUs needs to an exact multiple of the number of threads in a host core?","commit_id":"a4ceb1b5245aa58c72821322435791d218a4bb36"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"20981fd661d4d3f3fbf37c49818c2c7538541c0d","unresolved":false,"context_lines":[{"line_number":702,"context_line":"                              itertools.chain(*usable_cores))"},{"line_number":703,"context_line":"                break"},{"line_number":704,"context_line":"            elif threads_no \u003e 1:"},{"line_number":705,"context_line":"                if len(instance_cell) % threads_no !\u003d 0:"},{"line_number":706,"context_line":"                    continue"},{"line_number":707,"context_line":"                pinning \u003d zip(sorted(instance_cell.cpuset),"},{"line_number":708,"context_line":"                              itertools.chain(*usable_cores))"}],"source_content_type":"text/x-python","patch_set":10,"id":"3a50d1a3_e8ad5185","line":705,"in_reply_to":"3a50d1a3_ebf2446e","updated":"2015-07-30 10:33:29.000000000","message":"Yes, I\u0027m afraid so. This is the way it was working previously and this was by design. Check out this bug for more information on the rationale:\n\n    https://bugs.launchpad.net/nova/+bug/1467927","commit_id":"a4ceb1b5245aa58c72821322435791d218a4bb36"},{"author":{"_account_id":8768,"name":"Chris Friesen","email":"chris.friesen@windriver.com","username":"cbf123"},"change_message_id":"77a4f4b694b66811eea17b5d5f32b41b99d01b56","unresolved":false,"context_lines":[{"line_number":727,"context_line":"        pinning \u003d zip(sorted(instance_cell.cpuset),"},{"line_number":728,"context_line":"                      usable_cores)"},{"line_number":729,"context_line":"        # TODO(sfinucan) This will result in CPU topology with a single core"},{"line_number":730,"context_line":"        #   and n threads. Does this make sense?"},{"line_number":731,"context_line":"        threads_no \u003d len(instance_cell)"},{"line_number":732,"context_line":""},{"line_number":733,"context_line":"    if not pinning:"}],"source_content_type":"text/x-python","patch_set":10,"id":"3a50d1a3_a65791ff","line":730,"updated":"2015-07-29 22:14:16.000000000","message":"Tough call, someone won\u0027t be happy no matter what you do I suspect.  The downside of this is that it could be confusing if the host doesn\u0027t have threads enabled.  Also, it\u0027ll change behaviour on upgrade, right?","commit_id":"a4ceb1b5245aa58c72821322435791d218a4bb36"},{"author":{"_account_id":8768,"name":"Chris Friesen","email":"chris.friesen@windriver.com","username":"cbf123"},"change_message_id":"be2830d157f49f342e10ed5d882621338dd46c4a","unresolved":false,"context_lines":[{"line_number":727,"context_line":"        pinning \u003d zip(sorted(instance_cell.cpuset),"},{"line_number":728,"context_line":"                      usable_cores)"},{"line_number":729,"context_line":"        # TODO(sfinucan) This will result in CPU topology with a single core"},{"line_number":730,"context_line":"        #   and n threads. Does this make sense?"},{"line_number":731,"context_line":"        threads_no \u003d len(instance_cell)"},{"line_number":732,"context_line":""},{"line_number":733,"context_line":"    if not pinning:"}],"source_content_type":"text/x-python","patch_set":10,"id":"3a50d1a3_ea94548d","line":730,"in_reply_to":"3a50d1a3_487c85eb","updated":"2015-07-30 16:39:08.000000000","message":"Arguably the \"best\" option would be to have the guest topology match the host topology.  So if you\u0027re on separate cores on the host then give them separate cores in the guest.  If they\u0027re on two threads of the same core on the host then give them two threads on the same core in the guest.  This would probably be extra code though.","commit_id":"a4ceb1b5245aa58c72821322435791d218a4bb36"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"20981fd661d4d3f3fbf37c49818c2c7538541c0d","unresolved":false,"context_lines":[{"line_number":727,"context_line":"        pinning \u003d zip(sorted(instance_cell.cpuset),"},{"line_number":728,"context_line":"                      usable_cores)"},{"line_number":729,"context_line":"        # TODO(sfinucan) This will result in CPU topology with a single core"},{"line_number":730,"context_line":"        #   and n threads. Does this make sense?"},{"line_number":731,"context_line":"        threads_no \u003d len(instance_cell)"},{"line_number":732,"context_line":""},{"line_number":733,"context_line":"    if not pinning:"}],"source_content_type":"text/x-python","patch_set":10,"id":"3a50d1a3_487c85eb","line":730,"in_reply_to":"3a50d1a3_a65791ff","updated":"2015-07-30 10:33:29.000000000","message":"It will change behavior for the core counts that are multiple of thread counts (i.e. even numbers of cores on systems with Intel HyperThreading). For odd cores it won\u0027t matter.\n\nI considered keeping the existing policy as the default case, but it was a lot of extra code for very little return.\n\nI think a consensus/core approval is the best way to go :)","commit_id":"a4ceb1b5245aa58c72821322435791d218a4bb36"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"fbde18169dd67134ae681165e767667f0e3b25b1","unresolved":false,"context_lines":[{"line_number":692,"context_line":"        if instance_cell.siblings:"},{"line_number":693,"context_line":"            return instance_cell.cpu_topology.threads \u003c\u003d threads_per_core"},{"line_number":694,"context_line":"        else:"},{"line_number":695,"context_line":"            return len(instance_cell) % threads_per_core \u003d\u003d 0"},{"line_number":696,"context_line":""},{"line_number":697,"context_line":"    # We iterate over the can_pack dict in descending order of cores that"},{"line_number":698,"context_line":"    # can be packed - an attempt to get even distribution over time"}],"source_content_type":"text/x-python","patch_set":20,"id":"9a8ffd7b_9920519d","side":"PARENT","line":695,"range":{"start_line":695,"start_character":12,"end_line":695,"end_character":61},"updated":"2015-11-25 14:49:26.000000000","message":"So I\u0027d really like if these were rebased on https://review.openstack.org/229575","commit_id":"6e03dce1e99cc45a4c86c8684106c4392f5424d4"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"fbde18169dd67134ae681165e767667f0e3b25b1","unresolved":false,"context_lines":[{"line_number":725,"context_line":"        else:"},{"line_number":726,"context_line":"            LOG.debug(\"User did not specify a threads policy. Using default \""},{"line_number":727,"context_line":"                      \"for %d cores\", len(instance_cell))"},{"line_number":728,"context_line":"        usable_cores \u003d list(itertools.chain("},{"line_number":729,"context_line":"            *map(lambda s: list(s), available_siblings)))"},{"line_number":730,"context_line":""},{"line_number":731,"context_line":"        if len(list(usable_cores)) \u003c len(instance_cell):"},{"line_number":732,"context_line":"            return"},{"line_number":733,"context_line":""},{"line_number":734,"context_line":"        pinning \u003d zip(sorted(instance_cell.cpuset),"},{"line_number":735,"context_line":"                      usable_cores)"},{"line_number":736,"context_line":"        # TODO(sfinucan) This will result in CPU topology with a single core"},{"line_number":737,"context_line":"        #   and n threads. Does this make sense?"},{"line_number":738,"context_line":"        threads_no \u003d len(instance_cell)"},{"line_number":739,"context_line":""},{"line_number":740,"context_line":"    if not pinning:"},{"line_number":741,"context_line":"        return"}],"source_content_type":"text/x-python","patch_set":20,"id":"9a8ffd7b_79e32d06","line":738,"range":{"start_line":728,"start_character":8,"end_line":738,"end_character":39},"updated":"2015-11-25 14:49:26.000000000","message":"So here we change what the default does? is there a reason why we want to do this?","commit_id":"31d8a3d8ca3497b37b33e9e22f9d64badd6fdd42"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"dbc60bd3467fd51e90821a501ea4f2675bc14215","unresolved":false,"context_lines":[{"line_number":735,"context_line":"                      usable_cores)"},{"line_number":736,"context_line":"        # TODO(sfinucan) This will result in CPU topology with a single core"},{"line_number":737,"context_line":"        #   and n threads. Does this make sense?"},{"line_number":738,"context_line":"        threads_no \u003d len(instance_cell)"},{"line_number":739,"context_line":""},{"line_number":740,"context_line":"    if not pinning:"},{"line_number":741,"context_line":"        return"}],"source_content_type":"text/x-python","patch_set":20,"id":"9a8ffd7b_48277112","line":738,"in_reply_to":"9a8ffd7b_79e32d06","updated":"2015-11-25 15:41:14.000000000","message":"The existing policy was broken on odd number of vCPUs and this was my solution. I\u0027m waiting on your change to get in or get rejected so I know if I should rebase this on top.","commit_id":"31d8a3d8ca3497b37b33e9e22f9d64badd6fdd42"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"d3869c0b203e1aa56177f8355bec6552c9867451","unresolved":false,"context_lines":[{"line_number":691,"context_line":"    # We build up a data structure that answers the question: \u0027Given the"},{"line_number":692,"context_line":"    # number of threads I want to pack, give me a list of all the available"},{"line_number":693,"context_line":"    # sibling sets (or groups thereof) that can accommodate it\u0027"},{"line_number":694,"context_line":"    sibling_sets \u003d collections.defaultdict(list)"},{"line_number":695,"context_line":"    for sib in available_siblings:"},{"line_number":696,"context_line":"        for threads_no in range(1, len(sib) + 1):"},{"line_number":697,"context_line":"            sibling_sets[threads_no].append(sib)"}],"source_content_type":"text/x-python","patch_set":26,"id":"9a8ffd7b_ecfb6745","line":694,"range":{"start_line":694,"start_character":4,"end_line":694,"end_character":16},"updated":"2015-11-27 15:48:03.000000000","message":"not sure why you chose to rename this? I thought that the name was quite \"fitting\" :)","commit_id":"6667a6f61f2f5f7956ab0ed8450cf420e9bc1d84"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"d3869c0b203e1aa56177f8355bec6552c9867451","unresolved":false,"context_lines":[{"line_number":767,"context_line":"            # prefer policies is that require will not settle for non-siblings"},{"line_number":768,"context_line":"            # if this is all that is available. Enforce this by ensuring we\u0027re"},{"line_number":769,"context_line":"            # using sibling sets that contain at least one sibling"},{"line_number":770,"context_line":"            if instance_cell.cpu_thread_policy \u003d\u003d thread_policies.REQUIRE:"},{"line_number":771,"context_line":"                if threads_no \u003c\u003d 1:"},{"line_number":772,"context_line":"                    continue"},{"line_number":773,"context_line":""},{"line_number":774,"context_line":"            pinning \u003d zip(sorted(instance_cell.cpuset),"},{"line_number":775,"context_line":"                          itertools.chain(*usable_cores))"}],"source_content_type":"text/x-python","patch_set":26,"id":"9a8ffd7b_4024b75c","line":772,"range":{"start_line":770,"start_character":11,"end_line":772,"end_character":28},"updated":"2015-11-27 15:48:03.000000000","message":"So the way this is implemented right now, it actually means that we none of the CPUs of the instance will ever end up on an \"orphan\".\n\nSay that we have 4 cores with 2 threads each with usage like this.\n\n[0 1] [2 3] [4 5] [6 7]\n x x   x       x\n\nA 4 vcpu instance would fail to pin to this host because even though two of the CPUs would actually end up on siblings, we can\u0027t expose that to the guest because the GCD maths above allows us to only expose 4 cores with 1 thread each.\n\nThis might need more clarification in the comment.","commit_id":"6667a6f61f2f5f7956ab0ed8450cf420e9bc1d84"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"f57121b5d49086315254b80e087525d266c0e9fd","unresolved":false,"context_lines":[{"line_number":691,"context_line":"    # We build up a data structure that answers the question: \u0027Given the"},{"line_number":692,"context_line":"    # number of threads I want to pack, give me a list of all the available"},{"line_number":693,"context_line":"    # sibling sets (or groups thereof) that can accommodate it\u0027"},{"line_number":694,"context_line":"    sibling_sets \u003d collections.defaultdict(list)"},{"line_number":695,"context_line":"    for sib in available_siblings:"},{"line_number":696,"context_line":"        for threads_no in range(1, len(sib) + 1):"},{"line_number":697,"context_line":"            sibling_sets[threads_no].append(sib)"}],"source_content_type":"text/x-python","patch_set":36,"id":"fa69d971_3e492c32","line":694,"range":{"start_line":694,"start_character":4,"end_line":694,"end_character":16},"updated":"2015-12-31 11:22:30.000000000","message":"Still not sure why the rename :) but I can live with it!","commit_id":"b1dd4f3adc189fa6442c1addcf9e2759ad328455"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"9a04afb053d4df6b74b7c8a32c32725aac25ed32","unresolved":false,"context_lines":[{"line_number":754,"context_line":"        if threads_no * len(sibling_set) \u003c len(instance_cell):"},{"line_number":755,"context_line":"            continue"},{"line_number":756,"context_line":""},{"line_number":757,"context_line":"        usable_cores \u003d map(lambda s: list(s)[:threads_no], sibling_set)"},{"line_number":758,"context_line":""},{"line_number":759,"context_line":"        threads_no \u003d _threads(instance_cell, threads_no)"},{"line_number":760,"context_line":""}],"source_content_type":"text/x-python","patch_set":37,"id":"fa69d971_41646648","line":757,"updated":"2016-01-07 17:06:52.000000000","message":"Before to compute number of cores you should to take care of number of threads per core you need, so this line should be after 759, right ? Also perhaps you should to reflect that in UT.","commit_id":"50ab6ac7ad2cee07a7166c725f946e5cb6e71825"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"433d6962f5504c7deb527660d28953c794a65c30","unresolved":false,"context_lines":[{"line_number":754,"context_line":"        if threads_no * len(sibling_set) \u003c len(instance_cell):"},{"line_number":755,"context_line":"            continue"},{"line_number":756,"context_line":""},{"line_number":757,"context_line":"        usable_cores \u003d map(lambda s: list(s)[:threads_no], sibling_set)"},{"line_number":758,"context_line":""},{"line_number":759,"context_line":"        threads_no \u003d _threads(instance_cell, threads_no)"},{"line_number":760,"context_line":""}],"source_content_type":"text/x-python","patch_set":37,"id":"fa69d971_dfb503ed","line":757,"in_reply_to":"fa69d971_41646648","updated":"2016-01-11 11:37:38.000000000","message":"Not quite. We recalculate the `threads_no` variable to find a value to use in the instance topology. Per Nikola\u0027s recent changes (notably [1] and [2]), the host CPU topology doesn\u0027t have to and in fact should not bear any resemblance to the instance topology.\n\n[1] cc500b2c9880ceb62686e9f1f5db8e6d0e7613d1\n[2] d5bed8fad9d51dd0d4ba9cf452c6f5c8c543b264","commit_id":"50ab6ac7ad2cee07a7166c725f946e5cb6e71825"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"2ff054297dc747a3693c457d16a21e861c60cd59","unresolved":false,"context_lines":[{"line_number":754,"context_line":"        if threads_no * len(sibling_set) \u003c len(instance_cell):"},{"line_number":755,"context_line":"            continue"},{"line_number":756,"context_line":""},{"line_number":757,"context_line":"        usable_cores \u003d map(lambda s: list(s)[:threads_no], sibling_set)"},{"line_number":758,"context_line":""},{"line_number":759,"context_line":"        threads_no \u003d _threads(instance_cell, threads_no)"},{"line_number":760,"context_line":""}],"source_content_type":"text/x-python","patch_set":37,"id":"fa69d971_45ee20ee","line":757,"in_reply_to":"fa69d971_dfb503ed","updated":"2016-01-11 12:13:57.000000000","message":"Ok but for coherence this line should be changed","commit_id":"50ab6ac7ad2cee07a7166c725f946e5cb6e71825"},{"author":{"_account_id":5441,"name":"Andrew Laski","email":"andrew@lascii.com","username":"alaski"},"change_message_id":"14ff90a42ec654af50d8d09687aafdd16685f908","unresolved":false,"context_lines":[{"line_number":1078,"context_line":"                cpu_policy\u003dcpu_policy,"},{"line_number":1079,"context_line":"                cpu_thread_policy\u003dcpu_thread_policy)"},{"line_number":1080,"context_line":"        numa_topology \u003d objects.InstanceNUMATopology(cells\u003d[single_cell])"},{"line_number":1081,"context_line":""},{"line_number":1082,"context_line":"    return numa_topology"},{"line_number":1083,"context_line":""},{"line_number":1084,"context_line":""}],"source_content_type":"text/x-python","patch_set":37,"id":"fa69d971_45ae042f","line":1081,"updated":"2016-01-11 20:44:52.000000000","message":"Please avoid extraneous whitespace changes in the future.  I prefer the line break here as well, but it doesn\u0027t belong in this change.","commit_id":"50ab6ac7ad2cee07a7166c725f946e5cb6e71825"}]}
