THP

Linux大页之THP拆分

蹲街弑〆低调 提交于 2021-02-09 07:42:29
本文只分析THP的拆分过程,先不说为什么在哪儿需要拆分。 拆分函数一览 split_huge_page_to_list split_huge_page __split_huge_page_pmd split_huge_page_pmd split_huge_page_pmd_mm split_huge_page_to_list mm/huge_memory.c /* * Split a hugepage into normal pages. This doesn't change the position of head * page. If @list is null, tail pages will be added to LRU list, otherwise, to * @list. Both head page and tail pages will inherit mapping, flags, and so on * from the hugepage. * Return 0 if the hugepage is split successfully otherwise return 1. */ int split_huge_page_to_list(struct page *page, struct list_head *list) { struct anon