函数逻辑报告 |
Source Code:mm\huge_memory.c |
Create Date:2022-07-27 17:37:26 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
首页 | 函数Tree |
注解内核,赢得工具 | 下载SCCT | English |
函数名称:This function splits huge page into normal pages. @page can point to any* subpage of huge page to split. Split doesn't change the position of @page.* Only caller must hold pin on the @page, otherwise split fails with -EBUSY.* The huge page must be locked.
函数原型:int split_huge_page_to_list(struct page *page, struct list_head *list)
返回类型:int
参数:
类型 | 参数 | 名称 |
---|---|---|
struct page * | page | |
struct list_head * | list |
2697 | head等于compound_head(page) |
2698 | pgdata等于NUMA节点数据区(page_to_nid(head)) |
2699 | ds_queue等于get_deferred_split_queue(page) |
2701 | struct address_space * mapping = NULL |
2707 | VM_BUG_ON_PAGE(is_huge_zero_page(head), head) |
2708 | VM_BUG_ON_PAGE(!PageLocked(page), page) |
2709 | VM_BUG_ON_PAGE(!PageCompound(page), page) |
2711 | 如果Only test-and-set exist for PG_writeback. The unconditional operators are* risky: they bypass page accounting.则返回:负EBUSY |
2724 | 如果非anon_vma则 |
2728 | end等于负1 |
2729 | mapping = NULL |
2730 | anon_vma_lock_write(anon_vma) |
2731 | 否则 |
2759 | 转到:out_unlock |
2762 | mlocked等于PageMlocked(page) |
2763 | unmap_page(head) |
2764 | VM_BUG_ON_PAGE(compound_mapcount(head), head) |
2767 | 如果mlocked则lru_add_drain() |
2773 | 如果mapping则 |
2786 | 加自旋锁 |
2787 | count等于page_count(head) |
2788 | mapcount等于total_mapcount(head) |
2789 | 如果非mapcount且page_ref_freeze(head, 1 + extra_pins)则 |
2790 | 如果非链表为空则 |
2791 | split_queue_len自减 |
2792 | 删除链表项 |
2794 | 如果mapping则 |
2795 | 如果PageSwapBacked(page)则__dec_node_page_state(page, NR_SHMEM_THPS) |
2797 | 否则__dec_node_page_state(page, NR_FILE_THPS) |
2801 | 自旋锁解锁 |
2802 | __split_huge_page(page, list, end, flags) |
2803 | 如果PageSwapCache(head)则 |
2804 | swp_entry_t entry = {val = page_private(head)} |
2806 | ret等于split_swap_cluster(entry) |
2807 | 否则ret等于0 |
2809 | 否则 |
2826 | out_unlock : |
2827 | 如果anon_vma则 |
2829 | put_anon_vma(anon_vma) |
2831 | 如果mapping则i_mmap_unlock_read(mapping) |
2833 | out : |
2834 | Disable counters |
2835 | 返回:ret |
名称 | 描述 |
---|---|
shrink_page_list | shrink_page_list() returns the number of reclaimed pages |
migrate_pages | migrate_pages - migrate the pages specified in a list, to the free pages* supplied as the target for the page migration*@from: The list of pages to be migrated.*@get_new_page: The function used to allocate free pages to be used |
split_huge_page |
源代码转换工具 开放的插件接口 | X |
---|---|
支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |