)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"cf6d15774986f1e1790d627f03c36e7396fd4d0c","unresolved":true,"context_lines":[{"line_number":18,"context_line":"~0.4sec"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"We have to keep in mind that this is a periodic task that gets called"},{"line_number":21,"context_line":"every minute."},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"Change-Id: Idfde621a4c4c4421fd7bff43624ba8aaebf8d1b6"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"a0361266_9c58663c","line":21,"updated":"2024-06-27 16:03:03.000000000","message":"I would not consider this to be a performance-critical part of the code.\n\nwe have considered just caching this once at startup in the past since we do actually support changing the pci devices at runtime but for now sure we can move in this direction and stop calling libvirt 3 times\n\nrealistically we probably should just use the memorize decorator.","commit_id":"c4a0ec79f4dd595cb29a618ca4b006978a22cb2c"},{"author":{"_account_id":35676,"name":"Max","email":"max.lamprecht@digits.schwarz","username":"lamprechtm"},"change_message_id":"49c7903b453f8c626fe1e8a296a0903f3f6999aa","unresolved":false,"context_lines":[{"line_number":18,"context_line":"~0.4sec"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"We have to keep in mind that this is a periodic task that gets called"},{"line_number":21,"context_line":"every minute."},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"Change-Id: Idfde621a4c4c4421fd7bff43624ba8aaebf8d1b6"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"4019ff9a_62a45ed7","line":21,"in_reply_to":"2baf6e3a_b5b7c6c2","updated":"2025-08-19 09:49:43.000000000","message":"We suspect that the following commit fixes the performance regression:\nhttps://gitlab.com/libvirt/libvirt/-/commit/98f1cf88fa7e0f992d93f376418fbfb3996a9690\n\nFor us, the situation has improved by upgrading to libvirt 10.5, at least the timings are not getting worse over time.","commit_id":"c4a0ec79f4dd595cb29a618ca4b006978a22cb2c"},{"author":{"_account_id":35676,"name":"Max","email":"max.lamprecht@digits.schwarz","username":"lamprechtm"},"change_message_id":"bf89124812656e55aff13cb098ad16b7770fa253","unresolved":true,"context_lines":[{"line_number":18,"context_line":"~0.4sec"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"We have to keep in mind that this is a periodic task that gets called"},{"line_number":21,"context_line":"every minute."},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"Change-Id: Idfde621a4c4c4421fd7bff43624ba8aaebf8d1b6"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"c257d3cf_7926e5e8","line":21,"in_reply_to":"a0361266_9c58663c","updated":"2024-07-01 09:19:42.000000000","message":"Regarding the performance issue:\nAfter upgrading to libvirt 10, we observed in our env that the Nova computes gets stuck at 100% CPU usage for 30 seconds after more than 14 days of uptime. This also causes the Rabbit heartbeat to fail (no cpu time). It seems like libvirt needs more and more time to answer the requests. We are currently investigating this on libvirt side.","commit_id":"c4a0ec79f4dd595cb29a618ca4b006978a22cb2c"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"0fa392d61404651d06d3f997145cf0ef978d0948","unresolved":true,"context_lines":[{"line_number":18,"context_line":"~0.4sec"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"We have to keep in mind that this is a periodic task that gets called"},{"line_number":21,"context_line":"every minute."},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"Change-Id: Idfde621a4c4c4421fd7bff43624ba8aaebf8d1b6"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"2baf6e3a_b5b7c6c2","line":21,"in_reply_to":"c257d3cf_7926e5e8","updated":"2024-07-01 10:31:35.000000000","message":"ya after the initial request it should be a fixed time lookup in libvirt file system cache of the nodevs so that is odd behavior indeed that is worth investigating seperatly.","commit_id":"c4a0ec79f4dd595cb29a618ca4b006978a22cb2c"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"2a8df3835957129637a3e32119c6910ba98be156","unresolved":true,"context_lines":[{"line_number":15,"context_line":"before commit:"},{"line_number":16,"context_line":"~1.5sec"},{"line_number":17,"context_line":"after commit:"},{"line_number":18,"context_line":"~0.4sec"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"We have to keep in mind that this is a periodic task that gets called"},{"line_number":21,"context_line":"every minute."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"4ba0424f_4eea15fd","line":18,"updated":"2025-11-05 11:32:51.000000000","message":"the speed up is valid.\ni feel like i have seen this change proposed befoer. i may have even wrote a version of htis myself at one point.","commit_id":"baf50489392a488731f1c69e6351b3c0cc024dab"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"17f3ed0a9f4a1390b0f58516dfa7f76b3d44a3d9","unresolved":false,"context_lines":[{"line_number":15,"context_line":"before commit:"},{"line_number":16,"context_line":"~1.5sec"},{"line_number":17,"context_line":"after commit:"},{"line_number":18,"context_line":"~0.4sec"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"We have to keep in mind that this is a periodic task that gets called"},{"line_number":21,"context_line":"every minute."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"9c99b65c_b58b5a4c","line":18,"in_reply_to":"4ba0424f_4eea15fd","updated":"2026-04-09 14:42:35.000000000","message":"Acknowledged","commit_id":"baf50489392a488731f1c69e6351b3c0cc024dab"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"2a8df3835957129637a3e32119c6910ba98be156","unresolved":true,"context_lines":[{"line_number":18,"context_line":"~0.4sec"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"We have to keep in mind that this is a periodic task that gets called"},{"line_number":21,"context_line":"every minute."},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"Additionally we introduce caching for _get_pci_passthrough_devices()."},{"line_number":24,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"46dc492a_a7972032","line":21,"updated":"2025-11-05 11:32:51.000000000","message":"no it gets called every 5 minute by defautl and in general this shoudl not need to be run on a short cadence. in fact you technially shoudl be able to turn this specific perodic off without breakign nova. in practice i would not advice runing this every minute or takeing the oter extream of disbaling it but anything form every 5 mins to an hour is resonable\n\nwe shoudl not suggest that runing this perodic on a 60 secodn interval is a resonable thing to do.","commit_id":"baf50489392a488731f1c69e6351b3c0cc024dab"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"cdb7ff8bd7e74597a55f86b383da742a9401e4e5","unresolved":false,"context_lines":[{"line_number":18,"context_line":"~0.4sec"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"We have to keep in mind that this is a periodic task that gets called"},{"line_number":21,"context_line":"every minute."},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"Additionally we introduce caching for _get_pci_passthrough_devices()."},{"line_number":24,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"78764ad6_8c07999c","line":21,"in_reply_to":"46dc492a_a7972032","updated":"2026-04-09 10:25:56.000000000","message":"Done","commit_id":"baf50489392a488731f1c69e6351b3c0cc024dab"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"2a8df3835957129637a3e32119c6910ba98be156","unresolved":true,"context_lines":[{"line_number":20,"context_line":"We have to keep in mind that this is a periodic task that gets called"},{"line_number":21,"context_line":"every minute."},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"Additionally we introduce caching for _get_pci_passthrough_devices()."},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"Signed-off-by: Max Lamprecht \u003cmax.lamprecht@stackit.cloud\u003e"},{"line_number":26,"context_line":"Change-Id: Idfde621a4c4c4421fd7bff43624ba8aaebf8d1b6"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"48a40187_fe11f803","line":23,"updated":"2025-11-05 11:32:51.000000000","message":"this can technially change over time but we have cacheign else where that will require an agent restart to clear anyway so it shoudl be ok to cache.","commit_id":"baf50489392a488731f1c69e6351b3c0cc024dab"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"cdb7ff8bd7e74597a55f86b383da742a9401e4e5","unresolved":false,"context_lines":[{"line_number":20,"context_line":"We have to keep in mind that this is a periodic task that gets called"},{"line_number":21,"context_line":"every minute."},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"Additionally we introduce caching for _get_pci_passthrough_devices()."},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"Signed-off-by: Max Lamprecht \u003cmax.lamprecht@stackit.cloud\u003e"},{"line_number":26,"context_line":"Change-Id: Idfde621a4c4c4421fd7bff43624ba8aaebf8d1b6"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"4e249ef5_a8ebc7bd","line":23,"in_reply_to":"48a40187_fe11f803","updated":"2026-04-09 10:25:56.000000000","message":"Acknowledged","commit_id":"baf50489392a488731f1c69e6351b3c0cc024dab"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"2a8df3835957129637a3e32119c6910ba98be156","unresolved":true,"context_lines":[{"line_number":21,"context_line":"every minute."},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"Additionally we introduce caching for _get_pci_passthrough_devices()."},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"Signed-off-by: Max Lamprecht \u003cmax.lamprecht@stackit.cloud\u003e"},{"line_number":26,"context_line":"Change-Id: Idfde621a4c4c4421fd7bff43624ba8aaebf8d1b6"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"70c6cea7_3c39a4a8","line":24,"updated":"2025-11-05 11:32:51.000000000","message":"please file a bug for this","commit_id":"baf50489392a488731f1c69e6351b3c0cc024dab"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"cdb7ff8bd7e74597a55f86b383da742a9401e4e5","unresolved":false,"context_lines":[{"line_number":21,"context_line":"every minute."},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"Additionally we introduce caching for _get_pci_passthrough_devices()."},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"Signed-off-by: Max Lamprecht \u003cmax.lamprecht@stackit.cloud\u003e"},{"line_number":26,"context_line":"Change-Id: Idfde621a4c4c4421fd7bff43624ba8aaebf8d1b6"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"e1f4c550_1bdf967e","line":24,"in_reply_to":"70c6cea7_3c39a4a8","updated":"2026-04-09 10:25:56.000000000","message":"Done","commit_id":"baf50489392a488731f1c69e6351b3c0cc024dab"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"cdb7ff8bd7e74597a55f86b383da742a9401e4e5","unresolved":true,"context_lines":[{"line_number":23,"context_line":"Additionally we introduce caching for _get_pci_passthrough_devices() as"},{"line_number":24,"context_line":"changing pci devices at runtime is currently not supported."},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"Closes-Bug: #2091033"},{"line_number":27,"context_line":"Signed-off-by: Max Lamprecht \u003cmax.lamprecht@stackit.cloud\u003e"},{"line_number":28,"context_line":"Change-Id: Idfde621a4c4c4421fd7bff43624ba8aaebf8d1b6"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"9ea9c85b_4a5aeafc","line":26,"updated":"2026-04-09 10:25:56.000000000","message":"let update this to\n\n\n\n```suggestion\nRelated-Bug: #2091033\nCloses-Bug: #2147424\n```","commit_id":"3b6706bc503dfa129a777a0e80d8e2ae981ed4d8"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"17f3ed0a9f4a1390b0f58516dfa7f76b3d44a3d9","unresolved":false,"context_lines":[{"line_number":23,"context_line":"Additionally we introduce caching for _get_pci_passthrough_devices() as"},{"line_number":24,"context_line":"changing pci devices at runtime is currently not supported."},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"Closes-Bug: #2091033"},{"line_number":27,"context_line":"Signed-off-by: Max Lamprecht \u003cmax.lamprecht@stackit.cloud\u003e"},{"line_number":28,"context_line":"Change-Id: Idfde621a4c4c4421fd7bff43624ba8aaebf8d1b6"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"15bb73d7_72701e9b","line":26,"in_reply_to":"9ea9c85b_4a5aeafc","updated":"2026-04-09 14:42:35.000000000","message":"Done","commit_id":"3b6706bc503dfa129a777a0e80d8e2ae981ed4d8"}],"/PATCHSET_LEVEL":[{"author":{"_account_id":35676,"name":"Max","email":"max.lamprecht@digits.schwarz","username":"lamprechtm"},"change_message_id":"e6c3762b7ee49f69594d2ffbd84ee5e4d2f947f0","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"fca70b61_cba2804e","updated":"2024-06-26 19:24:52.000000000","message":"recheck","commit_id":"18dfa21cb5489ffebd75d5b8d22ed8d98c8f5f2a"},{"author":{"_account_id":20733,"name":"Rajesh Tailor","email":"ratailor@redhat.com","username":"rajesht"},"change_message_id":"3ec1a7293e6d78d421a97e529d5258e47bc5bc61","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"1e338502_92065e26","updated":"2025-08-21 06:38:13.000000000","message":"Could you please add test to assert that this gets called only once, otherwise LGTM.","commit_id":"775fb8e4c9c3a7c595b62b66e8cf9a5aa34da6c6"},{"author":{"_account_id":35676,"name":"Max","email":"max.lamprecht@digits.schwarz","username":"lamprechtm"},"change_message_id":"d6970387451b56b0bd78075b5734d1aa11697704","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":4,"id":"8001b2af_0dd4deec","updated":"2025-08-26 17:06:03.000000000","message":"recheck - CI failure (TimeoutException + NoValidHost)","commit_id":"627a24b75adde03400d1e012ea8111d4b83808cb"},{"author":{"_account_id":35676,"name":"Max","email":"max.lamprecht@digits.schwarz","username":"lamprechtm"},"change_message_id":"ca120d24b23e29f2fba3644c71cc51ce5ca244f1","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":4,"id":"d04e3e05_56ab98ef","updated":"2025-08-22 07:04:10.000000000","message":"recheck - CI failure (TimeoutException)","commit_id":"627a24b75adde03400d1e012ea8111d4b83808cb"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"2a8df3835957129637a3e32119c6910ba98be156","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":5,"id":"089a85fb_1e2c0134","updated":"2025-11-05 11:32:51.000000000","message":"-1 is mainly for the commit message","commit_id":"baf50489392a488731f1c69e6351b3c0cc024dab"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"cdb7ff8bd7e74597a55f86b383da742a9401e4e5","unresolved":true,"context_lines":[],"source_content_type":"","patch_set":6,"id":"2d63d884_3c32823a","updated":"2026-04-09 10:25:56.000000000","message":"let update this with the new bug and add the cache clearing in the base testcase otherwise i think this is good form my perspective","commit_id":"3b6706bc503dfa129a777a0e80d8e2ae981ed4d8"},{"author":{"_account_id":35676,"name":"Max","email":"max.lamprecht@digits.schwarz","username":"lamprechtm"},"change_message_id":"3780d6f2adca8c53495f3707833e4eba2cd189cd","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":6,"id":"dbfdfeef_c55f0f3a","updated":"2025-12-22 11:21:29.000000000","message":"recheck","commit_id":"3b6706bc503dfa129a777a0e80d8e2ae981ed4d8"},{"author":{"_account_id":35676,"name":"Max","email":"max.lamprecht@digits.schwarz","username":"lamprechtm"},"change_message_id":"065228b715ecbf3cbd442e7cb1a7f45268db51fb","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":6,"id":"6e4bc9c6_f0759b1e","updated":"2026-03-31 17:56:56.000000000","message":"recheck - nova-tox-functional-py312 timeout","commit_id":"3b6706bc503dfa129a777a0e80d8e2ae981ed4d8"},{"author":{"_account_id":35676,"name":"Max","email":"max.lamprecht@digits.schwarz","username":"lamprechtm"},"change_message_id":"8c5ae02702b3bc16243bd643b2b4b3527ce4788a","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":6,"id":"841737a2_54530032","updated":"2026-04-08 09:35:11.000000000","message":"recheck - unrelated CI failure - nova-multi-cell tempest.lib.exceptions.TimeoutException: Request timed out","commit_id":"3b6706bc503dfa129a777a0e80d8e2ae981ed4d8"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"b68227f864385a532205dbdbf5c6d3f622729fa2","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":7,"id":"143af260_d550d40a","updated":"2026-04-28 22:39:28.000000000","message":"This looks OK to me","commit_id":"92994945aba7815b17b1858523906ec2c02d4a2b"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"17f3ed0a9f4a1390b0f58516dfa7f76b3d44a3d9","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":7,"id":"551a9709_0cbc2fa6","updated":"2026-04-09 14:42:35.000000000","message":"outside of getting the cache info and asserting the call count on the cache i don\u0027t really see what other testing we can do for just adding caching so i think we have enough coverage to proceed with this.","commit_id":"92994945aba7815b17b1858523906ec2c02d4a2b"},{"author":{"_account_id":35676,"name":"Max","email":"max.lamprecht@digits.schwarz","username":"lamprechtm"},"change_message_id":"28566f4ad2c28a00457a75c2ff4006536efba602","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":7,"id":"cb5c7cb3_8636ca84","updated":"2026-04-10 13:57:10.000000000","message":"recheck - build-openstack-releasenotes TIMED_OUT","commit_id":"92994945aba7815b17b1858523906ec2c02d4a2b"},{"author":{"_account_id":35676,"name":"Max","email":"max.lamprecht@digits.schwarz","username":"lamprechtm"},"change_message_id":"f6ffa297a9e80390bf7cb517d0399cd64d05491a","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":7,"id":"74d8552c_eb1206a5","updated":"2026-04-13 08:00:24.000000000","message":"recheck - nova_vtpm_test_vtpm_live_migration_opt_in_via_resize_host_and_revert","commit_id":"92994945aba7815b17b1858523906ec2c02d4a2b"},{"author":{"_account_id":35676,"name":"Max","email":"max.lamprecht@digits.schwarz","username":"lamprechtm"},"change_message_id":"bf3eb2fdfff0c2b15506eee14a9ea02645bcd990","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":7,"id":"7c9f87e7_5693225a","updated":"2026-04-14 15:15:20.000000000","message":"recheck - nova_vtpm_test_vtpm_live_migration_opt_in_via_resize_host_and_revert","commit_id":"92994945aba7815b17b1858523906ec2c02d4a2b"},{"author":{"_account_id":35676,"name":"Max","email":"max.lamprecht@digits.schwarz","username":"lamprechtm"},"change_message_id":"ecc4d302f4ee7f0d7611d761758d242fb584fab7","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":7,"id":"1badb054_9a38d025","updated":"2026-04-10 06:32:28.000000000","message":"recheck - opendev gitea unstable","commit_id":"92994945aba7815b17b1858523906ec2c02d4a2b"}],"nova/tests/unit/virt/libvirt/test_driver.py":[{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"cdb7ff8bd7e74597a55f86b383da742a9401e4e5","unresolved":true,"context_lines":[{"line_number":29863,"context_line":"        # it at all. See bug 2009280."},{"line_number":29864,"context_line":"        self.assertFalse(hv.evmcs)"},{"line_number":29865,"context_line":""},{"line_number":29866,"context_line":"    def test_get_pci_passthrough_devices_lru_cache_called_once(self):"},{"line_number":29867,"context_line":"        drvr \u003d libvirt_driver.LibvirtDriver(fake.FakeVirtAPI(), True)"},{"line_number":29868,"context_line":"        with mock.patch.object(drvr._host, \u0027list_all_devices\u0027,"},{"line_number":29869,"context_line":"                               return_value\u003d[]) as mock_list:"}],"source_content_type":"text/x-python","patch_set":6,"id":"47cd8c70_1fbc856e","line":29866,"updated":"2026-04-09 10:25:56.000000000","message":"we should update the base testcase to call clear on teh cached function so that we do not leak state between tests like this \nhttps://github.com/openstack/nova/blob/master/nova/test.py#L193\n\nwe have a buch fo other reset_gloabls or reset calls there to clear the other caches\n\nwe may want to add a reset_gloabal fucntio to host.py if we were to wrie this up to where we reset the caces for mutable config but we dont supprot reconfiging the pci devspec without a full restat anyways so i dont think that is needed\n\nwe are using\nhttps://docs.python.org/3/library/functools.html#functools.cache\nwhich is a wraper aroudn the lru cache and \nthe ablity to clear the cash is documented in \nhttps://docs.python.org/3/library/functools.html#functools.lru_cache\n\"\"\"\nThe decorator also provides a cache_clear() function for clearing or invalidating the cache.\"\"\"","commit_id":"3b6706bc503dfa129a777a0e80d8e2ae981ed4d8"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"17f3ed0a9f4a1390b0f58516dfa7f76b3d44a3d9","unresolved":false,"context_lines":[{"line_number":29863,"context_line":"        # it at all. See bug 2009280."},{"line_number":29864,"context_line":"        self.assertFalse(hv.evmcs)"},{"line_number":29865,"context_line":""},{"line_number":29866,"context_line":"    def test_get_pci_passthrough_devices_lru_cache_called_once(self):"},{"line_number":29867,"context_line":"        drvr \u003d libvirt_driver.LibvirtDriver(fake.FakeVirtAPI(), True)"},{"line_number":29868,"context_line":"        with mock.patch.object(drvr._host, \u0027list_all_devices\u0027,"},{"line_number":29869,"context_line":"                               return_value\u003d[]) as mock_list:"}],"source_content_type":"text/x-python","patch_set":6,"id":"c2d1d305_fce750e9","line":29866,"in_reply_to":"47cd8c70_1fbc856e","updated":"2026-04-09 14:42:35.000000000","message":"Done","commit_id":"3b6706bc503dfa129a777a0e80d8e2ae981ed4d8"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"b68227f864385a532205dbdbf5c6d3f622729fa2","unresolved":true,"context_lines":[{"line_number":30684,"context_line":"            # check if the result got cached"},{"line_number":30685,"context_line":"            drvr._get_pci_passthrough_devices()"},{"line_number":30686,"context_line":"            drvr._get_pci_passthrough_devices()"},{"line_number":30687,"context_line":"            assert mock_list.call_count \u003d\u003d 1"},{"line_number":30688,"context_line":""},{"line_number":30689,"context_line":""},{"line_number":30690,"context_line":"class LibvirtVolumeUsageTestCase(test.NoDBTestCase):"}],"source_content_type":"text/x-python","patch_set":7,"id":"ebbdfc67_c2314ba8","line":30687,"range":{"start_line":30687,"start_character":12,"end_line":30687,"end_character":44},"updated":"2026-04-28 22:39:28.000000000","message":"We would prefer to use `mock_list.assert_called_once()` rather than this...","commit_id":"92994945aba7815b17b1858523906ec2c02d4a2b"}],"nova/virt/libvirt/driver.py":[{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"cf6d15774986f1e1790d627f03c36e7396fd4d0c","unresolved":true,"context_lines":[{"line_number":8544,"context_line":"        return cpu_info"},{"line_number":8545,"context_line":""},{"line_number":8546,"context_line":"    # TODO(stephenfin): Move this to \u0027host.py\u0027"},{"line_number":8547,"context_line":"    def _get_pci_passthrough_devices(self):"},{"line_number":8548,"context_line":"        \"\"\"Get host PCI devices information."},{"line_number":8549,"context_line":""},{"line_number":8550,"context_line":"        Obtains pci devices information from libvirt, and returns"}],"source_content_type":"text/x-python","patch_set":2,"id":"3b97aadb_f3b6f36d","line":8547,"updated":"2024-06-27 16:03:03.000000000","message":"we should probably just port memorize to nova.utiles\n\nhttps://github.com/openstack/nova/blob/7dc4b1ea627d864a0ee2745cc9de4336fc0ba7b5/nova/api/validation/parameter_types.py#L26-L45\n\nand then decorate this function with memorieze.\n\nte resoult of this fucntion shoudl not change while the comptue agent is running.\n\nhttps://review.opendev.org/c/openstack/nova/+/427145 is also related to this","commit_id":"c4a0ec79f4dd595cb29a618ca4b006978a22cb2c"},{"author":{"_account_id":35676,"name":"Max","email":"max.lamprecht@digits.schwarz","username":"lamprechtm"},"change_message_id":"49c7903b453f8c626fe1e8a296a0903f3f6999aa","unresolved":false,"context_lines":[{"line_number":8544,"context_line":"        return cpu_info"},{"line_number":8545,"context_line":""},{"line_number":8546,"context_line":"    # TODO(stephenfin): Move this to \u0027host.py\u0027"},{"line_number":8547,"context_line":"    def _get_pci_passthrough_devices(self):"},{"line_number":8548,"context_line":"        \"\"\"Get host PCI devices information."},{"line_number":8549,"context_line":""},{"line_number":8550,"context_line":"        Obtains pci devices information from libvirt, and returns"}],"source_content_type":"text/x-python","patch_set":2,"id":"42e50dd5_a6146e36","line":8547,"in_reply_to":"117da230_4457f53e","updated":"2025-08-19 09:49:43.000000000","message":"Done","commit_id":"c4a0ec79f4dd595cb29a618ca4b006978a22cb2c"},{"author":{"_account_id":35676,"name":"Max","email":"max.lamprecht@digits.schwarz","username":"lamprechtm"},"change_message_id":"bf89124812656e55aff13cb098ad16b7770fa253","unresolved":true,"context_lines":[{"line_number":8544,"context_line":"        return cpu_info"},{"line_number":8545,"context_line":""},{"line_number":8546,"context_line":"    # TODO(stephenfin): Move this to \u0027host.py\u0027"},{"line_number":8547,"context_line":"    def _get_pci_passthrough_devices(self):"},{"line_number":8548,"context_line":"        \"\"\"Get host PCI devices information."},{"line_number":8549,"context_line":""},{"line_number":8550,"context_line":"        Obtains pci devices information from libvirt, and returns"}],"source_content_type":"text/x-python","patch_set":2,"id":"eedf178a_71bc09bc","line":8547,"in_reply_to":"3b97aadb_f3b6f36d","updated":"2024-07-01 09:19:42.000000000","message":"This function returns all pci devices e.g. tap devices. So the result will be different but I guess this does not affect the behaviour of parent fucntions.\n\nWould it be fine to just decorate it with functools.cache instead of porting a memorize function?\nhttps://docs.python.org/3/library/functools.html#functools.cache","commit_id":"c4a0ec79f4dd595cb29a618ca4b006978a22cb2c"},{"author":{"_account_id":35676,"name":"Max","email":"max.lamprecht@digits.schwarz","username":"lamprechtm"},"change_message_id":"c3cb7f46bc5cf57368c496b8afd8c32f4d4017cf","unresolved":true,"context_lines":[{"line_number":8544,"context_line":"        return cpu_info"},{"line_number":8545,"context_line":""},{"line_number":8546,"context_line":"    # TODO(stephenfin): Move this to \u0027host.py\u0027"},{"line_number":8547,"context_line":"    def _get_pci_passthrough_devices(self):"},{"line_number":8548,"context_line":"        \"\"\"Get host PCI devices information."},{"line_number":8549,"context_line":""},{"line_number":8550,"context_line":"        Obtains pci devices information from libvirt, and returns"}],"source_content_type":"text/x-python","patch_set":2,"id":"117da230_4457f53e","line":8547,"in_reply_to":"570ecdf7_23910d6a","updated":"2024-07-02 12:01:07.000000000","message":"Ok makes sense :) I added lru_cache(maxsize\u003dNone) as decorator","commit_id":"c4a0ec79f4dd595cb29a618ca4b006978a22cb2c"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"0fa392d61404651d06d3f997145cf0ef978d0948","unresolved":true,"context_lines":[{"line_number":8544,"context_line":"        return cpu_info"},{"line_number":8545,"context_line":""},{"line_number":8546,"context_line":"    # TODO(stephenfin): Move this to \u0027host.py\u0027"},{"line_number":8547,"context_line":"    def _get_pci_passthrough_devices(self):"},{"line_number":8548,"context_line":"        \"\"\"Get host PCI devices information."},{"line_number":8549,"context_line":""},{"line_number":8550,"context_line":"        Obtains pci devices information from libvirt, and returns"}],"source_content_type":"text/x-python","patch_set":2,"id":"570ecdf7_23910d6a","line":8547,"in_reply_to":"eedf178a_71bc09bc","updated":"2024-07-01 10:31:35.000000000","message":"the reason we had our own in the past was we had to support oler python verions then that function enables.\n\n\nthat was added in in version 3.9.\n\nas of this release our min supported version i now 3.9\nhttps://github.com/openstack/governance/blob/master/reference/runtimes/2024.2.rst\n\nlast cycle i would have said no as we still supproted 3.8 but yes you could use cache\n\nlru_cache is older and does mostly the same thing\n\nhttps://docs.python.org/3/library/functools.html#functools.lru_cache\n\nin this specific case since the function arguments are fixed it will be identical \nto lru_cache(maxsize\u003dNone) so it would be better to use lru_cache to make this simpler to backport assuming you would like to do that?\n\n\nregardign the possiblity for this data to change at runtime.\nlibvirt interally has a cache of the nodedev device on disk that is regenerated on each host reboot and potitally on the restart of the libvirt deamosn depending on how you have deployted it.\n\nlibvirt also subscribes to udev events to update its cached data \ntechincally it is possibel for a pcie device to be pysically hotplugged into a running server and for that device to trigger a udev event that woudl cause the pci devicees to cahgne however in practice we woudl prefer if instead of assumeing that would be handled properly by libvirt/nova you just restarted both if that happens.\n\nso i think caching this either with the lru_cache decorator or porting the memorize function to a shared module like utils is a vaiald performance enhancement in this case. i dont really have a strong preference between the two approches but have a mild prefernce for using functools.lru_cache instead of functools.cache to avoid needing to update that when backporting.","commit_id":"c4a0ec79f4dd595cb29a618ca4b006978a22cb2c"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"2a8df3835957129637a3e32119c6910ba98be156","unresolved":true,"context_lines":[{"line_number":8699,"context_line":"        return cpu_info"},{"line_number":8700,"context_line":""},{"line_number":8701,"context_line":"    # TODO(stephenfin): Move this to \u0027host.py\u0027"},{"line_number":8702,"context_line":"    @functools.lru_cache(maxsize\u003dNone)"},{"line_number":8703,"context_line":"    def _get_pci_passthrough_devices(self):"},{"line_number":8704,"context_line":"        \"\"\"Get host PCI devices information."},{"line_number":8705,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"a664397f_ce77a415","line":8702,"updated":"2025-11-05 11:32:51.000000000","message":"we coudl jsut use @functools.cache\n\nhttps://docs.python.org/3/library/functools.html#functools.cache\n\nalso when we add caching like this we sometiem need to expcitly modify the test suite to clear it","commit_id":"baf50489392a488731f1c69e6351b3c0cc024dab"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"cdb7ff8bd7e74597a55f86b383da742a9401e4e5","unresolved":false,"context_lines":[{"line_number":8699,"context_line":"        return cpu_info"},{"line_number":8700,"context_line":""},{"line_number":8701,"context_line":"    # TODO(stephenfin): Move this to \u0027host.py\u0027"},{"line_number":8702,"context_line":"    @functools.lru_cache(maxsize\u003dNone)"},{"line_number":8703,"context_line":"    def _get_pci_passthrough_devices(self):"},{"line_number":8704,"context_line":"        \"\"\"Get host PCI devices information."},{"line_number":8705,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"9c51ab6b_91a7e4a9","line":8702,"in_reply_to":"a664397f_ce77a415","updated":"2026-04-09 10:25:56.000000000","message":"Done","commit_id":"baf50489392a488731f1c69e6351b3c0cc024dab"}]}
