)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"e421b0a4f4cb41a446b81a2236e6a15d01eb4602","unresolved":true,"context_lines":[{"line_number":4,"context_line":"Commit:     Ilya Popov \u003cilya_p@hotmail.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2021-08-23 21:33:29 +0300"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Fix to use cell with more free memory first"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"By default, first instance\u0027s cell are placed to the host\u0027s cell with"},{"line_number":10,"context_line":"id 0, so it will be exhausted first. Than host\u0027s cell with id 1 will"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"4a32b984_4f56ad30","line":7,"range":{"start_line":7,"start_character":11,"end_line":7,"end_character":15},"updated":"2021-08-30 13:36:42.000000000","message":"nit just to avoid confusion use \"NUMA cell\"","commit_id":"5169a41677581691472fac077af633479fd08fa4"},{"author":{"_account_id":16198,"name":"Ilya Popov","email":"hebulrih@gmail.com","username":"IPO"},"change_message_id":"5ca634f0735bf456020992f6960dcacdd95cb777","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Ilya Popov \u003cilya_p@hotmail.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2021-08-23 21:33:29 +0300"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Fix to use cell with more free memory first"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"By default, first instance\u0027s cell are placed to the host\u0027s cell with"},{"line_number":10,"context_line":"id 0, so it will be exhausted first. Than host\u0027s cell with id 1 will"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"ce430a4c_fba0f13d","line":7,"range":{"start_line":7,"start_character":11,"end_line":7,"end_character":15},"in_reply_to":"4a32b984_4f56ad30","updated":"2021-09-22 08:51:07.000000000","message":"Done","commit_id":"5169a41677581691472fac077af633479fd08fa4"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"e421b0a4f4cb41a446b81a2236e6a15d01eb4602","unresolved":true,"context_lines":[{"line_number":15,"context_line":"move more used cells to the end of list. If some cells have special"},{"line_number":16,"context_line":"PCI devices attached to cell, fix adds most memory used cell to"},{"line_number":17,"context_line":"that group, to put this group at the end of host\u0027s cells list and"},{"line_number":18,"context_line":"to use cells with more free RAM first."},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"Closes-Bug: #1940668"},{"line_number":21,"context_line":"Change-Id: I03c4db3c36a780aac19841b750ff59acd3572ec6"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"b3cd992e_478078e1","line":18,"updated":"2021-08-30 13:36:42.000000000","message":"This is definitely a direction, one might want to optimize towards. But I\u0027m not sure this is something we want by default to be the strategy. @Sean: what do you think?","commit_id":"5169a41677581691472fac077af633479fd08fa4"},{"author":{"_account_id":16198,"name":"Ilya Popov","email":"hebulrih@gmail.com","username":"IPO"},"change_message_id":"2d67dd5b237c2bfa85bfdfbc9aa75ac4f5ea2dfa","unresolved":false,"context_lines":[{"line_number":15,"context_line":"move more used cells to the end of list. If some cells have special"},{"line_number":16,"context_line":"PCI devices attached to cell, fix adds most memory used cell to"},{"line_number":17,"context_line":"that group, to put this group at the end of host\u0027s cells list and"},{"line_number":18,"context_line":"to use cells with more free RAM first."},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"Closes-Bug: #1940668"},{"line_number":21,"context_line":"Change-Id: I03c4db3c36a780aac19841b750ff59acd3572ec6"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"b5d3ce08_4f9fa365","line":18,"in_reply_to":"12aaeb68_f198ff0f","updated":"2021-10-29 10:54:18.000000000","message":"Done","commit_id":"5169a41677581691472fac077af633479fd08fa4"},{"author":{"_account_id":16198,"name":"Ilya Popov","email":"hebulrih@gmail.com","username":"IPO"},"change_message_id":"5ca634f0735bf456020992f6960dcacdd95cb777","unresolved":true,"context_lines":[{"line_number":15,"context_line":"move more used cells to the end of list. If some cells have special"},{"line_number":16,"context_line":"PCI devices attached to cell, fix adds most memory used cell to"},{"line_number":17,"context_line":"that group, to put this group at the end of host\u0027s cells list and"},{"line_number":18,"context_line":"to use cells with more free RAM first."},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"Closes-Bug: #1940668"},{"line_number":21,"context_line":"Change-Id: I03c4db3c36a780aac19841b750ff59acd3572ec6"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"12aaeb68_f198ff0f","line":18,"in_reply_to":"b3cd992e_478078e1","updated":"2021-09-22 08:51:07.000000000","message":"Thank you for your comments, Balazs! Unfortunatelly I didn\u0027t get email notification about your comments, so I processed them with delay. (It could be the same situation with Sean :) ).\n\nThere are my suggestions about this problem:\n\nFor VMs without numa topology the situation will be the same (not worse). For VMs with one NUMA cell topology there will not be worse either. But for VMs with two NUMA cells we will improve situation. And we will DRAMATICALLY IMROVE situation with VMs with large number of NUMA cells. It affects public clouds very much, when most clients create VMs with as small as possible flavors to save the money. And when someone come even with medium flavor\u0027s VM with four NUMA cells on to hypervisor with four NUMA cells, and first NUMA cell crowded by small VMs - it got error. So we have hypervisor with 75% free resources and it isn\u0027t possible to place VM on it!","commit_id":"5169a41677581691472fac077af633479fd08fa4"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"a32070e03a3b54af8b0585c93b891e3d7a460e05","unresolved":true,"context_lines":[{"line_number":19,"context_line":"that group, to put this group at the end of host\u0027s cells list and"},{"line_number":20,"context_line":"to use cells with more free RAM first."},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"Closes-Bug: #1940668"},{"line_number":23,"context_line":"Change-Id: I03c4db3c36a780aac19841b750ff59acd3572ec6"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"83af0c17_6468f0c2","line":22,"updated":"2021-09-22 09:53:46.000000000","message":"Partial-Bug","commit_id":"f1de6c34a5f14e75fa6a397aae5fff25455abc86"},{"author":{"_account_id":16198,"name":"Ilya Popov","email":"hebulrih@gmail.com","username":"IPO"},"change_message_id":"bc8858fb9825fa9d48f01199da2b7bdd932726cb","unresolved":false,"context_lines":[{"line_number":19,"context_line":"that group, to put this group at the end of host\u0027s cells list and"},{"line_number":20,"context_line":"to use cells with more free RAM first."},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"Closes-Bug: #1940668"},{"line_number":23,"context_line":"Change-Id: I03c4db3c36a780aac19841b750ff59acd3572ec6"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"4a12be89_e9e09bd4","line":22,"in_reply_to":"83af0c17_6468f0c2","updated":"2021-09-22 19:24:23.000000000","message":"Done","commit_id":"f1de6c34a5f14e75fa6a397aae5fff25455abc86"}],"/PATCHSET_LEVEL":[{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"6ecbc3cee5766f5054504b1be56cef5347578ad5","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":6,"id":"d0184364_e5747384","updated":"2021-10-14 11:43:24.000000000","message":"\u003e Patch Set 5:\n\u003e \n\u003e \u003e Patch Set 5:\n\u003e \u003e \n\u003e \u003e by the way this is not really a bugfix its a feature\n\u003e \u003e https://bugs.launchpad.net/nova/+bug/1887377\n\u003e \u003e and there is a related bugfix for pci affintiy https://bugs.launchpad.net/nova/+bug/1893121\n\u003e \u003e \n\u003e \u003e likely we would need the treat this as a specless bluepring that said if other are happy to treat this as a bug fix and backport now im not against that.\n\u003e \n\u003e Sean, this is long and very interesting story as I can see. 😊\n\u003e \n\u003e So I need some confirmations that I understood your ideas correctly.\n\u003e \n\u003e 1. I perform corrections to my fix to remove else block:\n\u003e \n\u003e         else:\n\u003e             host_cells \u003d sorted(\n\u003e                 host_cells, key\u003dlambda cell: cell.memory_usage)\n\u003e \n\u003e Will it be merged this way finally to get \"quick fix\" for all interested subjects?\n\nsorry i did not have time to get back to this for now yes i would have been ok with the \"qucik fix\" in the intial patch\n\u003e 2. I start to work on more complicated sort under the NEW REVIEW, based on bugs you provided ?\nand  a follow set of patch es for the rest of the sorts\n\n\u003e \n\u003e Or you mean that both above steps will be the several patches on exact this review ?\n\ni mean a chanin of patches bug since you have already put them into this singel patch we can proceed with that.\n\n\u003e \n\u003e 3. There are differences in sorting order proposals, mentioned in 3 sources:\n\u003e \n\u003e - in your comment on current review there are:\n\u003e \n\u003e num pci devices\n\u003e free memory\n\u003e free hugepages\n\u003e free pinnded cpus\n\u003e \n\u003e - in https://bugs.launchpad.net/nova/+bug/1887377\n\u003e \n\u003e order based on pMEM, pCPUs, mempages and pci devices in that sequence.\n\nthe exact order will alther the behavior but im not sure there is a clear winner.\n\n\u003e \n\u003e - in https://bugs.launchpad.net/nova/+bug/1893121\n\u003e \n\u003e so we can also adress the numa blanceing issue by\n\u003e first sorting by instance per numa node\n\u003e then sorting by free memory per numa node\n\u003e then by cpus per numa node and finally\n\u003e by pci device per numa node.\n\u003e \n\u003e What sort order will we use finally ?\n\nyes that is also a valid ordering we woudl be useing the instnace count in this case more as a proxy for possible memory contention then anything else but i think we can agree that regardelsss of what\norderign we choose it should improve the current behaivor if we consider the other factros instead of just doing a linear search as we do today.\n\nidealy we woudl eventurally want to not rely on sorting and develop a cost metric and minimse that cost but that is a much more invasive change. i think we can proceed with what you have impleteneted initally and we can always refine this latere if required.\n","commit_id":"57708dfef0138c753f01a954f595f3921c2af0a6"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"1a157e22e4baec1a7348565b6bb1cd250eba115d","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":6,"id":"0f7fe03e_88df4a2a","updated":"2021-10-14 12:08:33.000000000","message":"i think over all this has promice but you will need to add unit/functional test that assert the sorting behaviour hence the -1\n\nyou also need to add a release note that descies the fix.\n\nis have some comments inline as in general you seam to be prefering the more hevilay used numa nodes where as i think we would be bettere off spreading by default instead of packing.","commit_id":"57708dfef0138c753f01a954f595f3921c2af0a6"},{"author":{"_account_id":16198,"name":"Ilya Popov","email":"hebulrih@gmail.com","username":"IPO"},"change_message_id":"ff3f411f0f246b720ed893cf65877dbfc2c4130c","unresolved":true,"context_lines":[],"source_content_type":"","patch_set":6,"id":"9062a1a9_a3f62e9a","in_reply_to":"0f7fe03e_88df4a2a","updated":"2021-10-14 19:30:37.000000000","message":"Thank you, Sean. I will go ahead, finalizing source code and reno and tests afterwards","commit_id":"57708dfef0138c753f01a954f595f3921c2af0a6"},{"author":{"_account_id":16198,"name":"Ilya Popov","email":"hebulrih@gmail.com","username":"IPO"},"change_message_id":"2d67dd5b237c2bfa85bfdfbc9aa75ac4f5ea2dfa","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":6,"id":"13376f4a_0341e3e9","in_reply_to":"9062a1a9_a3f62e9a","updated":"2021-10-29 10:54:18.000000000","message":"Done","commit_id":"57708dfef0138c753f01a954f595f3921c2af0a6"},{"author":{"_account_id":16198,"name":"Ilya Popov","email":"hebulrih@gmail.com","username":"IPO"},"change_message_id":"eede50fbb068d83c78a9b481251912a795a57145","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":8,"id":"5894a0cd_db35da42","updated":"2021-10-19 10:56:12.000000000","message":"I beleive the main code looks like to be more or less the one we wanted. Local pep8/functional/unit tests are passed successfull.\nNext step is to prepare release note and functional tests ","commit_id":"6c3ac47e8324d4f68e989d5d2f54951fd2160076"},{"author":{"_account_id":16198,"name":"Ilya Popov","email":"hebulrih@gmail.com","username":"IPO"},"change_message_id":"688a449214be4ca8694036ceeea940a78626db8e","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":8,"id":"1b02e3f5_f9922206","in_reply_to":"1aea983b_318ca646","updated":"2021-10-26 19:32:48.000000000","message":"Done","commit_id":"6c3ac47e8324d4f68e989d5d2f54951fd2160076"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"41aaea0a034d86286be2cbefad2429b6e6123ffe","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":8,"id":"f806522c_1b82397e","in_reply_to":"5894a0cd_db35da42","updated":"2021-10-19 12:03:53.000000000","message":"overall i think i agree the overall logic appears to be more or less correct to me.\n\nwe will need a release note and functional test as you mentioned but you might want some unit test also.\n\nill review the test coverage you add once it up but ideally we want to test each part of the sorting stages indepenently by ensureing the other factors are equal \n\nand then at least one thest that trigres multiple of the sorting steps.\n\nin a functional test you will have to do this by booting vms and tweakign the resouce configuration in a uinit test you can simply call\nnuma_fit_instance_to_host and pass the relevent inputs and  assert the output state so i think doing this in unit tests will be simpler.","commit_id":"6c3ac47e8324d4f68e989d5d2f54951fd2160076"},{"author":{"_account_id":16198,"name":"Ilya Popov","email":"hebulrih@gmail.com","username":"IPO"},"change_message_id":"0574fd124e8b3b9c796689bbaaa294e3de709c43","unresolved":true,"context_lines":[],"source_content_type":"","patch_set":8,"id":"1aea983b_318ca646","in_reply_to":"f806522c_1b82397e","updated":"2021-10-19 13:42:09.000000000","message":"Ok. As I understood, for tests I need to add something to nova/tests/unit/virt/test_hardware.py as unit tests. And It could be enough in general for this particular sorting feature we implemented.","commit_id":"6c3ac47e8324d4f68e989d5d2f54951fd2160076"},{"author":{"_account_id":16198,"name":"Ilya Popov","email":"hebulrih@gmail.com","username":"IPO"},"change_message_id":"330e311dac394820506b270eb44682582079c2cc","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":10,"id":"36bc3c65_497282be","updated":"2021-10-26 19:39:09.000000000","message":"I think it is better to move _create_pci_stats to class level to reduce code size and remove repeats","commit_id":"6940f4e8087d45f8761f35abc0784b05f952b74c"},{"author":{"_account_id":16198,"name":"Ilya Popov","email":"hebulrih@gmail.com","username":"IPO"},"change_message_id":"688a449214be4ca8694036ceeea940a78626db8e","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":10,"id":"5f5ead7d_74cd3573","updated":"2021-10-26 19:32:48.000000000","message":"So finally I created 7 tests which will cover all sorting paths:\n\nThere are some notes:\n\nAvailable sorts (sort id and sort function)\n\n0. No sorting len(host_topology) \u003d len(instance_topology)\n\n1. host_cells \u003d sorted(\n                    host_cells,\n                    reverse\u003dTrue,\n                    key\u003dlambda cell: total_pci_in_cell.get(cell.id, 0))\n\n2. host_cells \u003d sorted(\n                    host_cells,\n                    key\u003dlambda cell: total_pci_in_cell.get(cell.id, 0))\n\n3. host_cells \u003d sorted(\n            host_cells,\n            reverse\u003dTrue,\n            key\u003dlambda cell: cell.avail_memory)\n\n4. host_cells \u003d sorted(host_cells,\n                                reverse\u003dTrue,\n                                key\u003dlambda cell: len(cell.free_pcpus))\n\n5. host_cells \u003d sorted(host_cells, key\u003dlambda cell: cell.cpu_usage)\n\nAvailable sorting paths, numbers of sorts should been performed and corresponding test implemented.\n\t\t\t\t\nNumber: Performed sorts (see sort ids above)\n1     : 0 test_sort_host_numa_cell_num_equal_instance_cell_num\n2     : 3,4 test_sort_no_pci_stats_no_shared_cpus\n3     : 3,5 test_sort_no_pci_stats_shared_cpus\n4     : 1,3,4 test_sort_pci_stats_pci_req_no_shared_cpu\n5     : 1,3,5 test_sort_pci_stats_pci_req_shared_cpu\n6     : 2,3,4 test_sort_pci_stats_and_no_pci_req_no_shared_cpu\n7     : 2,3,5 test_sort_pci_stats_and_no_pci_req_shared_cpu\n\n\n1. No sorting. Should verify 0 1 2 in instance topo\n\n2.\n0  3  2\n1  0  3\n2  1  0\n3  2  1\nShould verify 2 3 0 in instance topo\n\n3. \n0  3  3\n1  0  1\n2  1  2\n3  2  0\nShould verify 3 1 2 in instance topo\n\n4. \n0  1  3  2\n1  0  1  3\n2  2  0  1\n3  3  2  0\nShould verify 2 3 1 in instance topo\n\n5. \n0  1  3  3\n1  0  1  1\n2  2  0  2\n3  3  2  0\nShould verify 3 1 2 in instance topo\n\n6. \n0  0  3  2\n1  2  0  3\n2  3  2  0\n3  1  1  1\nShould verify 2 3 0 in instance topo\n\n7. \n0  0  3  3\n1  2  0  2\n2  3  2  1\n3  1  1  0\nShould verify 3 2 1 in instance topo","commit_id":"6940f4e8087d45f8761f35abc0784b05f952b74c"},{"author":{"_account_id":16198,"name":"Ilya Popov","email":"hebulrih@gmail.com","username":"IPO"},"change_message_id":"6812c2e4b25aed0f5517f0176cdc064b30bbfb9f","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":14,"id":"1b492e76_26fd66df","updated":"2021-11-20 15:52:45.000000000","message":"Hello Sean !\nThank you for review, comments and info. I will perform changes you proposed.\n","commit_id":"66cecca5b8f607415b7867ebabffe378a56692ee"},{"author":{"_account_id":16198,"name":"Ilya Popov","email":"hebulrih@gmail.com","username":"IPO"},"change_message_id":"519a89c2cadcaf7427c87fd477bcb44a7f7dc223","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":14,"id":"98ccee36_f80b9a0d","updated":"2021-11-19 08:23:59.000000000","message":"Up. Review, comments and +2 are needed 😊","commit_id":"66cecca5b8f607415b7867ebabffe378a56692ee"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"26677f602da435a1f8ce8f9d0101d9473cad9e99","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":14,"id":"fa5745b2_30a29809","updated":"2021-11-19 12:08:20.000000000","message":"hi sorry i ment to post that feedback right after the ptg but i left it in my drafts.\n\nsorry for the delay in relaying that.","commit_id":"66cecca5b8f607415b7867ebabffe378a56692ee"},{"author":{"_account_id":16198,"name":"Ilya Popov","email":"hebulrih@gmail.com","username":"IPO"},"change_message_id":"f3e21c5003c81d4054661147fd79fd8b67db9874","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":15,"id":"4a4e73e6_1f703112","updated":"2021-12-06 10:14:45.000000000","message":"Additional step and validation added for each test\nto check sorting according to configuration option.\n\nHost NUMA cell topo:\n\nNUMA cell 0: have most cpu usage\nNUMA cell 1: will have most PCI available\nNUMA cell 2: have most free pcpus\nNUMA cell 4: have most available memory\n\nAvailable sorts (sort id and sort function)\n\n0. No sorting len(host_topology) \u003d len(instance_topology)\n\n1. host_cells \u003d sorted(\n\n                    host_cells,\n                    reverse\u003dTrue,\n                    key\u003dlambda cell: total_pci_in_cell.get(cell.id, 0))\n2. host_cells \u003d sorted(\n\n                    host_cells,\n                    key\u003dlambda cell: total_pci_in_cell.get(cell.id, 0))\n3. host_cells \u003d sorted(\n\n            host_cells,\n            reverse\u003dTrue,\n            key\u003dlambda cell: cell.avail_memory)\n4. host_cells \u003d sorted(host_cells,\n\n                                reverse\u003dTrue,\n                                key\u003dlambda cell: len(cell.free_pcpus))\n5. host_cells \u003d sorted(host_cells, key\u003dlambda cell: cell.cpu_usage)\n\nAvailable sorting paths, numbers of sorts should been performed and corresponding test implemented.\n\n\t\t\t\t\nNumber: Performed sorts (see sort ids above)\n1     : 0 test_sort_host_numa_cell_num_equal_instance_cell_num\n2     : 3,4 test_sort_no_pci_stats_no_shared_cpus\n3     : 3,5 test_sort_no_pci_stats_shared_cpus\n4     : 1,3,4 test_sort_pci_stats_pci_req_no_shared_cpu\n5     : 1,3,5 test_sort_pci_stats_pci_req_shared_cpu\n6     : 2,3,4 test_sort_pci_stats_and_no_pci_req_no_shared_cpu\n7     : 2,3,5 test_sort_pci_stats_and_no_pci_req_shared_cpu\n\n1. No sorting. Should verify 0 1 2 in instance topo\n\n2.1 Default option (\"Pack\" strategy)\n0  0  0\n1  1  1\n2  2  3\n3  3  2\nShould verify 0 1 3 in instance topo\n\n2.2 (\"Spread\" strategy)\n0  3  2\n1  0  3\n2  1  0\n3  2  1\nShould verify 2 3 0 in instance topo\n\n3.1 Default option (\"Pack\" strategy)\n0  0  0\n1  1  1\n2  2  2\n3  3  3\nShould verify 0 1 2 in instance topo\n\n3.2 (\"Spread\" strategy)\n0  3  3\n1  0  1\n2  1  2\n3  2  0\nShould verify 3 1 2 in instance topo\n\n4.1 Default option (\"Pack\" strategy) \n0  0  0  0\n1  2  2  1\n2  3  1  3\n3  1  3  4\nShould verify 0 1 3 in instance topo\n\n4.2 (\"Spread\" strategy) \n0  1  3  2\n1  0  1  3\n2  2  0  1\n3  3  2  0\nShould verify 2 3 1 in instance topo\n\n5.1 Default option (\"Pack\" strategy)\n0  0  0  0\n1  2  2  2\n2  3  1  1\n3  1  3  3\nShould verify 0 2 1 in instance topo\n\n5.2 (\"Spread\" strategy)\n0  1  3  3\n1  0  1  1\n2  2  0  2\n3  3  2  0\nShould verify 3 1 2 in instance topo\n\n6.1 Default option (\"Pack\" strategy) \n0  1  1  1\n1  0  0  0\n2  2  2  3\n3  3  3  2\nShould verify 1 0 3 in instance topo\n\n6.2 (\"Spread\" strategy) \n0  0  3  2\n1  2  0  3\n2  3  2  0\n3  1  1  1\nShould verify 2 3 0 in instance topo\n\n7.1 Default option (\"Pack\" strategy) \n0  1  1  0\n1  0  0  1\n2  2  2  2\n3  3  3  3\nShould verify 3 2 1 in instance topo\n\n7.2 (\"Spread\" strategy) \n0  0  3  3\n1  2  0  2\n2  3  2  1\n3  1  1  0\nShould verify 3 2 1 in instance topo","commit_id":"1c019ac2ecb751dd7e5fe5ebb25153e8793f26af"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"4e3bde450c45b20c23389a088ba535338ee790fb","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":17,"id":"d626cb5c_8b4aa830","updated":"2021-12-06 11:57:32.000000000","message":"just a quick review ill try and get back to this agin later today\n\noverall i think this looks good i might ask for this to be added as a review priority once i\nfinsih reviewing it. assuming the ci passes again i think this is close to being ready to merge","commit_id":"7e7c122321051a26eda6f8d0d478ae6b668a761c"},{"author":{"_account_id":16198,"name":"Ilya Popov","email":"hebulrih@gmail.com","username":"IPO"},"change_message_id":"a9821bdc09979670d8ef7f71eaafead2814631b8","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":20,"id":"fbd4ef64_133079c4","updated":"2021-12-20 15:47:04.000000000","message":"Up. As usual. Review, comments and +2 are needed 😊","commit_id":"6cd00a5460e4df3c12060c57994a6beb4aa8f48d"},{"author":{"_account_id":16198,"name":"Ilya Popov","email":"hebulrih@gmail.com","username":"IPO"},"change_message_id":"a16409cd22f97d6334c6667dc0ece191490391a1","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":20,"id":"b77806e9_a34dc478","updated":"2021-12-21 08:48:46.000000000","message":"recheck","commit_id":"6cd00a5460e4df3c12060c57994a6beb4aa8f48d"},{"author":{"_account_id":16198,"name":"Ilya Popov","email":"hebulrih@gmail.com","username":"IPO"},"change_message_id":"0e3889d035acbb71d7158347cf9f5858a9e57e37","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":20,"id":"d89400bd_15e2099f","updated":"2021-12-21 07:16:10.000000000","message":"recheck","commit_id":"6cd00a5460e4df3c12060c57994a6beb4aa8f48d"},{"author":{"_account_id":16198,"name":"Ilya Popov","email":"hebulrih@gmail.com","username":"IPO"},"change_message_id":"e0b33ad4816160c05fa55c0bf82e6e0f2db125d6","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":21,"id":"6abca79b_73fcb957","updated":"2022-01-05 21:40:08.000000000","message":"I suppose I corrected all needed to be corrected in comments and the rest of comments were answered or just notes or could be fixed later in new review thread/iterration","commit_id":"ce3929191458af236d21e25f78265e106ba89e00"},{"author":{"_account_id":16198,"name":"Ilya Popov","email":"hebulrih@gmail.com","username":"IPO"},"change_message_id":"48cb270484fa860a0e81fec3dacad04c7c744b27","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":21,"id":"29636aa8_b38c785d","updated":"2022-01-11 11:11:53.000000000","message":"Minor changes: Comments in code were changed according to latest code","commit_id":"ce3929191458af236d21e25f78265e106ba89e00"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"86c27f0d76065954a1bfbc4b2836df6973318840","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":21,"id":"7f5ee49f_a6c4e902","updated":"2022-01-05 21:40:05.000000000","message":"thanks for reworkign this.\n\ni think overall i am happy with this as proposed.\n\nthere is still the open question regarding fi the pci devices should\nignore the new config option or not but as i said in my previous review\ni think im ok with discussing that in a follow up so i would like to see what other reviews think\nso i have upgraded my review to a +1","commit_id":"ce3929191458af236d21e25f78265e106ba89e00"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"af66c202e4b763ead4d459538926a0b3c8e29d3d","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":21,"id":"139d3d1d_1b88a31a","in_reply_to":"29636aa8_b38c785d","updated":"2022-01-11 11:50:05.000000000","message":"ack the tweaks make sense to me.\nim still +1 on this over all","commit_id":"ce3929191458af236d21e25f78265e106ba89e00"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"6e07d338f626393c1d8fad521e2950ecd887ad60","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":22,"id":"17dce258_57f5f6e2","updated":"2022-02-01 11:21:51.000000000","message":"At least a more detailed documentation is need to be added that describe the actual strategy now nova takes to place the guest NUMA nodes to host nodes. ","commit_id":"994d4f0bbc4ea0b0f88cc8a4e85570a4c7e2e9e6"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"4aa70bd13e933b8c4c2037c8d2dc0ca2b97bd962","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":22,"id":"9ff44773_d114d85a","updated":"2022-02-01 13:38:59.000000000","message":"droping to +1 until we discuss gibis comments\n","commit_id":"994d4f0bbc4ea0b0f88cc8a4e85570a4c7e2e9e6"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"f259f85757779e12d993cf2dac4372ddbd578228","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":24,"id":"6d348e3a_01e4e5ad","updated":"2022-02-03 11:14:02.000000000","message":"@Ilya: Thanks, the logic looks good to me.","commit_id":"3b806f909c52a1f16d8a2ec3a763af6de30346b1"},{"author":{"_account_id":16198,"name":"Ilya Popov","email":"hebulrih@gmail.com","username":"IPO"},"change_message_id":"99df8485c4ddacb369b6aeb2ab2918eaaebc2bb6","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":24,"id":"d01222e2_f5d27235","updated":"2022-02-02 18:32:33.000000000","message":"I implement backport compatibility for pci sorts. Of course new sortings are used and host\u0027s NUMA cells are sorted based on number of PCI (before fix sort was based just on fact of presence of PCI in host\u0027s cells).  \n\nIf code looks to be ok - I will process with documentation","commit_id":"3b806f909c52a1f16d8a2ec3a763af6de30346b1"},{"author":{"_account_id":16198,"name":"Ilya Popov","email":"hebulrih@gmail.com","username":"IPO"},"change_message_id":"d865a92743ab22e525be20d3ec1205473ddac50a","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":24,"id":"8c87034e_32578ca2","updated":"2022-02-03 10:13:53.000000000","message":"recheck","commit_id":"3b806f909c52a1f16d8a2ec3a763af6de30346b1"},{"author":{"_account_id":16198,"name":"Ilya Popov","email":"hebulrih@gmail.com","username":"IPO"},"change_message_id":"ea24f6a0b8335535bb35fe3c56f2a69355c544fa","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":25,"id":"986b407a_d558b6a5","updated":"2022-02-03 14:45:10.000000000","message":"As we more or less agree with logic, I will start with docs","commit_id":"5e36e75f002dd211bfb18baf9f983b59f9a8d99a"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"1fb600479db3076f0ade9502ff621568d68dbdb3","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":25,"id":"c1c83a54_533e4c32","updated":"2022-02-04 09:29:05.000000000","message":"looks good. I will check back when the doc is up","commit_id":"5e36e75f002dd211bfb18baf9f983b59f9a8d99a"},{"author":{"_account_id":16198,"name":"Ilya Popov","email":"hebulrih@gmail.com","username":"IPO"},"change_message_id":"aadfb6b5fc40a68f6e7f0c2cad75c7cbcde81f46","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":26,"id":"31dfa620_b1766093","updated":"2022-02-06 12:07:15.000000000","message":"Documentation draft change is published for doc/source/admin/cpu-topologies.rst. I suppose it isn\u0027t needed to update doc/source/admin/networking.rst - it has references for cpu-topologies.rst and I didn\u0027t see any places to change something.","commit_id":"049b4cfac97ba8d315501a59f1e4a7a4ee5f61e6"},{"author":{"_account_id":16198,"name":"Ilya Popov","email":"hebulrih@gmail.com","username":"IPO"},"change_message_id":"869ce784313b1522379087f198c49e66d623da3a","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":26,"id":"c05e8cba_f5e5cd97","updated":"2022-02-07 13:54:45.000000000","message":"Done","commit_id":"049b4cfac97ba8d315501a59f1e4a7a4ee5f61e6"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"f05f47cd7049cca04916392dd4ca18a042200cfa","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":26,"id":"4915fef4_173c6620","updated":"2022-02-07 10:30:52.000000000","message":"thanks for the doc. I have a couple of comments inline.","commit_id":"049b4cfac97ba8d315501a59f1e4a7a4ee5f61e6"},{"author":{"_account_id":16198,"name":"Ilya Popov","email":"hebulrih@gmail.com","username":"IPO"},"change_message_id":"7ec59393c6ac2761c93bc1e57140c8d3e4eb60db","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":27,"id":"dd3e25a8_c1c1b6ed","updated":"2022-02-07 22:05:04.000000000","message":"recheck","commit_id":"adf3f9c5f811a530611d5ddfa2a52b3d5925e261"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"4437b7c02baed7e4818a057ab010436b243cc603","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":28,"id":"edb02288_28f7678d","updated":"2022-02-08 11:47:34.000000000","message":"Looks good to me. Thank you Ilya for the effort!","commit_id":"d13412648d011994a146dac1e7214ead3b82b31b"},{"author":{"_account_id":16198,"name":"Ilya Popov","email":"hebulrih@gmail.com","username":"IPO"},"change_message_id":"0f23067d907e893e608850149a6a6ebc66f4d522","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":28,"id":"d97584cd_0a92d2e7","updated":"2022-02-08 08:12:09.000000000","message":"Rebased to latest code","commit_id":"d13412648d011994a146dac1e7214ead3b82b31b"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"9d4eccff5f1ab17afa65a7bf8b4b55a9a06e8a56","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":28,"id":"3af7322d_21898c16","updated":"2022-02-17 18:27:31.000000000","message":"Thanks for your patience with us getting this all squared away.\n\nas gibi noted on irc i was +2 on this previously and you have also addressed the shared concern we had with regards to pci device sorting.\n\nthis shoudl be backward compatible in the non numa case and actually implenet a preference for pci device too in addition to the numa sorting.\n\nas such im very happy to see this completed.","commit_id":"d13412648d011994a146dac1e7214ead3b82b31b"},{"author":{"_account_id":16198,"name":"Ilya Popov","email":"hebulrih@gmail.com","username":"IPO"},"change_message_id":"d8c9942a046f8853c5027bb1d693410ff3b56ed6","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":28,"id":"d96fac42_74ff150e","in_reply_to":"edb02288_28f7678d","updated":"2022-02-08 12:07:32.000000000","message":"Thanks for comments and review, Balazs !","commit_id":"d13412648d011994a146dac1e7214ead3b82b31b"}],"doc/source/admin/cpu-topologies.rst":[{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"f05f47cd7049cca04916392dd4ca18a042200cfa","unresolved":true,"context_lines":[{"line_number":99,"context_line":"``packing_host_numa_cells_allocation_strategy`` configuration variable in"},{"line_number":100,"context_line":"nova.conf. By default ``packing_host_numa_cells_allocation_strategy``"},{"line_number":101,"context_line":"variable is set to ``True``. It leads to attempt to chose NUMA node(s) with"},{"line_number":102,"context_line":"less amount of free resources (or in other words MORE USED NUMA nodes) first."},{"line_number":103,"context_line":"It is so-called \"pack\" strategy - we try to place as much as possible load at"},{"line_number":104,"context_line":"MORE USED host\u0027s NUMA node untill it will be completely exhausted. And only"},{"line_number":105,"context_line":"after we will choose MOST USED host\u0027s NUMA node from the rest available nodes"}],"source_content_type":"text/x-rst","patch_set":26,"id":"65c3595f_14e7b5aa","line":102,"range":{"start_line":102,"start_character":49,"end_line":102,"end_character":58},"updated":"2022-02-07 10:30:52.000000000","message":"full capital feels shouting. I agree to emphasize these but please use bold instead, here and below\n  **more used**","commit_id":"049b4cfac97ba8d315501a59f1e4a7a4ee5f61e6"},{"author":{"_account_id":16198,"name":"Ilya Popov","email":"hebulrih@gmail.com","username":"IPO"},"change_message_id":"869ce784313b1522379087f198c49e66d623da3a","unresolved":false,"context_lines":[{"line_number":99,"context_line":"``packing_host_numa_cells_allocation_strategy`` configuration variable in"},{"line_number":100,"context_line":"nova.conf. By default ``packing_host_numa_cells_allocation_strategy``"},{"line_number":101,"context_line":"variable is set to ``True``. It leads to attempt to chose NUMA node(s) with"},{"line_number":102,"context_line":"less amount of free resources (or in other words MORE USED NUMA nodes) first."},{"line_number":103,"context_line":"It is so-called \"pack\" strategy - we try to place as much as possible load at"},{"line_number":104,"context_line":"MORE USED host\u0027s NUMA node untill it will be completely exhausted. And only"},{"line_number":105,"context_line":"after we will choose MOST USED host\u0027s NUMA node from the rest available nodes"}],"source_content_type":"text/x-rst","patch_set":26,"id":"acb1b2e2_fd5eb555","line":102,"range":{"start_line":102,"start_character":49,"end_line":102,"end_character":58},"in_reply_to":"65c3595f_14e7b5aa","updated":"2022-02-07 13:54:45.000000000","message":"Done","commit_id":"049b4cfac97ba8d315501a59f1e4a7a4ee5f61e6"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"f05f47cd7049cca04916392dd4ca18a042200cfa","unresolved":true,"context_lines":[{"line_number":101,"context_line":"variable is set to ``True``. It leads to attempt to chose NUMA node(s) with"},{"line_number":102,"context_line":"less amount of free resources (or in other words MORE USED NUMA nodes) first."},{"line_number":103,"context_line":"It is so-called \"pack\" strategy - we try to place as much as possible load at"},{"line_number":104,"context_line":"MORE USED host\u0027s NUMA node untill it will be completely exhausted. And only"},{"line_number":105,"context_line":"after we will choose MOST USED host\u0027s NUMA node from the rest available nodes"},{"line_number":106,"context_line":"on host. \"Spread\" strategy is reverse to \"pack\" strategy. The NUMA node(s) with"},{"line_number":107,"context_line":"MORE FREE resources will be use first. So \"spread\" strategy will try to balance"}],"source_content_type":"text/x-rst","patch_set":26,"id":"be1ed0a1_6be878b5","line":104,"range":{"start_line":104,"start_character":27,"end_line":104,"end_character":33},"updated":"2022-02-07 10:30:52.000000000","message":"until","commit_id":"049b4cfac97ba8d315501a59f1e4a7a4ee5f61e6"},{"author":{"_account_id":16198,"name":"Ilya Popov","email":"hebulrih@gmail.com","username":"IPO"},"change_message_id":"869ce784313b1522379087f198c49e66d623da3a","unresolved":false,"context_lines":[{"line_number":101,"context_line":"variable is set to ``True``. It leads to attempt to chose NUMA node(s) with"},{"line_number":102,"context_line":"less amount of free resources (or in other words MORE USED NUMA nodes) first."},{"line_number":103,"context_line":"It is so-called \"pack\" strategy - we try to place as much as possible load at"},{"line_number":104,"context_line":"MORE USED host\u0027s NUMA node untill it will be completely exhausted. And only"},{"line_number":105,"context_line":"after we will choose MOST USED host\u0027s NUMA node from the rest available nodes"},{"line_number":106,"context_line":"on host. \"Spread\" strategy is reverse to \"pack\" strategy. The NUMA node(s) with"},{"line_number":107,"context_line":"MORE FREE resources will be use first. So \"spread\" strategy will try to balance"}],"source_content_type":"text/x-rst","patch_set":26,"id":"145cdb83_d3ded84c","line":104,"range":{"start_line":104,"start_character":27,"end_line":104,"end_character":33},"in_reply_to":"be1ed0a1_6be878b5","updated":"2022-02-07 13:54:45.000000000","message":"Done","commit_id":"049b4cfac97ba8d315501a59f1e4a7a4ee5f61e6"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"f05f47cd7049cca04916392dd4ca18a042200cfa","unresolved":true,"context_lines":[{"line_number":118,"context_line":"The python performed so-called stable sort. It means that each sort executed"},{"line_number":119,"context_line":"on same list will change order of list items only if item\u0027s property we sort on"},{"line_number":120,"context_line":"differs. If this properties in all list\u0027s items are equal than elements order"},{"line_number":121,"context_line":"will not cahged."},{"line_number":122,"context_line":""},{"line_number":123,"context_line":"Sorts are performed on host\u0027s NUMA nodes list in the following order:"},{"line_number":124,"context_line":""}],"source_content_type":"text/x-rst","patch_set":26,"id":"9eb37c6f_c3c7cd9a","line":121,"range":{"start_line":121,"start_character":9,"end_line":121,"end_character":15},"updated":"2022-02-07 10:30:52.000000000","message":"nit: changed","commit_id":"049b4cfac97ba8d315501a59f1e4a7a4ee5f61e6"},{"author":{"_account_id":16198,"name":"Ilya Popov","email":"hebulrih@gmail.com","username":"IPO"},"change_message_id":"869ce784313b1522379087f198c49e66d623da3a","unresolved":false,"context_lines":[{"line_number":118,"context_line":"The python performed so-called stable sort. It means that each sort executed"},{"line_number":119,"context_line":"on same list will change order of list items only if item\u0027s property we sort on"},{"line_number":120,"context_line":"differs. If this properties in all list\u0027s items are equal than elements order"},{"line_number":121,"context_line":"will not cahged."},{"line_number":122,"context_line":""},{"line_number":123,"context_line":"Sorts are performed on host\u0027s NUMA nodes list in the following order:"},{"line_number":124,"context_line":""}],"source_content_type":"text/x-rst","patch_set":26,"id":"eaef19b3_be559810","line":121,"range":{"start_line":121,"start_character":9,"end_line":121,"end_character":15},"in_reply_to":"9eb37c6f_c3c7cd9a","updated":"2022-02-07 13:54:45.000000000","message":"Done","commit_id":"049b4cfac97ba8d315501a59f1e4a7a4ee5f61e6"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"f05f47cd7049cca04916392dd4ca18a042200cfa","unresolved":true,"context_lines":[{"line_number":136,"context_line":".. caution::"},{"line_number":137,"context_line":""},{"line_number":138,"context_line":"   The described logic for PCI devices is used BOTH for \"pack\" and \"spread\""},{"line_number":139,"context_line":"   strategies. It is done to keep backward compatibility with previous code."},{"line_number":140,"context_line":""},{"line_number":141,"context_line":""},{"line_number":142,"context_line":"During \"pack\" logic implementation rest (two) sorts are performed with sort"}],"source_content_type":"text/x-rst","patch_set":26,"id":"2703305c_276e3b42","line":139,"range":{"start_line":139,"start_character":57,"end_line":139,"end_character":75},"updated":"2022-02-07 10:30:52.000000000","message":"with previous nova versions","commit_id":"049b4cfac97ba8d315501a59f1e4a7a4ee5f61e6"},{"author":{"_account_id":16198,"name":"Ilya Popov","email":"hebulrih@gmail.com","username":"IPO"},"change_message_id":"869ce784313b1522379087f198c49e66d623da3a","unresolved":false,"context_lines":[{"line_number":136,"context_line":".. caution::"},{"line_number":137,"context_line":""},{"line_number":138,"context_line":"   The described logic for PCI devices is used BOTH for \"pack\" and \"spread\""},{"line_number":139,"context_line":"   strategies. It is done to keep backward compatibility with previous code."},{"line_number":140,"context_line":""},{"line_number":141,"context_line":""},{"line_number":142,"context_line":"During \"pack\" logic implementation rest (two) sorts are performed with sort"}],"source_content_type":"text/x-rst","patch_set":26,"id":"5e44a14c_628b99cc","line":139,"range":{"start_line":139,"start_character":57,"end_line":139,"end_character":75},"in_reply_to":"2703305c_276e3b42","updated":"2022-02-07 13:54:45.000000000","message":"Done","commit_id":"049b4cfac97ba8d315501a59f1e4a7a4ee5f61e6"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"f05f47cd7049cca04916392dd4ca18a042200cfa","unresolved":true,"context_lines":[{"line_number":773,"context_line":""},{"line_number":774,"context_line":".. Links"},{"line_number":775,"context_line":".. _`Image metadata`: https://docs.openstack.org/image-guide/introduction.html#image-metadata"},{"line_number":776,"context_line":".. _`discussion`: http://lists.openstack.org/pipermail/openstack-dev/2016-March/090367.html"},{"line_number":777,"context_line":".. _`MTTCG project`: http://wiki.qemu.org/Features/tcg-multithread"}],"source_content_type":"text/x-rst","patch_set":26,"id":"75c489bd_c8584fa4","line":776,"updated":"2022-02-07 10:30:52.000000000","message":"Probably this is unused now","commit_id":"049b4cfac97ba8d315501a59f1e4a7a4ee5f61e6"},{"author":{"_account_id":16198,"name":"Ilya Popov","email":"hebulrih@gmail.com","username":"IPO"},"change_message_id":"869ce784313b1522379087f198c49e66d623da3a","unresolved":false,"context_lines":[{"line_number":773,"context_line":""},{"line_number":774,"context_line":".. Links"},{"line_number":775,"context_line":".. _`Image metadata`: https://docs.openstack.org/image-guide/introduction.html#image-metadata"},{"line_number":776,"context_line":".. _`discussion`: http://lists.openstack.org/pipermail/openstack-dev/2016-March/090367.html"},{"line_number":777,"context_line":".. _`MTTCG project`: http://wiki.qemu.org/Features/tcg-multithread"}],"source_content_type":"text/x-rst","patch_set":26,"id":"c88e9489_122a4a3d","line":776,"in_reply_to":"75c489bd_c8584fa4","updated":"2022-02-07 13:54:45.000000000","message":"Agree. According to article problem, after we will place first VM with SR-IOV,\ntotal_pci_in_cell will became 0 for this cell and next VM with SR-IOV will be placed on host\u0027s cells based on other resources available (with \"spread\" or \"pack\" strategy chosen), as sort for PCI make no changes to cells order in list (all cells won\u0027t have available PCI devices in their pools and list will keep items order cause of python stable sort)","commit_id":"049b4cfac97ba8d315501a59f1e4a7a4ee5f61e6"}],"nova/conf/compute.py":[{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"5cc43721d02c743b71ce618ae76fd9899aad8f3a","unresolved":true,"context_lines":[{"line_number":1021,"context_line":""},{"line_number":1022,"context_line":"Possible values:"},{"line_number":1023,"context_line":""},{"line_number":1024,"context_line":"* ``True``: Packing VM\u0027s NUMA cell on most used host NUMA cell."},{"line_number":1025,"context_line":"* ``False``: Spreading VM\u0027s NUMA cell on host\u0027s NUMA cells with more resources"},{"line_number":1026,"context_line":"  available."},{"line_number":1027,"context_line":"\"\"\"),"}],"source_content_type":"text/x-python","patch_set":20,"id":"9589a1cd_6904cb88","line":1024,"range":{"start_line":1024,"start_character":0,"end_line":1024,"end_character":63},"updated":"2022-01-05 15:21:08.000000000","message":"note for reviews this is the current unconditional behavior\nand is the default to maintain backward compatibility.","commit_id":"6cd00a5460e4df3c12060c57994a6beb4aa8f48d"},{"author":{"_account_id":16198,"name":"Ilya Popov","email":"hebulrih@gmail.com","username":"IPO"},"change_message_id":"e0b33ad4816160c05fa55c0bf82e6e0f2db125d6","unresolved":false,"context_lines":[{"line_number":1021,"context_line":""},{"line_number":1022,"context_line":"Possible values:"},{"line_number":1023,"context_line":""},{"line_number":1024,"context_line":"* ``True``: Packing VM\u0027s NUMA cell on most used host NUMA cell."},{"line_number":1025,"context_line":"* ``False``: Spreading VM\u0027s NUMA cell on host\u0027s NUMA cells with more resources"},{"line_number":1026,"context_line":"  available."},{"line_number":1027,"context_line":"\"\"\"),"}],"source_content_type":"text/x-python","patch_set":20,"id":"7a3796f3_84511356","line":1024,"range":{"start_line":1024,"start_character":0,"end_line":1024,"end_character":63},"in_reply_to":"9589a1cd_6904cb88","updated":"2022-01-05 21:40:08.000000000","message":"Done","commit_id":"6cd00a5460e4df3c12060c57994a6beb4aa8f48d"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"6e07d338f626393c1d8fad521e2950ecd887ad60","unresolved":true,"context_lines":[{"line_number":1008,"context_line":"  filtering computes based on supported image types, which is required"},{"line_number":1009,"context_line":"  to be enabled for this to take effect."},{"line_number":1010,"context_line":"\"\"\"),"},{"line_number":1011,"context_line":"    cfg.BoolOpt(\u0027packing_host_numa_cells_allocation_strategy\u0027,"},{"line_number":1012,"context_line":"        default\u003dTrue,"},{"line_number":1013,"context_line":"        help\u003d\"\"\""},{"line_number":1014,"context_line":"This option controls allocation strategy used to choose NUMA cells on host for"}],"source_content_type":"text/x-python","patch_set":22,"id":"8ad13c50_d0cca410","line":1011,"updated":"2022-02-01 11:21:51.000000000","message":"I\u0027m accepting this. But as soon the next similar request comes for the NUMA placement logic I will be on the side of not adding yet another flag but create a weigher system similar to what we have in the scheduler today.","commit_id":"994d4f0bbc4ea0b0f88cc8a4e85570a4c7e2e9e6"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"4aa70bd13e933b8c4c2037c8d2dc0ca2b97bd962","unresolved":true,"context_lines":[{"line_number":1008,"context_line":"  filtering computes based on supported image types, which is required"},{"line_number":1009,"context_line":"  to be enabled for this to take effect."},{"line_number":1010,"context_line":"\"\"\"),"},{"line_number":1011,"context_line":"    cfg.BoolOpt(\u0027packing_host_numa_cells_allocation_strategy\u0027,"},{"line_number":1012,"context_line":"        default\u003dTrue,"},{"line_number":1013,"context_line":"        help\u003d\"\"\""},{"line_number":1014,"context_line":"This option controls allocation strategy used to choose NUMA cells on host for"}],"source_content_type":"text/x-python","patch_set":22,"id":"e1e7db94_04fb0bb8","line":1011,"in_reply_to":"8ad13c50_d0cca410","updated":"2022-02-01 13:38:59.000000000","message":"yes i think we should have such a wheigher or cost based system eventually and artom has started to look into a simple ish version based on cpu toplogy \nhttps://review.opendev.org/q/topic:bp%252Flibvirt-smarter-cpu-placement\n\neventualy that could be expanded to adress memory pci device and perhaps other factors. perhaps with a weigher like configuration stucture.\n\nthat is a much more involved change hower then this simple sorting.","commit_id":"994d4f0bbc4ea0b0f88cc8a4e85570a4c7e2e9e6"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"f259f85757779e12d993cf2dac4372ddbd578228","unresolved":false,"context_lines":[{"line_number":1008,"context_line":"  filtering computes based on supported image types, which is required"},{"line_number":1009,"context_line":"  to be enabled for this to take effect."},{"line_number":1010,"context_line":"\"\"\"),"},{"line_number":1011,"context_line":"    cfg.BoolOpt(\u0027packing_host_numa_cells_allocation_strategy\u0027,"},{"line_number":1012,"context_line":"        default\u003dTrue,"},{"line_number":1013,"context_line":"        help\u003d\"\"\""},{"line_number":1014,"context_line":"This option controls allocation strategy used to choose NUMA cells on host for"}],"source_content_type":"text/x-python","patch_set":22,"id":"190c5e5d_0ad4db93","line":1011,"in_reply_to":"e1e7db94_04fb0bb8","updated":"2022-02-03 11:14:02.000000000","message":"Ack","commit_id":"994d4f0bbc4ea0b0f88cc8a4e85570a4c7e2e9e6"}],"nova/tests/unit/virt/test_hardware.py":[{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"7483f18562bcdb814c965cf248fd92813cbd83cf","unresolved":true,"context_lines":[{"line_number":5645,"context_line":"                siblings\u003d[set([13]), set([14]), set([15]), set([16])])"},{"line_number":5646,"context_line":"        ])"},{"line_number":5647,"context_line":""},{"line_number":5648,"context_line":"        self.instance0 \u003d objects.InstanceNUMATopology(cells\u003d["},{"line_number":5649,"context_line":"        objects.InstanceNUMACell("},{"line_number":5650,"context_line":"            id\u003d0, cpuset\u003dset([1]), pcpuset\u003dset(), memory\u003d2048),"},{"line_number":5651,"context_line":"        objects.InstanceNUMACell("},{"line_number":5652,"context_line":"            id\u003d1, cpuset\u003dset([1]), pcpuset\u003dset(), memory\u003d2048),"},{"line_number":5653,"context_line":"        objects.InstanceNUMACell("},{"line_number":5654,"context_line":"            id\u003d2, cpuset\u003dset([1]), pcpuset\u003dset(), memory\u003d2048),"},{"line_number":5655,"context_line":"        objects.InstanceNUMACell("},{"line_number":5656,"context_line":"            id\u003d3, cpuset\u003dset([1]), pcpuset\u003dset(), memory\u003d2048)"},{"line_number":5657,"context_line":"        ])"},{"line_number":5658,"context_line":""},{"line_number":5659,"context_line":"        self.instance1 \u003d objects.InstanceNUMATopology(cells\u003d["},{"line_number":5660,"context_line":"        objects.InstanceNUMACell("},{"line_number":5661,"context_line":"            id\u003d0, cpuset\u003dset([1]), pcpuset\u003dset(), memory\u003d2048),"},{"line_number":5662,"context_line":"        objects.InstanceNUMACell("},{"line_number":5663,"context_line":"            id\u003d1, cpuset\u003dset([1]), pcpuset\u003dset(), memory\u003d2048),"},{"line_number":5664,"context_line":"        objects.InstanceNUMACell("},{"line_number":5665,"context_line":"            id\u003d2, cpuset\u003dset([1]), pcpuset\u003dset(), memory\u003d2048),"},{"line_number":5666,"context_line":"        ])"},{"line_number":5667,"context_line":""},{"line_number":5668,"context_line":"        self.instance2 \u003d objects.InstanceNUMATopology(cells\u003d["},{"line_number":5669,"context_line":"        objects.InstanceNUMACell("},{"line_number":5670,"context_line":"            id\u003d0,"},{"line_number":5671,"context_line":"            cpuset\u003dset(),"},{"line_number":5672,"context_line":"            pcpuset\u003dset([1]),"},{"line_number":5673,"context_line":"            memory\u003d2048,"},{"line_number":5674,"context_line":"            cpu_policy\u003dfields.CPUAllocationPolicy.MIXED"},{"line_number":5675,"context_line":"        ),"},{"line_number":5676,"context_line":"        objects.InstanceNUMACell("},{"line_number":5677,"context_line":"            id\u003d1,"},{"line_number":5678,"context_line":"            cpuset\u003dset(),"},{"line_number":5679,"context_line":"            pcpuset\u003dset([1]),"},{"line_number":5680,"context_line":"            memory\u003d2048,"},{"line_number":5681,"context_line":"            cpu_policy\u003dfields.CPUAllocationPolicy.MIXED"},{"line_number":5682,"context_line":"        ),"},{"line_number":5683,"context_line":"        objects.InstanceNUMACell("},{"line_number":5684,"context_line":"            id\u003d2,"},{"line_number":5685,"context_line":"            cpuset\u003dset(),"},{"line_number":5686,"context_line":"            pcpuset\u003dset([1]),"},{"line_number":5687,"context_line":"            memory\u003d2048,"},{"line_number":5688,"context_line":"            cpu_policy\u003dfields.CPUAllocationPolicy.MIXED"},{"line_number":5689,"context_line":"        )])"},{"line_number":5690,"context_line":""},{"line_number":5691,"context_line":"    def assertInstanceNUMAcellOrder(self, list_to_check, instance_topo):"},{"line_number":5692,"context_line":"        for cell, id in zip(instance_topo.cells, list_to_check):"}],"source_content_type":"text/x-python","patch_set":13,"id":"583e812f_83ecf3cb","line":5689,"range":{"start_line":5648,"start_character":0,"end_line":5689,"end_character":11},"updated":"2021-11-19 12:06:56.000000000","message":"i belive you should be incrementing the core ids and they shoudl also be 0 indexed not 1 indexed\n\n\n        objects.InstanceNUMACell(\n            id\u003d0, cpuset\u003dset([0]), pcpuset\u003dset(), memory\u003d2048),\n        objects.InstanceNUMACell(\n            id\u003d1, cpuset\u003dset([1]), pcpuset\u003dset(), memory\u003d2048),\n        objects.InstanceNUMACell(\n            id\u003d2, cpuset\u003dset([2]), pcpuset\u003dset(), memory\u003d2048),\n        objects.InstanceNUMACell(\n            id\u003d3, cpuset\u003dset([3]), pcpuset\u003dset(), memory\u003d2048)\n        ])","commit_id":"8b22a53380f413e578c56d268438dc51c99316a9"},{"author":{"_account_id":16198,"name":"Ilya Popov","email":"hebulrih@gmail.com","username":"IPO"},"change_message_id":"4a8584ff8d2c96126c171e3ab434ef561d78d579","unresolved":false,"context_lines":[{"line_number":5645,"context_line":"                siblings\u003d[set([13]), set([14]), set([15]), set([16])])"},{"line_number":5646,"context_line":"        ])"},{"line_number":5647,"context_line":""},{"line_number":5648,"context_line":"        self.instance0 \u003d objects.InstanceNUMATopology(cells\u003d["},{"line_number":5649,"context_line":"        objects.InstanceNUMACell("},{"line_number":5650,"context_line":"            id\u003d0, cpuset\u003dset([1]), pcpuset\u003dset(), memory\u003d2048),"},{"line_number":5651,"context_line":"        objects.InstanceNUMACell("},{"line_number":5652,"context_line":"            id\u003d1, cpuset\u003dset([1]), pcpuset\u003dset(), memory\u003d2048),"},{"line_number":5653,"context_line":"        objects.InstanceNUMACell("},{"line_number":5654,"context_line":"            id\u003d2, cpuset\u003dset([1]), pcpuset\u003dset(), memory\u003d2048),"},{"line_number":5655,"context_line":"        objects.InstanceNUMACell("},{"line_number":5656,"context_line":"            id\u003d3, cpuset\u003dset([1]), pcpuset\u003dset(), memory\u003d2048)"},{"line_number":5657,"context_line":"        ])"},{"line_number":5658,"context_line":""},{"line_number":5659,"context_line":"        self.instance1 \u003d objects.InstanceNUMATopology(cells\u003d["},{"line_number":5660,"context_line":"        objects.InstanceNUMACell("},{"line_number":5661,"context_line":"            id\u003d0, cpuset\u003dset([1]), pcpuset\u003dset(), memory\u003d2048),"},{"line_number":5662,"context_line":"        objects.InstanceNUMACell("},{"line_number":5663,"context_line":"            id\u003d1, cpuset\u003dset([1]), pcpuset\u003dset(), memory\u003d2048),"},{"line_number":5664,"context_line":"        objects.InstanceNUMACell("},{"line_number":5665,"context_line":"            id\u003d2, cpuset\u003dset([1]), pcpuset\u003dset(), memory\u003d2048),"},{"line_number":5666,"context_line":"        ])"},{"line_number":5667,"context_line":""},{"line_number":5668,"context_line":"        self.instance2 \u003d objects.InstanceNUMATopology(cells\u003d["},{"line_number":5669,"context_line":"        objects.InstanceNUMACell("},{"line_number":5670,"context_line":"            id\u003d0,"},{"line_number":5671,"context_line":"            cpuset\u003dset(),"},{"line_number":5672,"context_line":"            pcpuset\u003dset([1]),"},{"line_number":5673,"context_line":"            memory\u003d2048,"},{"line_number":5674,"context_line":"            cpu_policy\u003dfields.CPUAllocationPolicy.MIXED"},{"line_number":5675,"context_line":"        ),"},{"line_number":5676,"context_line":"        objects.InstanceNUMACell("},{"line_number":5677,"context_line":"            id\u003d1,"},{"line_number":5678,"context_line":"            cpuset\u003dset(),"},{"line_number":5679,"context_line":"            pcpuset\u003dset([1]),"},{"line_number":5680,"context_line":"            memory\u003d2048,"},{"line_number":5681,"context_line":"            cpu_policy\u003dfields.CPUAllocationPolicy.MIXED"},{"line_number":5682,"context_line":"        ),"},{"line_number":5683,"context_line":"        objects.InstanceNUMACell("},{"line_number":5684,"context_line":"            id\u003d2,"},{"line_number":5685,"context_line":"            cpuset\u003dset(),"},{"line_number":5686,"context_line":"            pcpuset\u003dset([1]),"},{"line_number":5687,"context_line":"            memory\u003d2048,"},{"line_number":5688,"context_line":"            cpu_policy\u003dfields.CPUAllocationPolicy.MIXED"},{"line_number":5689,"context_line":"        )])"},{"line_number":5690,"context_line":""},{"line_number":5691,"context_line":"    def assertInstanceNUMAcellOrder(self, list_to_check, instance_topo):"},{"line_number":5692,"context_line":"        for cell, id in zip(instance_topo.cells, list_to_check):"}],"source_content_type":"text/x-python","patch_set":13,"id":"7e85fddb_58e30a08","line":5689,"range":{"start_line":5648,"start_character":0,"end_line":5689,"end_character":11},"in_reply_to":"583e812f_83ecf3cb","updated":"2021-12-06 10:28:02.000000000","message":"Done","commit_id":"8b22a53380f413e578c56d268438dc51c99316a9"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"7483f18562bcdb814c965cf248fd92813cbd83cf","unresolved":true,"context_lines":[{"line_number":5695,"context_line":"    def test_sort_host_numa_cell_num_equal_instance_cell_num(self):"},{"line_number":5696,"context_line":"        instance_topology \u003d hw.numa_fit_instance_to_host("},{"line_number":5697,"context_line":"                self.host, self.instance0)"},{"line_number":5698,"context_line":"        self.assertInstanceNUMAcellOrder([0, 1, 2], instance_topology)"},{"line_number":5699,"context_line":""},{"line_number":5700,"context_line":"    def test_sort_no_pci_stats_no_shared_cpus(self):"},{"line_number":5701,"context_line":"        instance_topology \u003d hw.numa_fit_instance_to_host("}],"source_content_type":"text/x-python","patch_set":13,"id":"65c0f66f_c50f1f60","line":5698,"range":{"start_line":5698,"start_character":41,"end_line":5698,"end_character":50},"updated":"2021-11-19 12:06:56.000000000","message":"nit: this should be [0, 1, 2, 3] since the instancce has 4 numa nodes but since you have assert 3 of the 4 the 4th is implcitly asserted too","commit_id":"8b22a53380f413e578c56d268438dc51c99316a9"},{"author":{"_account_id":16198,"name":"Ilya Popov","email":"hebulrih@gmail.com","username":"IPO"},"change_message_id":"4a8584ff8d2c96126c171e3ab434ef561d78d579","unresolved":false,"context_lines":[{"line_number":5695,"context_line":"    def test_sort_host_numa_cell_num_equal_instance_cell_num(self):"},{"line_number":5696,"context_line":"        instance_topology \u003d hw.numa_fit_instance_to_host("},{"line_number":5697,"context_line":"                self.host, self.instance0)"},{"line_number":5698,"context_line":"        self.assertInstanceNUMAcellOrder([0, 1, 2], instance_topology)"},{"line_number":5699,"context_line":""},{"line_number":5700,"context_line":"    def test_sort_no_pci_stats_no_shared_cpus(self):"},{"line_number":5701,"context_line":"        instance_topology \u003d hw.numa_fit_instance_to_host("}],"source_content_type":"text/x-python","patch_set":13,"id":"1819030c_243d4832","line":5698,"range":{"start_line":5698,"start_character":41,"end_line":5698,"end_character":50},"in_reply_to":"65c0f66f_c50f1f60","updated":"2021-12-06 10:28:02.000000000","message":"Done","commit_id":"8b22a53380f413e578c56d268438dc51c99316a9"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"5cc43721d02c743b71ce618ae76fd9899aad8f3a","unresolved":true,"context_lines":[{"line_number":5679,"context_line":"            cpuset\u003dset(),"},{"line_number":5680,"context_line":"            pcpuset\u003dset([0]),"},{"line_number":5681,"context_line":"            memory\u003d2048,"},{"line_number":5682,"context_line":"            cpu_policy\u003dfields.CPUAllocationPolicy.MIXED"},{"line_number":5683,"context_line":"        ),"},{"line_number":5684,"context_line":"        objects.InstanceNUMACell("},{"line_number":5685,"context_line":"            id\u003d1,"}],"source_content_type":"text/x-python","patch_set":19,"id":"95c932ba_c1440056","line":5682,"range":{"start_line":5682,"start_character":50,"end_line":5682,"end_character":55},"updated":"2022-01-05 15:21:08.000000000","message":"this is really using dedicated cpus so this should be dedicated not mixed","commit_id":"c142485ccda7bc1b7a4baacd0dc1ca6ae9ea6c70"},{"author":{"_account_id":16198,"name":"Ilya Popov","email":"hebulrih@gmail.com","username":"IPO"},"change_message_id":"e0b33ad4816160c05fa55c0bf82e6e0f2db125d6","unresolved":false,"context_lines":[{"line_number":5679,"context_line":"            cpuset\u003dset(),"},{"line_number":5680,"context_line":"            pcpuset\u003dset([0]),"},{"line_number":5681,"context_line":"            memory\u003d2048,"},{"line_number":5682,"context_line":"            cpu_policy\u003dfields.CPUAllocationPolicy.MIXED"},{"line_number":5683,"context_line":"        ),"},{"line_number":5684,"context_line":"        objects.InstanceNUMACell("},{"line_number":5685,"context_line":"            id\u003d1,"}],"source_content_type":"text/x-python","patch_set":19,"id":"c1b3ff64_753ec796","line":5682,"range":{"start_line":5682,"start_character":50,"end_line":5682,"end_character":55},"in_reply_to":"95c932ba_c1440056","updated":"2022-01-05 21:40:08.000000000","message":"Done","commit_id":"c142485ccda7bc1b7a4baacd0dc1ca6ae9ea6c70"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"5cc43721d02c743b71ce618ae76fd9899aad8f3a","unresolved":true,"context_lines":[{"line_number":5686,"context_line":"            cpuset\u003dset(),"},{"line_number":5687,"context_line":"            pcpuset\u003dset([1]),"},{"line_number":5688,"context_line":"            memory\u003d2048,"},{"line_number":5689,"context_line":"            cpu_policy\u003dfields.CPUAllocationPolicy.MIXED"},{"line_number":5690,"context_line":"        ),"},{"line_number":5691,"context_line":"        objects.InstanceNUMACell("},{"line_number":5692,"context_line":"            id\u003d2,"}],"source_content_type":"text/x-python","patch_set":19,"id":"b5917bc9_78eee472","line":5689,"range":{"start_line":5689,"start_character":50,"end_line":5689,"end_character":55},"updated":"2022-01-05 15:21:08.000000000","message":"same","commit_id":"c142485ccda7bc1b7a4baacd0dc1ca6ae9ea6c70"},{"author":{"_account_id":16198,"name":"Ilya Popov","email":"hebulrih@gmail.com","username":"IPO"},"change_message_id":"e0b33ad4816160c05fa55c0bf82e6e0f2db125d6","unresolved":false,"context_lines":[{"line_number":5686,"context_line":"            cpuset\u003dset(),"},{"line_number":5687,"context_line":"            pcpuset\u003dset([1]),"},{"line_number":5688,"context_line":"            memory\u003d2048,"},{"line_number":5689,"context_line":"            cpu_policy\u003dfields.CPUAllocationPolicy.MIXED"},{"line_number":5690,"context_line":"        ),"},{"line_number":5691,"context_line":"        objects.InstanceNUMACell("},{"line_number":5692,"context_line":"            id\u003d2,"}],"source_content_type":"text/x-python","patch_set":19,"id":"4263b957_e81de496","line":5689,"range":{"start_line":5689,"start_character":50,"end_line":5689,"end_character":55},"in_reply_to":"b5917bc9_78eee472","updated":"2022-01-05 21:40:08.000000000","message":"Done","commit_id":"c142485ccda7bc1b7a4baacd0dc1ca6ae9ea6c70"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"5cc43721d02c743b71ce618ae76fd9899aad8f3a","unresolved":true,"context_lines":[{"line_number":5693,"context_line":"            cpuset\u003dset(),"},{"line_number":5694,"context_line":"            pcpuset\u003dset([2]),"},{"line_number":5695,"context_line":"            memory\u003d2048,"},{"line_number":5696,"context_line":"            cpu_policy\u003dfields.CPUAllocationPolicy.MIXED"},{"line_number":5697,"context_line":"        )])"},{"line_number":5698,"context_line":""},{"line_number":5699,"context_line":"    def assertInstanceNUMAcellOrder(self, list_to_check, instance_topo):"}],"source_content_type":"text/x-python","patch_set":19,"id":"27589a96_62dc2718","line":5696,"range":{"start_line":5696,"start_character":50,"end_line":5696,"end_character":55},"updated":"2022-01-05 15:21:08.000000000","message":"same","commit_id":"c142485ccda7bc1b7a4baacd0dc1ca6ae9ea6c70"},{"author":{"_account_id":16198,"name":"Ilya Popov","email":"hebulrih@gmail.com","username":"IPO"},"change_message_id":"e0b33ad4816160c05fa55c0bf82e6e0f2db125d6","unresolved":false,"context_lines":[{"line_number":5693,"context_line":"            cpuset\u003dset(),"},{"line_number":5694,"context_line":"            pcpuset\u003dset([2]),"},{"line_number":5695,"context_line":"            memory\u003d2048,"},{"line_number":5696,"context_line":"            cpu_policy\u003dfields.CPUAllocationPolicy.MIXED"},{"line_number":5697,"context_line":"        )])"},{"line_number":5698,"context_line":""},{"line_number":5699,"context_line":"    def assertInstanceNUMAcellOrder(self, list_to_check, instance_topo):"}],"source_content_type":"text/x-python","patch_set":19,"id":"72f42e34_c0aad852","line":5696,"range":{"start_line":5696,"start_character":50,"end_line":5696,"end_character":55},"in_reply_to":"27589a96_62dc2718","updated":"2022-01-05 21:40:08.000000000","message":"Done","commit_id":"c142485ccda7bc1b7a4baacd0dc1ca6ae9ea6c70"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"5cc43721d02c743b71ce618ae76fd9899aad8f3a","unresolved":true,"context_lines":[{"line_number":5705,"context_line":"                self.host, self.instance0)"},{"line_number":5706,"context_line":"        self.assertInstanceNUMAcellOrder([0, 1, 2, 3], instance_topology)"},{"line_number":5707,"context_line":""},{"line_number":5708,"context_line":"    def test_sort_no_pci_stats_no_shared_cpus(self):"},{"line_number":5709,"context_line":"        CONF.set_override("},{"line_number":5710,"context_line":"            \u0027packing_host_numa_cells_allocation_strategy\u0027,"},{"line_number":5711,"context_line":"            True,"}],"source_content_type":"text/x-python","patch_set":19,"id":"ef4301ac_3d6278f2","line":5708,"range":{"start_line":5708,"start_character":31,"end_line":5708,"end_character":40},"updated":"2022-01-05 15:21:08.000000000","message":"nit this is using dedicated cpus\n\nso i woudld avoid the negitive and call this \n\ntest_sort_no_pci_stats_dedicated_cpus","commit_id":"c142485ccda7bc1b7a4baacd0dc1ca6ae9ea6c70"},{"author":{"_account_id":16198,"name":"Ilya Popov","email":"hebulrih@gmail.com","username":"IPO"},"change_message_id":"e0b33ad4816160c05fa55c0bf82e6e0f2db125d6","unresolved":false,"context_lines":[{"line_number":5705,"context_line":"                self.host, self.instance0)"},{"line_number":5706,"context_line":"        self.assertInstanceNUMAcellOrder([0, 1, 2, 3], instance_topology)"},{"line_number":5707,"context_line":""},{"line_number":5708,"context_line":"    def test_sort_no_pci_stats_no_shared_cpus(self):"},{"line_number":5709,"context_line":"        CONF.set_override("},{"line_number":5710,"context_line":"            \u0027packing_host_numa_cells_allocation_strategy\u0027,"},{"line_number":5711,"context_line":"            True,"}],"source_content_type":"text/x-python","patch_set":19,"id":"368e47ff_f3649578","line":5708,"range":{"start_line":5708,"start_character":31,"end_line":5708,"end_character":40},"in_reply_to":"ef4301ac_3d6278f2","updated":"2022-01-05 21:40:08.000000000","message":"IMHO it is better to improve name to test_sort_no_pci_stats_no_shared_cpu_policy, cause it shows the way we go through if - else statements in hardware.py. In hardware.py there is the following check:\n\n\n        if instance_topology.cells[0].cpu_policy in (\n                None, fields.CPUAllocationPolicy.SHARED):\n            # sort based on used CPUs\n            host_cells \u003d sorted(\n                host_cells,\n                reverse\u003dpack,\n                key\u003dlambda cell: cell.cpu_usage)\n\n        else:\n            # sort based on presence of pinned CPUs\n            host_cells \u003d sorted(\n                host_cells,\n                reverse\u003dnot pack,\n                key\u003dlambda cell: len(cell.free_pcpus))\n\nso the name of test shows that we will go through else statement (e.g. not in None,fields.CPUAllocationPolicy.SHARED or \u0027no_shared_cpu_policy\u0027).","commit_id":"c142485ccda7bc1b7a4baacd0dc1ca6ae9ea6c70"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"5cc43721d02c743b71ce618ae76fd9899aad8f3a","unresolved":true,"context_lines":[{"line_number":5706,"context_line":"        self.assertInstanceNUMAcellOrder([0, 1, 2, 3], instance_topology)"},{"line_number":5707,"context_line":""},{"line_number":5708,"context_line":"    def test_sort_no_pci_stats_no_shared_cpus(self):"},{"line_number":5709,"context_line":"        CONF.set_override("},{"line_number":5710,"context_line":"            \u0027packing_host_numa_cells_allocation_strategy\u0027,"},{"line_number":5711,"context_line":"            True,"},{"line_number":5712,"context_line":"            group \u003d \u0027compute\u0027)"},{"line_number":5713,"context_line":"        instance_topology \u003d hw.numa_fit_instance_to_host("},{"line_number":5714,"context_line":"                self.host, self.instance2)"},{"line_number":5715,"context_line":"        self.assertInstanceNUMAcellOrder([0, 1, 3], instance_topology)"}],"source_content_type":"text/x-python","patch_set":19,"id":"79a9cd3d_b3e1190b","line":5712,"range":{"start_line":5709,"start_character":8,"end_line":5712,"end_character":30},"updated":"2022-01-05 15:21:08.000000000","message":"note to self True is the default but if we ever change that its good to be explict in this test.","commit_id":"c142485ccda7bc1b7a4baacd0dc1ca6ae9ea6c70"},{"author":{"_account_id":16198,"name":"Ilya Popov","email":"hebulrih@gmail.com","username":"IPO"},"change_message_id":"e0b33ad4816160c05fa55c0bf82e6e0f2db125d6","unresolved":false,"context_lines":[{"line_number":5706,"context_line":"        self.assertInstanceNUMAcellOrder([0, 1, 2, 3], instance_topology)"},{"line_number":5707,"context_line":""},{"line_number":5708,"context_line":"    def test_sort_no_pci_stats_no_shared_cpus(self):"},{"line_number":5709,"context_line":"        CONF.set_override("},{"line_number":5710,"context_line":"            \u0027packing_host_numa_cells_allocation_strategy\u0027,"},{"line_number":5711,"context_line":"            True,"},{"line_number":5712,"context_line":"            group \u003d \u0027compute\u0027)"},{"line_number":5713,"context_line":"        instance_topology \u003d hw.numa_fit_instance_to_host("},{"line_number":5714,"context_line":"                self.host, self.instance2)"},{"line_number":5715,"context_line":"        self.assertInstanceNUMAcellOrder([0, 1, 3], instance_topology)"}],"source_content_type":"text/x-python","patch_set":19,"id":"82781647_c43fd115","line":5712,"range":{"start_line":5709,"start_character":8,"end_line":5712,"end_character":30},"in_reply_to":"79a9cd3d_b3e1190b","updated":"2022-01-05 21:40:08.000000000","message":"Done","commit_id":"c142485ccda7bc1b7a4baacd0dc1ca6ae9ea6c70"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"5cc43721d02c743b71ce618ae76fd9899aad8f3a","unresolved":true,"context_lines":[{"line_number":5712,"context_line":"            group \u003d \u0027compute\u0027)"},{"line_number":5713,"context_line":"        instance_topology \u003d hw.numa_fit_instance_to_host("},{"line_number":5714,"context_line":"                self.host, self.instance2)"},{"line_number":5715,"context_line":"        self.assertInstanceNUMAcellOrder([0, 1, 3], instance_topology)"},{"line_number":5716,"context_line":"        CONF.set_override("},{"line_number":5717,"context_line":"            \u0027packing_host_numa_cells_allocation_strategy\u0027,"},{"line_number":5718,"context_line":"            False,"}],"source_content_type":"text/x-python","patch_set":19,"id":"73476500_b7b4ccf8","line":5715,"range":{"start_line":5715,"start_character":7,"end_line":5715,"end_character":70},"updated":"2022-01-05 15:21:08.000000000","message":"ok so instance 2 requests 3 numa nodes and does not request a pci device\n\nso since it can fit an any of the host numa nodes but doens not need a pci device it avoid cell 2 which has the most pci device aviable.\n\n+1\nthis is asserting that we avoid numa nodes with pci device when they are not requested maxiumising the change an instance that requires one can land on the host in the future.","commit_id":"c142485ccda7bc1b7a4baacd0dc1ca6ae9ea6c70"},{"author":{"_account_id":16198,"name":"Ilya Popov","email":"hebulrih@gmail.com","username":"IPO"},"change_message_id":"e0b33ad4816160c05fa55c0bf82e6e0f2db125d6","unresolved":false,"context_lines":[{"line_number":5712,"context_line":"            group \u003d \u0027compute\u0027)"},{"line_number":5713,"context_line":"        instance_topology \u003d hw.numa_fit_instance_to_host("},{"line_number":5714,"context_line":"                self.host, self.instance2)"},{"line_number":5715,"context_line":"        self.assertInstanceNUMAcellOrder([0, 1, 3], instance_topology)"},{"line_number":5716,"context_line":"        CONF.set_override("},{"line_number":5717,"context_line":"            \u0027packing_host_numa_cells_allocation_strategy\u0027,"},{"line_number":5718,"context_line":"            False,"}],"source_content_type":"text/x-python","patch_set":19,"id":"833f5afd_0b31caf5","line":5715,"range":{"start_line":5715,"start_character":7,"end_line":5715,"end_character":70},"in_reply_to":"73476500_b7b4ccf8","updated":"2022-01-05 21:40:08.000000000","message":"Done","commit_id":"c142485ccda7bc1b7a4baacd0dc1ca6ae9ea6c70"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"5cc43721d02c743b71ce618ae76fd9899aad8f3a","unresolved":true,"context_lines":[{"line_number":5719,"context_line":"            group \u003d \u0027compute\u0027)"},{"line_number":5720,"context_line":"        instance_topology \u003d hw.numa_fit_instance_to_host("},{"line_number":5721,"context_line":"                self.host, self.instance2)"},{"line_number":5722,"context_line":"        self.assertInstanceNUMAcellOrder([2, 3, 0], instance_topology)"},{"line_number":5723,"context_line":""},{"line_number":5724,"context_line":"    def test_sort_no_pci_stats_shared_cpus(self):"},{"line_number":5725,"context_line":"        CONF.set_override("}],"source_content_type":"text/x-python","patch_set":19,"id":"703a24b6_47e57d97","line":5722,"range":{"start_line":5722,"start_character":8,"end_line":5722,"end_character":70},"updated":"2022-01-05 15:21:08.000000000","message":"this however is sub optimal.\nit now includes when we spread.\ni kind of feel like we should make the pci behavior independent of the pack vs spread behaivor and still have it avoid the node with the most pci device if you don\u0027t request it.\n\nperhaps we could come back to this in a followup.\nthere is a consitency argument to be made that what you have currently impelmented is the correct behaivor\nin that you are respecting the configuration option that says we shoudl spread so im ok with moving this discussion to a follow up patch to not delay this initial patch given the scope of it has already grown quite a lot.","commit_id":"c142485ccda7bc1b7a4baacd0dc1ca6ae9ea6c70"},{"author":{"_account_id":16198,"name":"Ilya Popov","email":"hebulrih@gmail.com","username":"IPO"},"change_message_id":"e0b33ad4816160c05fa55c0bf82e6e0f2db125d6","unresolved":false,"context_lines":[{"line_number":5719,"context_line":"            group \u003d \u0027compute\u0027)"},{"line_number":5720,"context_line":"        instance_topology \u003d hw.numa_fit_instance_to_host("},{"line_number":5721,"context_line":"                self.host, self.instance2)"},{"line_number":5722,"context_line":"        self.assertInstanceNUMAcellOrder([2, 3, 0], instance_topology)"},{"line_number":5723,"context_line":""},{"line_number":5724,"context_line":"    def test_sort_no_pci_stats_shared_cpus(self):"},{"line_number":5725,"context_line":"        CONF.set_override("}],"source_content_type":"text/x-python","patch_set":19,"id":"aa70f5ac_0e1b98a4","line":5722,"range":{"start_line":5722,"start_character":8,"end_line":5722,"end_character":70},"in_reply_to":"703a24b6_47e57d97","updated":"2022-01-05 21:40:08.000000000","message":"Yes I thought about it much and decided to keep it this way. pack strategy will give us NUMA nodes with less pci available first - to pack it. Like it happens for rest resources we check (RAM, cpus). And if we will try to separate pci from packing - it will be like subpacking on list excluding NUMA nodes with pci. And you are right - in this case packing looks like spreading thats quite strange.","commit_id":"c142485ccda7bc1b7a4baacd0dc1ca6ae9ea6c70"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"6e07d338f626393c1d8fad521e2950ecd887ad60","unresolved":true,"context_lines":[{"line_number":2756,"context_line":"        # the PCI device is found on host cell 1"},{"line_number":2757,"context_line":"        pci_stats \u003d _create_pci_stats(1)"},{"line_number":2758,"context_line":""},{"line_number":2759,"context_line":"        # ...threfore an instance without a PCI device should get host cell 1"},{"line_number":2760,"context_line":"        # instead of 2 with default value True of option"},{"line_number":2761,"context_line":"        # packing_host_numa_cells_allocation_strategy"},{"line_number":2762,"context_line":"        instance_topology \u003d hw.numa_fit_instance_to_host("}],"source_content_type":"text/x-python","patch_set":22,"id":"15630379_68392a45","line":2759,"range":{"start_line":2759,"start_character":13,"end_line":2759,"end_character":21},"updated":"2022-02-01 11:21:51.000000000","message":"nit: therefore","commit_id":"994d4f0bbc4ea0b0f88cc8a4e85570a4c7e2e9e6"},{"author":{"_account_id":16198,"name":"Ilya Popov","email":"hebulrih@gmail.com","username":"IPO"},"change_message_id":"fbcf547dc478b4711690f9cae12c943f3fb9d8a8","unresolved":false,"context_lines":[{"line_number":2756,"context_line":"        # the PCI device is found on host cell 1"},{"line_number":2757,"context_line":"        pci_stats \u003d _create_pci_stats(1)"},{"line_number":2758,"context_line":""},{"line_number":2759,"context_line":"        # ...threfore an instance without a PCI device should get host cell 1"},{"line_number":2760,"context_line":"        # instead of 2 with default value True of option"},{"line_number":2761,"context_line":"        # packing_host_numa_cells_allocation_strategy"},{"line_number":2762,"context_line":"        instance_topology \u003d hw.numa_fit_instance_to_host("}],"source_content_type":"text/x-python","patch_set":22,"id":"af907c88_4b7c518f","line":2759,"range":{"start_line":2759,"start_character":13,"end_line":2759,"end_character":21},"in_reply_to":"15630379_68392a45","updated":"2022-02-01 17:28:15.000000000","message":"Done","commit_id":"994d4f0bbc4ea0b0f88cc8a4e85570a4c7e2e9e6"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"6e07d338f626393c1d8fad521e2950ecd887ad60","unresolved":true,"context_lines":[{"line_number":2756,"context_line":"        # the PCI device is found on host cell 1"},{"line_number":2757,"context_line":"        pci_stats \u003d _create_pci_stats(1)"},{"line_number":2758,"context_line":""},{"line_number":2759,"context_line":"        # ...threfore an instance without a PCI device should get host cell 1"},{"line_number":2760,"context_line":"        # instead of 2 with default value True of option"},{"line_number":2761,"context_line":"        # packing_host_numa_cells_allocation_strategy"},{"line_number":2762,"context_line":"        instance_topology \u003d hw.numa_fit_instance_to_host("},{"line_number":2763,"context_line":"                self.host, self.instance1, pci_stats\u003dpci_stats)"},{"line_number":2764,"context_line":"        self.assertIsInstance(instance_topology, objects.InstanceNUMATopology)"}],"source_content_type":"text/x-python","patch_set":22,"id":"b424db8b_fd805801","line":2761,"range":{"start_line":2759,"start_character":0,"end_line":2761,"end_character":53},"updated":"2022-02-01 11:21:51.000000000","message":"wait, that is a behavior change with the new config flag having a default value. Do we really want to change how nova behaves by default?","commit_id":"994d4f0bbc4ea0b0f88cc8a4e85570a4c7e2e9e6"},{"author":{"_account_id":16198,"name":"Ilya Popov","email":"hebulrih@gmail.com","username":"IPO"},"change_message_id":"99df8485c4ddacb369b6aeb2ab2918eaaebc2bb6","unresolved":false,"context_lines":[{"line_number":2756,"context_line":"        # the PCI device is found on host cell 1"},{"line_number":2757,"context_line":"        pci_stats \u003d _create_pci_stats(1)"},{"line_number":2758,"context_line":""},{"line_number":2759,"context_line":"        # ...threfore an instance without a PCI device should get host cell 1"},{"line_number":2760,"context_line":"        # instead of 2 with default value True of option"},{"line_number":2761,"context_line":"        # packing_host_numa_cells_allocation_strategy"},{"line_number":2762,"context_line":"        instance_topology \u003d hw.numa_fit_instance_to_host("},{"line_number":2763,"context_line":"                self.host, self.instance1, pci_stats\u003dpci_stats)"},{"line_number":2764,"context_line":"        self.assertIsInstance(instance_topology, objects.InstanceNUMATopology)"}],"source_content_type":"text/x-python","patch_set":22,"id":"9241211f_b1561715","line":2761,"range":{"start_line":2759,"start_character":0,"end_line":2761,"end_character":53},"in_reply_to":"285f467b_87c7e9e1","updated":"2022-02-02 18:32:33.000000000","message":"Done","commit_id":"994d4f0bbc4ea0b0f88cc8a4e85570a4c7e2e9e6"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"4aa70bd13e933b8c4c2037c8d2dc0ca2b97bd962","unresolved":true,"context_lines":[{"line_number":2756,"context_line":"        # the PCI device is found on host cell 1"},{"line_number":2757,"context_line":"        pci_stats \u003d _create_pci_stats(1)"},{"line_number":2758,"context_line":""},{"line_number":2759,"context_line":"        # ...threfore an instance without a PCI device should get host cell 1"},{"line_number":2760,"context_line":"        # instead of 2 with default value True of option"},{"line_number":2761,"context_line":"        # packing_host_numa_cells_allocation_strategy"},{"line_number":2762,"context_line":"        instance_topology \u003d hw.numa_fit_instance_to_host("},{"line_number":2763,"context_line":"                self.host, self.instance1, pci_stats\u003dpci_stats)"},{"line_number":2764,"context_line":"        self.assertIsInstance(instance_topology, objects.InstanceNUMATopology)"}],"source_content_type":"text/x-python","patch_set":22,"id":"285f467b_87c7e9e1","line":2761,"range":{"start_line":2759,"start_character":0,"end_line":2761,"end_character":53},"in_reply_to":"b424db8b_fd805801","updated":"2022-02-01 13:38:59.000000000","message":"i raised this question in https://review.opendev.org/c/openstack/nova/+/805649/comment/703a24b6_47e57d97/\n\nit is a change in behavior and i kind of agree with you that we should not do it.\ni would prefer if we did not have pack vs spread affect the pci behavior howver \nit would make it inconsitent and open the door to should we have pack vs spread per resouce but since we did nto want to expose the internals of the algorthim that is hard to do.","commit_id":"994d4f0bbc4ea0b0f88cc8a4e85570a4c7e2e9e6"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"6e07d338f626393c1d8fad521e2950ecd887ad60","unresolved":true,"context_lines":[{"line_number":5581,"context_line":""},{"line_number":5582,"context_line":""},{"line_number":5583,"context_line":"class HostCellsSortingTestCase(test.NoDBTestCase):"},{"line_number":5584,"context_line":"    # NOTE (IPO)"},{"line_number":5585,"context_line":"    # It is possible to test all sorting cases with one defined host NUMA topo."},{"line_number":5586,"context_line":"    # We have 4 NUMA cells with the following properties:"},{"line_number":5587,"context_line":"    # NUMA cell 0: have most cpu usage"}],"source_content_type":"text/x-python","patch_set":22,"id":"5747a248_3ae6ad7f","line":5584,"updated":"2022-02-01 11:21:51.000000000","message":"nit: I suggest to  either drop this line or say something like\n\n    # NOTE(IPO): It is possible to test ...","commit_id":"994d4f0bbc4ea0b0f88cc8a4e85570a4c7e2e9e6"},{"author":{"_account_id":16198,"name":"Ilya Popov","email":"hebulrih@gmail.com","username":"IPO"},"change_message_id":"fbcf547dc478b4711690f9cae12c943f3fb9d8a8","unresolved":false,"context_lines":[{"line_number":5581,"context_line":""},{"line_number":5582,"context_line":""},{"line_number":5583,"context_line":"class HostCellsSortingTestCase(test.NoDBTestCase):"},{"line_number":5584,"context_line":"    # NOTE (IPO)"},{"line_number":5585,"context_line":"    # It is possible to test all sorting cases with one defined host NUMA topo."},{"line_number":5586,"context_line":"    # We have 4 NUMA cells with the following properties:"},{"line_number":5587,"context_line":"    # NUMA cell 0: have most cpu usage"}],"source_content_type":"text/x-python","patch_set":22,"id":"6c4e37db_b9e8d8c3","line":5584,"in_reply_to":"5747a248_3ae6ad7f","updated":"2022-02-01 17:28:15.000000000","message":"Done","commit_id":"994d4f0bbc4ea0b0f88cc8a4e85570a4c7e2e9e6"}],"nova/virt/hardware.py":[{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"a32070e03a3b54af8b0585c93b891e3d7a460e05","unresolved":true,"context_lines":[{"line_number":2218,"context_line":"                    [id_max_mem_usage_cell])"},{"line_number":2219,"context_line":"        # If PCI devices are required, we sort cell list on memory usage key"},{"line_number":2220,"context_line":"        # to balance cell memory usage."},{"line_number":2221,"context_line":"        else:"},{"line_number":2222,"context_line":"            host_cells \u003d sorted("},{"line_number":2223,"context_line":"                host_cells, key\u003dlambda cell: cell.memory_usage)"},{"line_number":2224,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"0c73a374_57a4e294","line":2221,"updated":"2021-09-22 09:53:46.000000000","message":"not quite\n\nwe should take advatage of the fact that python does a stable sort\nwe have a long standing itm to sort more inteligently \n\nhow this should work is the else should be “elif pci_requested and pci_stats:” sort by pci devices in the reverse order\ni.e. \nhost_cells \u003d sorted(host_cells,reverse\u003dTrue key\u003dlambda cell: cell.id in [\n                pool[\u0027numa_node\u0027] for\n                pool in pci_stats.pools] +  # type: ignore\n                [id_max_mem_usage_cell])\n\nfinally outside of the if elif block we can unconditionally sort based\non memory usage although that should take into account hugepages when they are avaiable and requested. this will currently only work properly for 4k memory.\n\n\nif you just want to do the min correct chnage just remove this else and the ohter enhancemets including the hugepage aware sorting can be added in a sperate patch.\n\nthe way we sort should be ideally\n\nnum pci devices\nfree memory\nfree hugepages\nfree pinnded cpus\n\neach as stable sorts applied one after the other.","commit_id":"f1de6c34a5f14e75fa6a397aae5fff25455abc86"},{"author":{"_account_id":16198,"name":"Ilya Popov","email":"hebulrih@gmail.com","username":"IPO"},"change_message_id":"bc8858fb9825fa9d48f01199da2b7bdd932726cb","unresolved":true,"context_lines":[{"line_number":2218,"context_line":"                    [id_max_mem_usage_cell])"},{"line_number":2219,"context_line":"        # If PCI devices are required, we sort cell list on memory usage key"},{"line_number":2220,"context_line":"        # to balance cell memory usage."},{"line_number":2221,"context_line":"        else:"},{"line_number":2222,"context_line":"            host_cells \u003d sorted("},{"line_number":2223,"context_line":"                host_cells, key\u003dlambda cell: cell.memory_usage)"},{"line_number":2224,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"353be03d_77ab9f35","line":2221,"in_reply_to":"0c73a374_57a4e294","updated":"2021-09-22 19:24:23.000000000","message":"Dear Sean, thank you for review ! \nI will going to continue to work on it, maybe will split on 2 patches as you proposed.","commit_id":"f1de6c34a5f14e75fa6a397aae5fff25455abc86"},{"author":{"_account_id":16198,"name":"Ilya Popov","email":"hebulrih@gmail.com","username":"IPO"},"change_message_id":"688a449214be4ca8694036ceeea940a78626db8e","unresolved":false,"context_lines":[{"line_number":2218,"context_line":"                    [id_max_mem_usage_cell])"},{"line_number":2219,"context_line":"        # If PCI devices are required, we sort cell list on memory usage key"},{"line_number":2220,"context_line":"        # to balance cell memory usage."},{"line_number":2221,"context_line":"        else:"},{"line_number":2222,"context_line":"            host_cells \u003d sorted("},{"line_number":2223,"context_line":"                host_cells, key\u003dlambda cell: cell.memory_usage)"},{"line_number":2224,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"8ec79e69_83c14cf9","line":2221,"in_reply_to":"353be03d_77ab9f35","updated":"2021-10-26 19:32:48.000000000","message":"Done","commit_id":"f1de6c34a5f14e75fa6a397aae5fff25455abc86"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"1a157e22e4baec1a7348565b6bb1cd250eba115d","unresolved":true,"context_lines":[{"line_number":2234,"context_line":""},{"line_number":2235,"context_line":"        # Next sort is based on memory usage. cell.memory_usage will show total"},{"line_number":2236,"context_line":"        # memory usage including memory usage for different huge page sizes"},{"line_number":2237,"context_line":"        host_cells \u003d sorted(host_cells, key\u003dlambda cell: cell.memory_usage)"},{"line_number":2238,"context_line":""},{"line_number":2239,"context_line":"        # Next sort based on presence of pinned CPUs"},{"line_number":2240,"context_line":"        host_cells \u003d sorted(host_cells, key\u003dlambda cell: len(cell.pinned_cpus))"}],"source_content_type":"text/x-python","patch_set":6,"id":"e6573bb3_2b8d860f","line":2237,"range":{"start_line":2237,"start_character":62,"end_line":2237,"end_character":74},"updated":"2021-10-14 12:08:33.000000000","message":"as with pinned_cpus below i think we want to invert this and use avail_memory https://github.com/openstack/nova/blob/7b063e4d0518af3e57872bc0288a94edcd33c19d/nova/objects/numa.py#L79-L82\n\nthat way we will place the numa nodes with the most avaiable memory first","commit_id":"57708dfef0138c753f01a954f595f3921c2af0a6"},{"author":{"_account_id":16198,"name":"Ilya Popov","email":"hebulrih@gmail.com","username":"IPO"},"change_message_id":"16ddd0444296c710c22dd8a96e4c02e693bcfa0b","unresolved":false,"context_lines":[{"line_number":2234,"context_line":""},{"line_number":2235,"context_line":"        # Next sort is based on memory usage. cell.memory_usage will show total"},{"line_number":2236,"context_line":"        # memory usage including memory usage for different huge page sizes"},{"line_number":2237,"context_line":"        host_cells \u003d sorted(host_cells, key\u003dlambda cell: cell.memory_usage)"},{"line_number":2238,"context_line":""},{"line_number":2239,"context_line":"        # Next sort based on presence of pinned CPUs"},{"line_number":2240,"context_line":"        host_cells \u003d sorted(host_cells, key\u003dlambda cell: len(cell.pinned_cpus))"}],"source_content_type":"text/x-python","patch_set":6,"id":"f1762e78_e350665d","line":2237,"range":{"start_line":2237,"start_character":62,"end_line":2237,"end_character":74},"in_reply_to":"e6573bb3_2b8d860f","updated":"2021-10-14 19:15:18.000000000","message":"Done","commit_id":"57708dfef0138c753f01a954f595f3921c2af0a6"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"1a157e22e4baec1a7348565b6bb1cd250eba115d","unresolved":true,"context_lines":[{"line_number":2237,"context_line":"        host_cells \u003d sorted(host_cells, key\u003dlambda cell: cell.memory_usage)"},{"line_number":2238,"context_line":""},{"line_number":2239,"context_line":"        # Next sort based on presence of pinned CPUs"},{"line_number":2240,"context_line":"        host_cells \u003d sorted(host_cells, key\u003dlambda cell: len(cell.pinned_cpus))"},{"line_number":2241,"context_line":""},{"line_number":2242,"context_line":"        # Final sort based on used CPUs"},{"line_number":2243,"context_line":"        host_cells \u003d sorted(host_cells, key\u003dlambda cell: cell.cpu_usage)"}],"source_content_type":"text/x-python","patch_set":6,"id":"1204bd42_12bfbd0f","line":2240,"range":{"start_line":2240,"start_character":6,"end_line":2240,"end_character":79},"updated":"2021-10-14 12:08:33.000000000","message":"ack, cell.pinned_cpus tracks the cpus that are allocated to vms where as cell.pcpuset tracks the avaiable cpus for pinning\n\ni think this is actully sub optimal however, this will prefer host that have the most pinned cpus used\n\ni think we actully want toe replce cell.pinned_cpus with cell.free_pcpus\n\nso we prefer the cell with the most free cpus.\nhttps://github.com/openstack/nova/blob/7b063e4d0518af3e57872bc0288a94edcd33c19d/nova/objects/numa.py#L65-L67","commit_id":"57708dfef0138c753f01a954f595f3921c2af0a6"},{"author":{"_account_id":16198,"name":"Ilya Popov","email":"hebulrih@gmail.com","username":"IPO"},"change_message_id":"16ddd0444296c710c22dd8a96e4c02e693bcfa0b","unresolved":false,"context_lines":[{"line_number":2237,"context_line":"        host_cells \u003d sorted(host_cells, key\u003dlambda cell: cell.memory_usage)"},{"line_number":2238,"context_line":""},{"line_number":2239,"context_line":"        # Next sort based on presence of pinned CPUs"},{"line_number":2240,"context_line":"        host_cells \u003d sorted(host_cells, key\u003dlambda cell: len(cell.pinned_cpus))"},{"line_number":2241,"context_line":""},{"line_number":2242,"context_line":"        # Final sort based on used CPUs"},{"line_number":2243,"context_line":"        host_cells \u003d sorted(host_cells, key\u003dlambda cell: cell.cpu_usage)"}],"source_content_type":"text/x-python","patch_set":6,"id":"71413ad5_700a024f","line":2240,"range":{"start_line":2240,"start_character":6,"end_line":2240,"end_character":79},"in_reply_to":"1204bd42_12bfbd0f","updated":"2021-10-14 19:15:18.000000000","message":"Done","commit_id":"57708dfef0138c753f01a954f595f3921c2af0a6"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"1a157e22e4baec1a7348565b6bb1cd250eba115d","unresolved":true,"context_lines":[{"line_number":2240,"context_line":"        host_cells \u003d sorted(host_cells, key\u003dlambda cell: len(cell.pinned_cpus))"},{"line_number":2241,"context_line":""},{"line_number":2242,"context_line":"        # Final sort based on used CPUs"},{"line_number":2243,"context_line":"        host_cells \u003d sorted(host_cells, key\u003dlambda cell: cell.cpu_usage)"},{"line_number":2244,"context_line":""},{"line_number":2245,"context_line":"    for host_cell_perm in itertools.permutations("},{"line_number":2246,"context_line":"            host_cells, len(instance_topology)):"}],"source_content_type":"text/x-python","patch_set":6,"id":"9de2aa32_90949204","line":2243,"range":{"start_line":2243,"start_character":9,"end_line":2243,"end_character":72},"updated":"2021-10-14 12:08:33.000000000","message":"we likely want to only sort based on either free pcus or free cpus in general.\n\nso i would suggest something like this\n\n\nif instance_topology.cpu_policy in (\n   None, fields.CPUAllocationPolicy.SHARED,\n):\n   # sort based on used CPUs\n   host_cells \u003d sorted(host_cells, key\u003dlambda cell: cell.cpu_usage, reverse\u003dTrue)\n    \nelse:\n   # sort based on presence of pinned CPUs\n   host_cells \u003d sorted(host_cells, key\u003dlambda cell: len(cell.free_pcpus))","commit_id":"57708dfef0138c753f01a954f595f3921c2af0a6"},{"author":{"_account_id":16198,"name":"Ilya Popov","email":"hebulrih@gmail.com","username":"IPO"},"change_message_id":"16ddd0444296c710c22dd8a96e4c02e693bcfa0b","unresolved":false,"context_lines":[{"line_number":2240,"context_line":"        host_cells \u003d sorted(host_cells, key\u003dlambda cell: len(cell.pinned_cpus))"},{"line_number":2241,"context_line":""},{"line_number":2242,"context_line":"        # Final sort based on used CPUs"},{"line_number":2243,"context_line":"        host_cells \u003d sorted(host_cells, key\u003dlambda cell: cell.cpu_usage)"},{"line_number":2244,"context_line":""},{"line_number":2245,"context_line":"    for host_cell_perm in itertools.permutations("},{"line_number":2246,"context_line":"            host_cells, len(instance_topology)):"}],"source_content_type":"text/x-python","patch_set":6,"id":"dbc4fb0a_44185bb2","line":2243,"range":{"start_line":2243,"start_character":9,"end_line":2243,"end_character":72},"in_reply_to":"9de2aa32_90949204","updated":"2021-10-14 19:15:18.000000000","message":"Done","commit_id":"57708dfef0138c753f01a954f595f3921c2af0a6"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"7483f18562bcdb814c965cf248fd92813cbd83cf","unresolved":true,"context_lines":[{"line_number":2232,"context_line":"                    host_cells,"},{"line_number":2233,"context_line":"                    key\u003dlambda cell: total_pci_in_cell.get(cell.id, 0))"},{"line_number":2234,"context_line":""},{"line_number":2235,"context_line":"        # Next sort is based on memory usage. cell.avail_memory returns free"},{"line_number":2236,"context_line":"        # memory for cell. Revert sorting to get cells with more free memory"},{"line_number":2237,"context_line":"        # first"},{"line_number":2238,"context_line":"        host_cells \u003d sorted("},{"line_number":2239,"context_line":"            host_cells,"},{"line_number":2240,"context_line":"            reverse\u003dTrue,"},{"line_number":2241,"context_line":"            key\u003dlambda cell: cell.avail_memory)"},{"line_number":2242,"context_line":""},{"line_number":2243,"context_line":"        # Final sort based on available dedicated or shared CPUs"},{"line_number":2244,"context_line":"        # cpu_policy is set to the same value in all cells so we use"},{"line_number":2245,"context_line":"        # first cell in list (it exists if instance_topology defined )"},{"line_number":2246,"context_line":"        # to get cpu_policy"},{"line_number":2247,"context_line":"        if instance_topology.cells[0].cpu_policy in ("},{"line_number":2248,"context_line":"                None, fields.CPUAllocationPolicy.SHARED):"},{"line_number":2249,"context_line":"            # sort based on used CPUs"},{"line_number":2250,"context_line":"            host_cells \u003d sorted(host_cells, key\u003dlambda cell: cell.cpu_usage)"},{"line_number":2251,"context_line":""},{"line_number":2252,"context_line":"        else:"},{"line_number":2253,"context_line":"            # sort based on presence of pinned CPUs"},{"line_number":2254,"context_line":"            host_cells \u003d sorted(host_cells,"},{"line_number":2255,"context_line":"                                reverse\u003dTrue,"},{"line_number":2256,"context_line":"                                key\u003dlambda cell: len(cell.free_pcpus))"},{"line_number":2257,"context_line":""},{"line_number":2258,"context_line":"    for host_cell_perm in itertools.permutations("},{"line_number":2259,"context_line":"            host_cells, len(instance_topology)):"}],"source_content_type":"text/x-python","patch_set":13,"id":"d27a6e62_0974a08d","line":2256,"range":{"start_line":2235,"start_character":8,"end_line":2256,"end_character":70},"updated":"2021-11-19 12:06:56.000000000","message":"we discussed this at the ptg and agreed we coudl do this as a backportable bug fix but we needed too make this configurable via a new workaround option to contol\nif we should pack or spread.\n\nthe current logic implements the spreading behavior  the packing behavior is just inverting the  sort order.\n\ncan you add the workaround config option and rework this section of the patch to be able to pack or spread based on the new option.\nonce that is done and the tests updated i think this will be good to go.\n\nsorry this is expanding beyond your use case but we would like to fix this properly if you need help with this let me know.\n\ni have coppied the PTG disccsion notes below but you can also find them here https://etherpad.opendev.org/p/r.e70aa851abf8644c29c8abe4bce32b81#L492 on line 492\n\n    (sean-k-mooney) numa balancing\n\n    https://bugs.launchpad.net/nova/+bug/1940668\n\n    https://bugs.launchpad.net/nova/+bug/1893121\n\n    https://review.opendev.org/c/openstack/nova/+/805649\n\n    the proposed algortim is \n\n    if pci devices are present per node with pci device if one is requested and avoid nodes with pci devices  if none are requested (avoiding is all ready present today prefering is new)\n\n    then resort nodes based on memroy usage\n\n    finally sort by avaiable cpus (accontign for both pinned and unpinned based on request cpu_policy)\n\n    not for mixed vms we sort based on avaiable pinned cpus in the numa node.\n\n    the sort is only applied if the host has more numa nodes then the vm request for effincy\n\n    the code path where this sort happens is only applied for numa instnaces\n\n    orther resouces we could sort on in the future\n\n    pmem resouces (currntly not tracked per numa node)\n\n    vgpus(also not tracked per numa node today)\n\n    long term i think sorting is not the ideal solution as a cost metric which takes all factors into account simultainusly is likely better butthat is not trivial to implement and this current change is just a minor tweak that is.\n\n    johnthetubaguy\n\n    use case sharing: VM flavors are full, half, quarter, eighth, packing works nicely in this case. at least I think it does.\n\n    AGREED:\n\n    workaround config option to define the allocation strategy (packing by default, spread if set)\n\n    let\u0027s do this as a backportable bugfix","commit_id":"8b22a53380f413e578c56d268438dc51c99316a9"},{"author":{"_account_id":16198,"name":"Ilya Popov","email":"hebulrih@gmail.com","username":"IPO"},"change_message_id":"4986002b937753625e02e4f3f7d607aead5ffcc7","unresolved":false,"context_lines":[{"line_number":2232,"context_line":"                    host_cells,"},{"line_number":2233,"context_line":"                    key\u003dlambda cell: total_pci_in_cell.get(cell.id, 0))"},{"line_number":2234,"context_line":""},{"line_number":2235,"context_line":"        # Next sort is based on memory usage. cell.avail_memory returns free"},{"line_number":2236,"context_line":"        # memory for cell. Revert sorting to get cells with more free memory"},{"line_number":2237,"context_line":"        # first"},{"line_number":2238,"context_line":"        host_cells \u003d sorted("},{"line_number":2239,"context_line":"            host_cells,"},{"line_number":2240,"context_line":"            reverse\u003dTrue,"},{"line_number":2241,"context_line":"            key\u003dlambda cell: cell.avail_memory)"},{"line_number":2242,"context_line":""},{"line_number":2243,"context_line":"        # Final sort based on available dedicated or shared CPUs"},{"line_number":2244,"context_line":"        # cpu_policy is set to the same value in all cells so we use"},{"line_number":2245,"context_line":"        # first cell in list (it exists if instance_topology defined )"},{"line_number":2246,"context_line":"        # to get cpu_policy"},{"line_number":2247,"context_line":"        if instance_topology.cells[0].cpu_policy in ("},{"line_number":2248,"context_line":"                None, fields.CPUAllocationPolicy.SHARED):"},{"line_number":2249,"context_line":"            # sort based on used CPUs"},{"line_number":2250,"context_line":"            host_cells \u003d sorted(host_cells, key\u003dlambda cell: cell.cpu_usage)"},{"line_number":2251,"context_line":""},{"line_number":2252,"context_line":"        else:"},{"line_number":2253,"context_line":"            # sort based on presence of pinned CPUs"},{"line_number":2254,"context_line":"            host_cells \u003d sorted(host_cells,"},{"line_number":2255,"context_line":"                                reverse\u003dTrue,"},{"line_number":2256,"context_line":"                                key\u003dlambda cell: len(cell.free_pcpus))"},{"line_number":2257,"context_line":""},{"line_number":2258,"context_line":"    for host_cell_perm in itertools.permutations("},{"line_number":2259,"context_line":"            host_cells, len(instance_topology)):"}],"source_content_type":"text/x-python","patch_set":13,"id":"d2984ea0_54a47cb2","line":2256,"range":{"start_line":2235,"start_character":8,"end_line":2256,"end_character":70},"in_reply_to":"d27a6e62_0974a08d","updated":"2022-01-31 17:23:53.000000000","message":"Fixed","commit_id":"8b22a53380f413e578c56d268438dc51c99316a9"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"4e3bde450c45b20c23389a088ba535338ee790fb","unresolved":true,"context_lines":[{"line_number":2199,"context_line":"    # cells less than host\u0027s cells number. If it\u0027s equal, we\u0027ll use"},{"line_number":2200,"context_line":"    # all cells and no sorting of the cells list is needed."},{"line_number":2201,"context_line":"    if len(host_topology) \u003e len(instance_topology):"},{"line_number":2202,"context_line":"        if CONF.compute.packing_host_numa_cells_allocation_strategy:"},{"line_number":2203,"context_line":"            sort_direction_list \u003d [False, True, False, True, False]"},{"line_number":2204,"context_line":"        else:"},{"line_number":2205,"context_line":"            sort_direction_list \u003d [True, False, True, False, True]"},{"line_number":2206,"context_line":"        # To balance NUMA cells usage based on several parameters"},{"line_number":2207,"context_line":"        # some sorts performed on host_cells list to move less used cells"},{"line_number":2208,"context_line":"        # to the beginning of the host_cells list."}],"source_content_type":"text/x-python","patch_set":17,"id":"d486cc7a_7bc70c46","line":2205,"range":{"start_line":2202,"start_character":6,"end_line":2205,"end_character":66},"updated":"2021-12-06 11:57:32.000000000","message":"i geuss this works but i proably would have done this differently\n\nperhaps liek this \n\npack \u003d CONF.compute.packing_host_numa_cells_allocation_strategy\n\nthen set \"reverse \u003d pack\"  or \"revers \u003d not pack\"  below\n\n\nthe indexs into these arrys are hard to follow since this array is not always on screen at least when reviewing.","commit_id":"7e7c122321051a26eda6f8d0d478ae6b668a761c"},{"author":{"_account_id":16198,"name":"Ilya Popov","email":"hebulrih@gmail.com","username":"IPO"},"change_message_id":"64a04ab1e68a0add5aa4d7952daae8ad6df09984","unresolved":false,"context_lines":[{"line_number":2199,"context_line":"    # cells less than host\u0027s cells number. If it\u0027s equal, we\u0027ll use"},{"line_number":2200,"context_line":"    # all cells and no sorting of the cells list is needed."},{"line_number":2201,"context_line":"    if len(host_topology) \u003e len(instance_topology):"},{"line_number":2202,"context_line":"        if CONF.compute.packing_host_numa_cells_allocation_strategy:"},{"line_number":2203,"context_line":"            sort_direction_list \u003d [False, True, False, True, False]"},{"line_number":2204,"context_line":"        else:"},{"line_number":2205,"context_line":"            sort_direction_list \u003d [True, False, True, False, True]"},{"line_number":2206,"context_line":"        # To balance NUMA cells usage based on several parameters"},{"line_number":2207,"context_line":"        # some sorts performed on host_cells list to move less used cells"},{"line_number":2208,"context_line":"        # to the beginning of the host_cells list."}],"source_content_type":"text/x-python","patch_set":17,"id":"d36ec9c2_5b18ee8b","line":2205,"range":{"start_line":2202,"start_character":6,"end_line":2205,"end_character":66},"in_reply_to":"d486cc7a_7bc70c46","updated":"2021-12-06 14:27:48.000000000","message":"Done","commit_id":"7e7c122321051a26eda6f8d0d478ae6b668a761c"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"6e07d338f626393c1d8fad521e2950ecd887ad60","unresolved":true,"context_lines":[{"line_number":2241,"context_line":"        # Next sort is based on memory usage. cell.avail_memory returns free"},{"line_number":2242,"context_line":"        # memory for cell. Revert sorting to get cells with more free memory"},{"line_number":2243,"context_line":"        # first when pack is \u0027False\u0027"},{"line_number":2244,"context_line":"        host_cells \u003d sorted("},{"line_number":2245,"context_line":"            host_cells,"},{"line_number":2246,"context_line":"            reverse\u003dnot pack,"},{"line_number":2247,"context_line":"            key\u003dlambda cell: cell.avail_memory)"}],"source_content_type":"text/x-python","patch_set":22,"id":"508ace35_427c2b3d","line":2244,"updated":"2022-02-01 11:21:51.000000000","message":"Am I correct that by this implementation sorting by memory always overwrites the sorting by pci device counts?","commit_id":"994d4f0bbc4ea0b0f88cc8a4e85570a4c7e2e9e6"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"4aa70bd13e933b8c4c2037c8d2dc0ca2b97bd962","unresolved":true,"context_lines":[{"line_number":2241,"context_line":"        # Next sort is based on memory usage. cell.avail_memory returns free"},{"line_number":2242,"context_line":"        # memory for cell. Revert sorting to get cells with more free memory"},{"line_number":2243,"context_line":"        # first when pack is \u0027False\u0027"},{"line_number":2244,"context_line":"        host_cells \u003d sorted("},{"line_number":2245,"context_line":"            host_cells,"},{"line_number":2246,"context_line":"            reverse\u003dnot pack,"},{"line_number":2247,"context_line":"            key\u003dlambda cell: cell.avail_memory)"}],"source_content_type":"text/x-python","patch_set":22,"id":"b64082e2_31c06cf1","line":2244,"in_reply_to":"508ace35_427c2b3d","updated":"2022-02-01 13:38:59.000000000","message":"python support stable sort order so  when you sort by memory it will take precidence but where the free memory is equal the sortign form teh previous step will be maintained.","commit_id":"994d4f0bbc4ea0b0f88cc8a4e85570a4c7e2e9e6"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"f259f85757779e12d993cf2dac4372ddbd578228","unresolved":false,"context_lines":[{"line_number":2241,"context_line":"        # Next sort is based on memory usage. cell.avail_memory returns free"},{"line_number":2242,"context_line":"        # memory for cell. Revert sorting to get cells with more free memory"},{"line_number":2243,"context_line":"        # first when pack is \u0027False\u0027"},{"line_number":2244,"context_line":"        host_cells \u003d sorted("},{"line_number":2245,"context_line":"            host_cells,"},{"line_number":2246,"context_line":"            reverse\u003dnot pack,"},{"line_number":2247,"context_line":"            key\u003dlambda cell: cell.avail_memory)"}],"source_content_type":"text/x-python","patch_set":22,"id":"b8a55ace_2c7a24e4","line":2244,"in_reply_to":"b64082e2_31c06cf1","updated":"2022-02-03 11:14:02.000000000","message":"Ack","commit_id":"994d4f0bbc4ea0b0f88cc8a4e85570a4c7e2e9e6"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"6e07d338f626393c1d8fad521e2950ecd887ad60","unresolved":true,"context_lines":[{"line_number":2259,"context_line":"                key\u003dlambda cell: cell.cpu_usage)"},{"line_number":2260,"context_line":""},{"line_number":2261,"context_line":"        else:"},{"line_number":2262,"context_line":"            # sort based on presence of pinned CPUs"},{"line_number":2263,"context_line":"            host_cells \u003d sorted("},{"line_number":2264,"context_line":"                host_cells,"},{"line_number":2265,"context_line":"                reverse\u003dnot pack,"}],"source_content_type":"text/x-python","patch_set":22,"id":"15f2bd05_bf9a7d2f","line":2262,"updated":"2022-02-01 11:21:51.000000000","message":"..and also if cpu pinnig is requested the sorting by free pcpus are overwrites the sorting by pci and by memory?","commit_id":"994d4f0bbc4ea0b0f88cc8a4e85570a4c7e2e9e6"},{"author":{"_account_id":16198,"name":"Ilya Popov","email":"hebulrih@gmail.com","username":"IPO"},"change_message_id":"aadfb6b5fc40a68f6e7f0c2cad75c7cbcde81f46","unresolved":false,"context_lines":[{"line_number":2259,"context_line":"                key\u003dlambda cell: cell.cpu_usage)"},{"line_number":2260,"context_line":""},{"line_number":2261,"context_line":"        else:"},{"line_number":2262,"context_line":"            # sort based on presence of pinned CPUs"},{"line_number":2263,"context_line":"            host_cells \u003d sorted("},{"line_number":2264,"context_line":"                host_cells,"},{"line_number":2265,"context_line":"                reverse\u003dnot pack,"}],"source_content_type":"text/x-python","patch_set":22,"id":"e84062ed_a59c54d0","line":2262,"in_reply_to":"0865f1cd_669f593a","updated":"2022-02-06 12:07:15.000000000","message":"Done","commit_id":"994d4f0bbc4ea0b0f88cc8a4e85570a4c7e2e9e6"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"4aa70bd13e933b8c4c2037c8d2dc0ca2b97bd962","unresolved":true,"context_lines":[{"line_number":2259,"context_line":"                key\u003dlambda cell: cell.cpu_usage)"},{"line_number":2260,"context_line":""},{"line_number":2261,"context_line":"        else:"},{"line_number":2262,"context_line":"            # sort based on presence of pinned CPUs"},{"line_number":2263,"context_line":"            host_cells \u003d sorted("},{"line_number":2264,"context_line":"                host_cells,"},{"line_number":2265,"context_line":"                reverse\u003dnot pack,"}],"source_content_type":"text/x-python","patch_set":22,"id":"685629b1_6b5c5b7f","line":2262,"in_reply_to":"15f2bd05_bf9a7d2f","updated":"2022-02-01 13:38:59.000000000","message":"yes again the stable sort garuntees for pythons sort come into play.\nwhere teh cpus are equal the memory will determin the order and where the cpus and memory are equal the pci count will.\n\nso the last sort always has the highest precedence.","commit_id":"994d4f0bbc4ea0b0f88cc8a4e85570a4c7e2e9e6"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"86bd56e1a261d4248968713782011be0d7912b19","unresolved":true,"context_lines":[{"line_number":2259,"context_line":"                key\u003dlambda cell: cell.cpu_usage)"},{"line_number":2260,"context_line":""},{"line_number":2261,"context_line":"        else:"},{"line_number":2262,"context_line":"            # sort based on presence of pinned CPUs"},{"line_number":2263,"context_line":"            host_cells \u003d sorted("},{"line_number":2264,"context_line":"                host_cells,"},{"line_number":2265,"context_line":"                reverse\u003dnot pack,"}],"source_content_type":"text/x-python","patch_set":22,"id":"0865f1cd_669f593a","line":2262,"in_reply_to":"685629b1_6b5c5b7f","updated":"2022-02-02 17:04:03.000000000","message":"Cool. @Ilya: Please document this behavior for the user in the nova documentation. I see that today we mention PCI affinity at least in [1],[2]\n\n[1] doc/source/admin/cpu-topologies.rst\n[2] doc/source/admin/networking.rst","commit_id":"994d4f0bbc4ea0b0f88cc8a4e85570a4c7e2e9e6"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"f259f85757779e12d993cf2dac4372ddbd578228","unresolved":true,"context_lines":[{"line_number":2243,"context_line":"                    total_pci_in_cell[pool[\u0027numa_node\u0027]] +\u003d pool[\u0027count\u0027]"},{"line_number":2244,"context_line":"                else:"},{"line_number":2245,"context_line":"                    total_pci_in_cell[pool[\u0027numa_node\u0027]] \u003d pool[\u0027count\u0027]"},{"line_number":2246,"context_line":"            # For backword compatibility we will always \u0027spread\u0027:"},{"line_number":2247,"context_line":"            # we always move host cells with PCI at the beginning if PCI"},{"line_number":2248,"context_line":"            # requested by VM and move host cells with PCI at the end of the"},{"line_number":2249,"context_line":"            # list"}],"source_content_type":"text/x-python","patch_set":24,"id":"b22c4a66_44f6fe59","line":2246,"range":{"start_line":2246,"start_character":18,"end_line":2246,"end_character":26},"updated":"2022-02-03 11:14:02.000000000","message":"nit:backward","commit_id":"3b806f909c52a1f16d8a2ec3a763af6de30346b1"},{"author":{"_account_id":16198,"name":"Ilya Popov","email":"hebulrih@gmail.com","username":"IPO"},"change_message_id":"ea24f6a0b8335535bb35fe3c56f2a69355c544fa","unresolved":false,"context_lines":[{"line_number":2243,"context_line":"                    total_pci_in_cell[pool[\u0027numa_node\u0027]] +\u003d pool[\u0027count\u0027]"},{"line_number":2244,"context_line":"                else:"},{"line_number":2245,"context_line":"                    total_pci_in_cell[pool[\u0027numa_node\u0027]] \u003d pool[\u0027count\u0027]"},{"line_number":2246,"context_line":"            # For backword compatibility we will always \u0027spread\u0027:"},{"line_number":2247,"context_line":"            # we always move host cells with PCI at the beginning if PCI"},{"line_number":2248,"context_line":"            # requested by VM and move host cells with PCI at the end of the"},{"line_number":2249,"context_line":"            # list"}],"source_content_type":"text/x-python","patch_set":24,"id":"a2fc6958_299c549d","line":2246,"range":{"start_line":2246,"start_character":18,"end_line":2246,"end_character":26},"in_reply_to":"b22c4a66_44f6fe59","updated":"2022-02-03 14:45:10.000000000","message":"Done","commit_id":"3b806f909c52a1f16d8a2ec3a763af6de30346b1"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"f259f85757779e12d993cf2dac4372ddbd578228","unresolved":true,"context_lines":[{"line_number":2245,"context_line":"                    total_pci_in_cell[pool[\u0027numa_node\u0027]] \u003d pool[\u0027count\u0027]"},{"line_number":2246,"context_line":"            # For backword compatibility we will always \u0027spread\u0027:"},{"line_number":2247,"context_line":"            # we always move host cells with PCI at the beginning if PCI"},{"line_number":2248,"context_line":"            # requested by VM and move host cells with PCI at the end of the"},{"line_number":2249,"context_line":"            # list"},{"line_number":2250,"context_line":"            if pci_requests:"},{"line_number":2251,"context_line":"                host_cells \u003d sorted("}],"source_content_type":"text/x-python","patch_set":24,"id":"f074b2f9_92900edc","line":2248,"range":{"start_line":2248,"start_character":50,"end_line":2248,"end_character":54},"updated":"2022-02-03 11:14:02.000000000","message":"without?","commit_id":"3b806f909c52a1f16d8a2ec3a763af6de30346b1"},{"author":{"_account_id":16198,"name":"Ilya Popov","email":"hebulrih@gmail.com","username":"IPO"},"change_message_id":"ea24f6a0b8335535bb35fe3c56f2a69355c544fa","unresolved":false,"context_lines":[{"line_number":2245,"context_line":"                    total_pci_in_cell[pool[\u0027numa_node\u0027]] \u003d pool[\u0027count\u0027]"},{"line_number":2246,"context_line":"            # For backword compatibility we will always \u0027spread\u0027:"},{"line_number":2247,"context_line":"            # we always move host cells with PCI at the beginning if PCI"},{"line_number":2248,"context_line":"            # requested by VM and move host cells with PCI at the end of the"},{"line_number":2249,"context_line":"            # list"},{"line_number":2250,"context_line":"            if pci_requests:"},{"line_number":2251,"context_line":"                host_cells \u003d sorted("}],"source_content_type":"text/x-python","patch_set":24,"id":"138f9c0b_eb337384","line":2248,"range":{"start_line":2248,"start_character":50,"end_line":2248,"end_character":54},"in_reply_to":"f074b2f9_92900edc","updated":"2022-02-03 14:45:10.000000000","message":"Done","commit_id":"3b806f909c52a1f16d8a2ec3a763af6de30346b1"}],"releasenotes/notes/extra-sorting-for-host-cells-c03e37de1e57043b.yaml":[{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"6e07d338f626393c1d8fad521e2950ecd887ad60","unresolved":true,"context_lines":[],"source_content_type":"","patch_set":22,"id":"6863ab20_ae74dcc5","line":11,"updated":"2022-02-01 11:21:51.000000000","message":"I think we need a lot more documentation than this. \nIf I understand the code correctly then\n\n1) with the default pack strategy: if CPU pinning is requested the the sorting always prefer more used pcpu than more used ram or more used pci dev. And there is no way to express that I want to pack by memory or by pci device.\n\n2) with the default pack strategy: if CPU pinning is not requested the the sorting always prefer more used ram than more used pci dev. And there is no way to express that I want to pack by pci devices.\n\n3) I think similar rules apply now to the spread strategy as well.","commit_id":"994d4f0bbc4ea0b0f88cc8a4e85570a4c7e2e9e6"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"4aa70bd13e933b8c4c2037c8d2dc0ca2b97bd962","unresolved":true,"context_lines":[],"source_content_type":"","patch_set":22,"id":"de27bb63_26e6903b","line":11,"in_reply_to":"6863ab20_ae74dcc5","updated":"2022-02-01 13:38:59.000000000","message":"yes the confiration of ram vs disk vs cpus was intentionally not exposed to end users so we could potentally change that in the future.\n\nwe also consider this as a bug fix not a feature and wanted to keep the interface of its as minimal as possible.\n\nyes simialr rules apply to both pack and spread. we did not really want to leak the implemation detail to endusers and treat this mroe like a hint then an api contract so that we can in the futrue evolve this byond the inital simpel sort to a cost based approch possibel with operator or user input.","commit_id":"994d4f0bbc4ea0b0f88cc8a4e85570a4c7e2e9e6"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"86bd56e1a261d4248968713782011be0d7912b19","unresolved":true,"context_lines":[],"source_content_type":"","patch_set":22,"id":"ff5138af_00aab4b9","line":11,"in_reply_to":"de27bb63_26e6903b","updated":"2022-02-02 17:04:03.000000000","message":"Then describe this in a developer documentation but somehow I feel that this is getting more complicated without a reference I can read to understand how we are behaving","commit_id":"994d4f0bbc4ea0b0f88cc8a4e85570a4c7e2e9e6"},{"author":{"_account_id":16198,"name":"Ilya Popov","email":"hebulrih@gmail.com","username":"IPO"},"change_message_id":"aadfb6b5fc40a68f6e7f0c2cad75c7cbcde81f46","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":22,"id":"c264cf34_d1f022a8","line":11,"in_reply_to":"ff5138af_00aab4b9","updated":"2022-02-06 12:07:15.000000000","message":"Done","commit_id":"994d4f0bbc4ea0b0f88cc8a4e85570a4c7e2e9e6"}]}
