)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"a976d23c7151f7ef5ed67fdc8705180da4e92e17","unresolved":false,"context_lines":[{"line_number":28,"context_line":""},{"line_number":29,"context_line":"Change-Id: I890b2c81cd49c1c601e9baee6a249709d0f6810e"},{"line_number":30,"context_line":"Signed-off-by: Stephen Finucane \u003csfinucan@redhat.com\u003e"},{"line_number":31,"context_line":"Closes-Bug: #1810977"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"bfdaf3ff_9a768306","line":31,"range":{"start_line":31,"start_character":0,"end_line":31,"end_character":20},"updated":"2019-01-15 14:56:09.000000000","message":"so based on irc discussion\nwe either need to update the bug to say this does nto fix the \nissue for gues with cpu pinning as \n\nhttps://github.com/openstack/nova/blob/89c2d1056b3f37bad243c7468d974ded71336a0f/nova/virt/hardware.py#L982-L990\n\nis not simlarly updated to look at total memory instead of available.\n\nas this code is only ever called from _numa_fit_instance_cell\nafter it has already checked the host cell can fit the guest memory however we can simply remove this check entirely.\n\nlets file a second bug for that and cover it in a follow up patch.","commit_id":"fe9f22745940a389331e640db637a4fd10e36544"}],"nova/objects/numa.py":[{"author":{"_account_id":25625,"name":"Tetsuro Nakamura","email":"tetsuro.nakamura.bc@hco.ntt.co.jp","username":"tetsuro0907"},"change_message_id":"2e987a3f03eb7540dad678edaddcb016cbccf927","unresolved":false,"context_lines":[{"line_number":151,"context_line":"        :raises: MemoryPageSizeNotSupported if page size not supported"},{"line_number":152,"context_line":"        \"\"\""},{"line_number":153,"context_line":"        for pages in self.mempages:"},{"line_number":154,"context_line":"            avail_kb \u003d pages.free_kb if use_free else pages.total_kb"},{"line_number":155,"context_line":"            if pages.size_kb \u003d\u003d pagesize:"},{"line_number":156,"context_line":"                return memory \u003c\u003d avail_kb and (memory % pages.size_kb) \u003d\u003d 0"},{"line_number":157,"context_line":"        raise exception.MemoryPageSizeNotSupported(pagesize\u003dpagesize)"}],"source_content_type":"text/x-python","patch_set":3,"id":"bfdaf3ff_0a8793d9","line":154,"range":{"start_line":154,"start_character":12,"end_line":154,"end_character":68},"updated":"2019-01-16 13:44:36.000000000","message":"nit: I would move this below by one line.","commit_id":"fd19aeafbce0fa11821b2a064bd694b078613c2f"}],"nova/tests/unit/objects/test_numa.py":[{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"b7f910a919e625cf6bf1e33e02d4287ba3f0c386","unresolved":false,"context_lines":[{"line_number":136,"context_line":"        self.assertEqual(1048576, pages_topology.free_kb)"},{"line_number":137,"context_line":""},{"line_number":138,"context_line":"    def test_can_fit_pagesize(self):"},{"line_number":139,"context_line":"        # NOTE(stephenfin): \u0027**\u0027 is Python\u0027s \"power of\" symbol"},{"line_number":140,"context_line":"        cell \u003d objects.NUMACell("},{"line_number":141,"context_line":"            id\u003d0, cpuset\u003dset([1, 2]), memory\u003d1024,"},{"line_number":142,"context_line":"            siblings\u003d[set([1]), set([2])], pinned_cpus\u003dset([]),"}],"source_content_type":"text/x-python","patch_set":1,"id":"dfd5e7cf_69bc4e05","line":139,"updated":"2019-01-09 08:58:25.000000000","message":":)","commit_id":"fe9f22745940a389331e640db637a4fd10e36544"},{"author":{"_account_id":25733,"name":"Jan Gutter","email":"github@jangutter.com","username":"jangutter"},"change_message_id":"c6ba91ea7b8a215b36d03a5db821c2238acf8a42","unresolved":false,"context_lines":[{"line_number":148,"context_line":"                objects.NUMAPagesTopology("},{"line_number":149,"context_line":"                    size_kb\u003d1048576, total\u003d4, used\u003d1, reserved\u003d1)])"},{"line_number":150,"context_line":""},{"line_number":151,"context_line":"        pagesize \u003d 2048"},{"line_number":152,"context_line":"        self.assertTrue(cell.can_fit_pagesize(pagesize, 2 ** 20))"},{"line_number":153,"context_line":"        self.assertFalse(cell.can_fit_pagesize(pagesize, 2 ** 21))"},{"line_number":154,"context_line":"        self.assertFalse(cell.can_fit_pagesize(pagesize, 2 ** 19 + 1))"}],"source_content_type":"text/x-python","patch_set":1,"id":"bfdaf3ff_a32b292e","line":151,"range":{"start_line":151,"start_character":19,"end_line":151,"end_character":23},"updated":"2019-01-15 12:02:20.000000000","message":"note to self: This refers to 2GiB pages.","commit_id":"fe9f22745940a389331e640db637a4fd10e36544"},{"author":{"_account_id":25733,"name":"Jan Gutter","email":"github@jangutter.com","username":"jangutter"},"change_message_id":"c6ba91ea7b8a215b36d03a5db821c2238acf8a42","unresolved":false,"context_lines":[{"line_number":153,"context_line":"        self.assertFalse(cell.can_fit_pagesize(pagesize, 2 ** 21))"},{"line_number":154,"context_line":"        self.assertFalse(cell.can_fit_pagesize(pagesize, 2 ** 19 + 1))"},{"line_number":155,"context_line":""},{"line_number":156,"context_line":"        pagesize \u003d 1048576"},{"line_number":157,"context_line":"        self.assertTrue(cell.can_fit_pagesize(pagesize, 2 ** 20))"},{"line_number":158,"context_line":"        self.assertTrue(cell.can_fit_pagesize(pagesize, 2 ** 20 * 2))"},{"line_number":159,"context_line":"        self.assertFalse(cell.can_fit_pagesize(pagesize, 2 ** 20 * 3))"}],"source_content_type":"text/x-python","patch_set":1,"id":"bfdaf3ff_63cb0172","line":156,"range":{"start_line":156,"start_character":19,"end_line":156,"end_character":26},"updated":"2019-01-15 12:02:20.000000000","message":"note to self: This refers to 1TiB pages.","commit_id":"fe9f22745940a389331e640db637a4fd10e36544"},{"author":{"_account_id":25733,"name":"Jan Gutter","email":"github@jangutter.com","username":"jangutter"},"change_message_id":"c6ba91ea7b8a215b36d03a5db821c2238acf8a42","unresolved":false,"context_lines":[{"line_number":178,"context_line":"                    size_kb\u003d4, total\u003d2 ** 18, used\u003d2 ** 18),"},{"line_number":179,"context_line":"            ])"},{"line_number":180,"context_line":""},{"line_number":181,"context_line":"        pagesize \u003d 4"},{"line_number":182,"context_line":"        # request 2^20 KiB (so 1 GiB)"},{"line_number":183,"context_line":"        self.assertTrue(cell.can_fit_pagesize("},{"line_number":184,"context_line":"            pagesize, 2 ** 20, use_free\u003dFalse))"}],"source_content_type":"text/x-python","patch_set":1,"id":"bfdaf3ff_43f91dc6","line":181,"range":{"start_line":181,"start_character":8,"end_line":181,"end_character":16},"updated":"2019-01-15 12:02:20.000000000","message":"note to self: the unit is actually KiB, so this is 4096 bytes, not a 4 byte picopage.","commit_id":"fe9f22745940a389331e640db637a4fd10e36544"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"1c7eb62f17e0a739c4cfdcb6b38ef6314c3523a7","unresolved":false,"context_lines":[{"line_number":182,"context_line":"        # request 2^20 KiB (so 1 GiB)"},{"line_number":183,"context_line":"        self.assertTrue(cell.can_fit_pagesize("},{"line_number":184,"context_line":"            pagesize, 2 ** 20, use_free\u003dFalse))"},{"line_number":185,"context_line":"        # request 2^20 + 1 KiB (so # \u003e 1 GiB)"},{"line_number":186,"context_line":"        self.assertFalse(cell.can_fit_pagesize("},{"line_number":187,"context_line":"            pagesize, 2 ** 20 + 1, use_free\u003dFalse))"},{"line_number":188,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"dfd5e7cf_928afa18","line":185,"range":{"start_line":185,"start_character":35,"end_line":185,"end_character":37},"updated":"2019-01-09 11:56:49.000000000","message":"nit: shouldn\u0027t be here","commit_id":"fe9f22745940a389331e640db637a4fd10e36544"},{"author":{"_account_id":25733,"name":"Jan Gutter","email":"github@jangutter.com","username":"jangutter"},"change_message_id":"6a8718a96f17f6bf711e5a50f6e65b84c456ee42","unresolved":false,"context_lines":[{"line_number":184,"context_line":"            pagesize, 2 ** 20, use_free\u003dFalse))"},{"line_number":185,"context_line":"        # request 2^20 + 1 KiB (so # \u003e 1 GiB)"},{"line_number":186,"context_line":"        self.assertFalse(cell.can_fit_pagesize("},{"line_number":187,"context_line":"            pagesize, 2 ** 20 + 1, use_free\u003dFalse))"},{"line_number":188,"context_line":""},{"line_number":189,"context_line":"    def test_default_behavior(self):"},{"line_number":190,"context_line":"        inst_cell \u003d objects.NUMACell()"}],"source_content_type":"text/x-python","patch_set":1,"id":"bfdaf3ff_de3ac296","line":187,"range":{"start_line":187,"start_character":22,"end_line":187,"end_character":33},"updated":"2019-01-15 12:25:34.000000000","message":"Weird question, shouldn\u0027t this be 2 ** 20 + pagesize ?\n\ncan_fit_pagesize does two checks, a size check and a modulo check to see if the memory requested is actually a multiple of the pagesize. +1 will hit the modulo branch if the size check is somehow busted.","commit_id":"fe9f22745940a389331e640db637a4fd10e36544"}],"nova/virt/hardware.py":[{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"ff7c4e491d96086a931af8256bc403e35770c182","unresolved":false,"context_lines":[{"line_number":639,"context_line":"            if host_cell.can_fit_pagesize(pagesize, inst_cell_mem):"},{"line_number":640,"context_line":"                return pagesize"},{"line_number":641,"context_line":""},{"line_number":642,"context_line":"    if inst_cell.pagesize \u003d\u003d MEMPAGES_SMALL:"},{"line_number":643,"context_line":"        return verify_pagesizes(host_cell, inst_cell, avail_pagesize[-1:])"},{"line_number":644,"context_line":"    elif inst_cell.pagesize \u003d\u003d MEMPAGES_LARGE:"},{"line_number":645,"context_line":"        return verify_pagesizes(host_cell, inst_cell, avail_pagesize[:-1])"},{"line_number":646,"context_line":"    elif inst_cell.pagesize \u003d\u003d MEMPAGES_ANY:"}],"source_content_type":"text/x-python","patch_set":1,"id":"dfd5e7cf_a11edcb7","line":643,"range":{"start_line":642,"start_character":4,"end_line":643,"end_character":74},"updated":"2019-01-08 18:33:22.000000000","message":"for small pages and or a pagesize value of \"4\" or \"4k\"\n\nyou should also be passing false to host_cell.can_fit_pagesize or over subsription is still broken when you use explcit small pages.","commit_id":"fe9f22745940a389331e640db637a4fd10e36544"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"8bac826f92b4ec676c6d682c18b75b0e3db2680b","unresolved":false,"context_lines":[{"line_number":639,"context_line":"            if host_cell.can_fit_pagesize(pagesize, inst_cell_mem):"},{"line_number":640,"context_line":"                return pagesize"},{"line_number":641,"context_line":""},{"line_number":642,"context_line":"    if inst_cell.pagesize \u003d\u003d MEMPAGES_SMALL:"},{"line_number":643,"context_line":"        return verify_pagesizes(host_cell, inst_cell, avail_pagesize[-1:])"},{"line_number":644,"context_line":"    elif inst_cell.pagesize \u003d\u003d MEMPAGES_LARGE:"},{"line_number":645,"context_line":"        return verify_pagesizes(host_cell, inst_cell, avail_pagesize[:-1])"},{"line_number":646,"context_line":"    elif inst_cell.pagesize \u003d\u003d MEMPAGES_ANY:"}],"source_content_type":"text/x-python","patch_set":1,"id":"dfd5e7cf_0114884d","line":643,"range":{"start_line":642,"start_character":4,"end_line":643,"end_character":74},"in_reply_to":"dfd5e7cf_41be1066","updated":"2019-01-08 19:31:10.000000000","message":"yes and no _numa_cell_supports_pagesize_request existed before sahid\u0027s chagne but\nit was not used in _pack_instance_onto_cores see https://review.openstack.org/#/c/532168/27/nova/virt/hardware.py@1022\n\nit was however invoked form _numa_fit_instance_cell\nhttps://github.com/openstack/nova/blob/stable/queens/nova/virt/hardware.py#L1022-L1029\n\nso before the pagesize awareness was intoduced to \n_pack_instance_onto_cores _numa_cell_supports_pagesize_request may have prevented oversubsription at a different location but  in \n_pack_instance_onto_cores would not have eliminated the node if you oversubscribed explicit small pages.\n\n\nbut yes this can be left for a follow up patch.\nif you specified any page size you still would not have had oversubscription before so i guess we could compermise and say if hw:mem_page_size is set we do not allow memory oversubsricpiotn and if hw:mem_page_size is not present then we should.\n\nthat will allow over subsription for cpu pinned guest and guest where hw:numa_nodes has been set but hw:mem_page_size has not been which is the behavior we are supposed to have today and had previously.\n\nif we do that it will make tracking mempages in placemetn more complicated if we want to preserve the behavior that specifying hw:mem_page_size always disables over subscription but we can deal with that in a spec next cycle when we discuss tracking this in placment.\n\ni think this will also satify sahid, as guest who does not want oversusription can simply set hw:mem_page_size to get that behavior.","commit_id":"fe9f22745940a389331e640db637a4fd10e36544"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"4d1e9bb01f03de873c800f5ecbe9c9cb1f022b6b","unresolved":false,"context_lines":[{"line_number":639,"context_line":"            if host_cell.can_fit_pagesize(pagesize, inst_cell_mem):"},{"line_number":640,"context_line":"                return pagesize"},{"line_number":641,"context_line":""},{"line_number":642,"context_line":"    if inst_cell.pagesize \u003d\u003d MEMPAGES_SMALL:"},{"line_number":643,"context_line":"        return verify_pagesizes(host_cell, inst_cell, avail_pagesize[-1:])"},{"line_number":644,"context_line":"    elif inst_cell.pagesize \u003d\u003d MEMPAGES_LARGE:"},{"line_number":645,"context_line":"        return verify_pagesizes(host_cell, inst_cell, avail_pagesize[:-1])"},{"line_number":646,"context_line":"    elif inst_cell.pagesize \u003d\u003d MEMPAGES_ANY:"}],"source_content_type":"text/x-python","patch_set":1,"id":"dfd5e7cf_41be1066","line":643,"range":{"start_line":642,"start_character":4,"end_line":643,"end_character":74},"in_reply_to":"dfd5e7cf_a11edcb7","updated":"2019-01-08 18:40:28.000000000","message":"That was previously broken though, right? If so, I think I should fix this in a follow up. This patch is purely intended to fix the things broken by the previous patch.","commit_id":"fe9f22745940a389331e640db637a4fd10e36544"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"ff7c4e491d96086a931af8256bc403e35770c182","unresolved":false,"context_lines":[{"line_number":1022,"context_line":"        # The instance has requested a page size.  Verify that the requested"},{"line_number":1023,"context_line":"        # size is valid and that there are available pages of that size on the"},{"line_number":1024,"context_line":"        # host."},{"line_number":1025,"context_line":"        pagesize \u003d _numa_cell_supports_pagesize_request("},{"line_number":1026,"context_line":"            host_cell, instance_cell)"},{"line_number":1027,"context_line":"        if not pagesize:"},{"line_number":1028,"context_line":"            LOG.debug(\u0027Host does not support requested memory pagesize. \u0027"}],"source_content_type":"text/x-python","patch_set":1,"id":"dfd5e7cf_01356846","line":1025,"range":{"start_line":1025,"start_character":19,"end_line":1025,"end_character":55},"updated":"2019-01-08 18:33:22.000000000","message":"technically if they requested explcit small pages or 4k pages we should also be checking total memory on the cell not just free. so you need to also change this above.","commit_id":"fe9f22745940a389331e640db637a4fd10e36544"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"b7f910a919e625cf6bf1e33e02d4287ba3f0c386","unresolved":false,"context_lines":[{"line_number":1040,"context_line":"        if host_cell.mempages:"},{"line_number":1041,"context_line":"            # The host supports explicit page sizes. Use a pagesize-aware"},{"line_number":1042,"context_line":"            # memory check using the smallest available page size."},{"line_number":1043,"context_line":"            pagesize \u003d _get_smallest_pagesize(host_cell)"},{"line_number":1044,"context_line":"            LOG.debug(\u0027No specific pagesize requested for instance, \u0027"},{"line_number":1045,"context_line":"                      \u0027selected pagesize: %d\u0027, pagesize)"},{"line_number":1046,"context_line":"            # we want to allow overcommit in this case as we\u0027re not using"},{"line_number":1047,"context_line":"            # hugepages"},{"line_number":1048,"context_line":"            if not host_cell.can_fit_pagesize(pagesize,"},{"line_number":1049,"context_line":"                                              instance_cell.memory * units.Ki,"},{"line_number":1050,"context_line":"                                              use_free\u003dFalse):"},{"line_number":1051,"context_line":"                LOG.debug(\u0027Not enough available memory to schedule instance \u0027"},{"line_number":1052,"context_line":"                          \u0027with pagesize %(pagesize)d. Required: \u0027"},{"line_number":1053,"context_line":"                          \u0027%(required)s, available: %(available)s, total: \u0027"}],"source_content_type":"text/x-python","patch_set":1,"id":"dfd5e7cf_69ed2eee","line":1050,"range":{"start_line":1043,"start_character":0,"end_line":1050,"end_character":62},"updated":"2019-01-09 08:58:25.000000000","message":"Is it safe assume that the host smallest page size is always 4k?\nIf a host smallest page size is 2MB then this code allow oversubscription of the 2MB pages. Would oversubscribing 2MB pages cause problem?","commit_id":"fe9f22745940a389331e640db637a4fd10e36544"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"42cca7b651c89ace074414cc3686f16f2eae4bec","unresolved":false,"context_lines":[{"line_number":1047,"context_line":"            # hugepages"},{"line_number":1048,"context_line":"            if not host_cell.can_fit_pagesize(pagesize,"},{"line_number":1049,"context_line":"                                              instance_cell.memory * units.Ki,"},{"line_number":1050,"context_line":"                                              use_free\u003dFalse):"},{"line_number":1051,"context_line":"                LOG.debug(\u0027Not enough available memory to schedule instance \u0027"},{"line_number":1052,"context_line":"                          \u0027with pagesize %(pagesize)d. Required: \u0027"},{"line_number":1053,"context_line":"                          \u0027%(required)s, available: %(available)s, total: \u0027"}],"source_content_type":"text/x-python","patch_set":1,"id":"bfdaf3ff_74b2d5e8","line":1050,"range":{"start_line":1050,"start_character":46,"end_line":1050,"end_character":61},"updated":"2019-01-15 13:57:39.000000000","message":"Just read the code, https://github.com/openstack/nova/blob/master/nova/virt/hardware.py#L982. We doesn\u0027t allow the cpu pinned instance to overcommit the memory. But the cpu pinned instance without memory page request is going to this branch also.","commit_id":"fe9f22745940a389331e640db637a4fd10e36544"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"a976d23c7151f7ef5ed67fdc8705180da4e92e17","unresolved":false,"context_lines":[{"line_number":1047,"context_line":"            # hugepages"},{"line_number":1048,"context_line":"            if not host_cell.can_fit_pagesize(pagesize,"},{"line_number":1049,"context_line":"                                              instance_cell.memory * units.Ki,"},{"line_number":1050,"context_line":"                                              use_free\u003dFalse):"},{"line_number":1051,"context_line":"                LOG.debug(\u0027Not enough available memory to schedule instance \u0027"},{"line_number":1052,"context_line":"                          \u0027with pagesize %(pagesize)d. Required: \u0027"},{"line_number":1053,"context_line":"                          \u0027%(required)s, available: %(available)s, total: \u0027"}],"source_content_type":"text/x-python","patch_set":1,"id":"bfdaf3ff_badfc7d4","line":1050,"range":{"start_line":1050,"start_character":46,"end_line":1050,"end_character":61},"in_reply_to":"bfdaf3ff_34568d5e","updated":"2019-01-15 14:56:09.000000000","message":"alex that is a seperate issue.\nwe are ment to allow memory oversubsciption for cpu pinned guests and did in the past.\n\nwe will remove that check with a follow up patch.","commit_id":"fe9f22745940a389331e640db637a4fd10e36544"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"3c978e46e7c637a760b71ec871690ff8cdbc93ef","unresolved":false,"context_lines":[{"line_number":1047,"context_line":"            # hugepages"},{"line_number":1048,"context_line":"            if not host_cell.can_fit_pagesize(pagesize,"},{"line_number":1049,"context_line":"                                              instance_cell.memory * units.Ki,"},{"line_number":1050,"context_line":"                                              use_free\u003dFalse):"},{"line_number":1051,"context_line":"                LOG.debug(\u0027Not enough available memory to schedule instance \u0027"},{"line_number":1052,"context_line":"                          \u0027with pagesize %(pagesize)d. Required: \u0027"},{"line_number":1053,"context_line":"                          \u0027%(required)s, available: %(available)s, total: \u0027"}],"source_content_type":"text/x-python","patch_set":1,"id":"bfdaf3ff_d41701a3","line":1050,"range":{"start_line":1050,"start_character":46,"end_line":1050,"end_character":61},"in_reply_to":"bfdaf3ff_74b2d5e8","updated":"2019-01-15 14:03:06.000000000","message":"\u003e Just read the code, https://github.com/openstack/nova/blob/master/nova/virt/hardware.py#L982.\n \u003e We doesn\u0027t allow the cpu pinned instance to overcommit the memory.\n \u003e But the cpu pinned instance without memory page request is going to\n \u003e this branch also.\n\nOK, but does that matter? All that will change is that we\u0027ll hit this first (and pass) only be tripped up later. The exact same thing would have happened before this change, I imagine.","commit_id":"fe9f22745940a389331e640db637a4fd10e36544"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"0ce3c523dc1ec8488633728296d35dda554fc794","unresolved":false,"context_lines":[{"line_number":1047,"context_line":"            # hugepages"},{"line_number":1048,"context_line":"            if not host_cell.can_fit_pagesize(pagesize,"},{"line_number":1049,"context_line":"                                              instance_cell.memory * units.Ki,"},{"line_number":1050,"context_line":"                                              use_free\u003dFalse):"},{"line_number":1051,"context_line":"                LOG.debug(\u0027Not enough available memory to schedule instance \u0027"},{"line_number":1052,"context_line":"                          \u0027with pagesize %(pagesize)d. Required: \u0027"},{"line_number":1053,"context_line":"                          \u0027%(required)s, available: %(available)s, total: \u0027"}],"source_content_type":"text/x-python","patch_set":1,"id":"bfdaf3ff_79fe3738","line":1050,"range":{"start_line":1050,"start_character":46,"end_line":1050,"end_character":61},"in_reply_to":"bfdaf3ff_8ff39f9e","updated":"2019-01-16 14:09:30.000000000","message":"Stephen, Sean, thanks for the discussion and the following patch.","commit_id":"fe9f22745940a389331e640db637a4fd10e36544"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"9875beae16007f8007769b0debe3cba9c21cbff4","unresolved":false,"context_lines":[{"line_number":1047,"context_line":"            # hugepages"},{"line_number":1048,"context_line":"            if not host_cell.can_fit_pagesize(pagesize,"},{"line_number":1049,"context_line":"                                              instance_cell.memory * units.Ki,"},{"line_number":1050,"context_line":"                                              use_free\u003dFalse):"},{"line_number":1051,"context_line":"                LOG.debug(\u0027Not enough available memory to schedule instance \u0027"},{"line_number":1052,"context_line":"                          \u0027with pagesize %(pagesize)d. Required: \u0027"},{"line_number":1053,"context_line":"                          \u0027%(required)s, available: %(available)s, total: \u0027"}],"source_content_type":"text/x-python","patch_set":1,"id":"bfdaf3ff_8ff39f9e","line":1050,"range":{"start_line":1050,"start_character":46,"end_line":1050,"end_character":61},"in_reply_to":"bfdaf3ff_badfc7d4","updated":"2019-01-15 19:22:09.000000000","message":"I\u0027ve addressed that at [1], which I\u0027ll add tests for tomorrow. However, as Sean points out, that\u0027s an issue that existed before either this patch or Sahid\u0027s patch and should be fixed separately.\n\n[1] https://review.openstack.org/#/c/631053/","commit_id":"fe9f22745940a389331e640db637a4fd10e36544"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"4fb02dc4e9a1a6c6ff06decd9550ca79e1ecf9a9","unresolved":false,"context_lines":[{"line_number":1047,"context_line":"            # hugepages"},{"line_number":1048,"context_line":"            if not host_cell.can_fit_pagesize(pagesize,"},{"line_number":1049,"context_line":"                                              instance_cell.memory * units.Ki,"},{"line_number":1050,"context_line":"                                              use_free\u003dFalse):"},{"line_number":1051,"context_line":"                LOG.debug(\u0027Not enough available memory to schedule instance \u0027"},{"line_number":1052,"context_line":"                          \u0027with pagesize %(pagesize)d. Required: \u0027"},{"line_number":1053,"context_line":"                          \u0027%(required)s, available: %(available)s, total: \u0027"}],"source_content_type":"text/x-python","patch_set":1,"id":"bfdaf3ff_34568d5e","line":1050,"range":{"start_line":1050,"start_character":46,"end_line":1050,"end_character":61},"in_reply_to":"bfdaf3ff_d41701a3","updated":"2019-01-15 14:06:49.000000000","message":"Emm....I found I\u0027m not sure NUMACell.memory include the size of hugepage or not. If it is include the size of hugepage, then we may overcommit the smallest page size at here. But in the later, we only ensure we aren\u0027t overcommit all the memory for each NUMA node.\nIf NUMACell.memory doesn\u0027t include the size of hugepage, then yes, there is no problem.","commit_id":"fe9f22745940a389331e640db637a4fd10e36544"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"37a5d0e01dab89457b683b5d3bb522c71abf60eb","unresolved":false,"context_lines":[{"line_number":1040,"context_line":"        if host_cell.mempages:"},{"line_number":1041,"context_line":"            # The host supports explicit page sizes. Use a pagesize-aware"},{"line_number":1042,"context_line":"            # memory check using the smallest available page size."},{"line_number":1043,"context_line":"            pagesize \u003d _get_smallest_pagesize(host_cell)"},{"line_number":1044,"context_line":"            LOG.debug(\u0027No specific pagesize requested for instance, \u0027"},{"line_number":1045,"context_line":"                      \u0027selected pagesize: %d\u0027, pagesize)"},{"line_number":1046,"context_line":"            # we want to allow overcommit in this case as we\u0027re not using"},{"line_number":1047,"context_line":"            # hugepages"},{"line_number":1048,"context_line":"            if not host_cell.can_fit_pagesize(pagesize,"},{"line_number":1049,"context_line":"                                              instance_cell.memory * units.Ki,"},{"line_number":1050,"context_line":"                                              use_free\u003dFalse):"},{"line_number":1051,"context_line":"                LOG.debug(\u0027Not enough available memory to schedule instance \u0027"},{"line_number":1052,"context_line":"                          \u0027with pagesize %(pagesize)d. Required: \u0027"},{"line_number":1053,"context_line":"                          \u0027%(required)s, available: %(available)s, total: \u0027"}],"source_content_type":"text/x-python","patch_set":1,"id":"dfd5e7cf_69f68dfc","line":1050,"range":{"start_line":1043,"start_character":0,"end_line":1050,"end_character":62},"in_reply_to":"dfd5e7cf_69ed2eee","updated":"2019-01-09 09:19:14.000000000","message":"for the host smalles page size to be 2MB it would have to be the default pagesize the kernel uses. on some plathforms the default/smallest page size is not 4k and is 16 or 64K instead \non those architeture it is still swapable.\n\ntechnically there has been work to make hugepages swappable underway for several years https://lwn.net/Articles/758677/\nthat work has mainly been focused on transparent hugepages and its unclear if that wil also be extended to non transparent hugepages in the future but it has been discussed in the past.\n\nanyway any mempage size that supports swapping will similarly support oversubsciption via paging to swap space.\ni dont know if there is a way to detect that but we could add a workaorund config option to disable small page over subsription. \n\nthat said if the hosts native small page size does not support swapping its an error for the admin to set ram_allocation_ratio greter than 1 in the first places as the host coudl never support subscription or ram in the first place safely.","commit_id":"fe9f22745940a389331e640db637a4fd10e36544"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"cc8be48b202aa685afe9e39c9515891eb911d08f","unresolved":false,"context_lines":[{"line_number":1040,"context_line":"        if host_cell.mempages:"},{"line_number":1041,"context_line":"            # The host supports explicit page sizes. Use a pagesize-aware"},{"line_number":1042,"context_line":"            # memory check using the smallest available page size."},{"line_number":1043,"context_line":"            pagesize \u003d _get_smallest_pagesize(host_cell)"},{"line_number":1044,"context_line":"            LOG.debug(\u0027No specific pagesize requested for instance, \u0027"},{"line_number":1045,"context_line":"                      \u0027selected pagesize: %d\u0027, pagesize)"},{"line_number":1046,"context_line":"            # we want to allow overcommit in this case as we\u0027re not using"},{"line_number":1047,"context_line":"            # hugepages"},{"line_number":1048,"context_line":"            if not host_cell.can_fit_pagesize(pagesize,"},{"line_number":1049,"context_line":"                                              instance_cell.memory * units.Ki,"},{"line_number":1050,"context_line":"                                              use_free\u003dFalse):"},{"line_number":1051,"context_line":"                LOG.debug(\u0027Not enough available memory to schedule instance \u0027"},{"line_number":1052,"context_line":"                          \u0027with pagesize %(pagesize)d. Required: \u0027"},{"line_number":1053,"context_line":"                          \u0027%(required)s, available: %(available)s, total: \u0027"}],"source_content_type":"text/x-python","patch_set":1,"id":"dfd5e7cf_6c253bab","line":1050,"range":{"start_line":1043,"start_character":0,"end_line":1050,"end_character":62},"in_reply_to":"dfd5e7cf_69f68dfc","updated":"2019-01-09 09:44:05.000000000","message":"Thanks for the explanation. Based on this I\u0027m OK to assume that we can always oversubsribe the smallest page size.","commit_id":"fe9f22745940a389331e640db637a4fd10e36544"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"fa596edbbaeeed93260331b43833faf3a8ed3942","unresolved":false,"context_lines":[{"line_number":1060,"context_line":"        else:"},{"line_number":1061,"context_line":"            # The host does not support explicit page sizes. Ignore pagesizes"},{"line_number":1062,"context_line":"            # completely."},{"line_number":1063,"context_line":"            # NOTE(stephenfin): Do not allow an instance to overcommit against"},{"line_number":1064,"context_line":"            # itself on any NUMA cell, i.e. with \u0027ram_allocation_ratio \u003d 2.0\u0027"},{"line_number":1065,"context_line":"            # on a host with 1GB RAM, we should allow two 1GB instances but not"},{"line_number":1066,"context_line":"            # one 2GB instance."},{"line_number":1067,"context_line":"            if instance_cell.memory \u003e host_cell.memory:"},{"line_number":1068,"context_line":"                LOG.debug(\u0027Not enough host cell memory to fit instance cell. \u0027"},{"line_number":1069,"context_line":"                          \u0027Required: %(required)d, actual: %(actual)d\u0027,"}],"source_content_type":"text/x-python","patch_set":1,"id":"bfdaf3ff_0db7dbd7","line":1066,"range":{"start_line":1063,"start_character":12,"end_line":1066,"end_character":31},"updated":"2019-01-14 13:15:36.000000000","message":"just FYI, this is the kind of thing that placement\u0027s min_unit and max_unit address transparently for resources that are handled sanely.","commit_id":"fe9f22745940a389331e640db637a4fd10e36544"}]}
