Function report |
Source Code:mm\huge_memory.c |
Create Date:2022-07-28 16:03:16 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name: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.
Proto:int split_huge_page_to_list(struct page *page, struct list_head *list)
Type:int
Parameter:
Type | Parameter | Name |
---|---|---|
struct page * | page | |
struct list_head * | list |
2697 | head = compound_head(page) |
2698 | pgdata = NODE_DATA(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 | If Only test-and-set exist for PG_writeback. The unconditional operators are* risky: they bypass page accounting. Then Return -EBUSY |
2724 | If Not anon_vma Then |
2728 | end = -1 |
2729 | mapping = NULL |
2730 | anon_vma_lock_write(anon_vma) |
2731 | Else |
2757 | If Not Racy check whether the huge page can be split Then |
2759 | Go to out_unlock |
2762 | mlocked = PageMlocked(page) |
2763 | unmap_page(head) |
2764 | VM_BUG_ON_PAGE(compound_mapcount(head), head) |
2767 | If mlocked Then lru_add_drain() |
2773 | If mapping Then |
2786 | spin_lock( & split_queue_lock) |
2787 | count = page_count(head) |
2788 | mapcount = total_mapcount(head) |
2789 | If Not mapcount && page_ref_freeze(head, 1 + extra_pins) Then |
2790 | If Not list_empty - tests whether a list is empty*@head: the list to test. Then |
2791 | split_queue_len-- |
2794 | If mapping Then |
2795 | If PageSwapBacked(page) Then __dec_node_page_state(page, NR_SHMEM_THPS) |
2797 | Else __dec_node_page_state(page, NR_FILE_THPS) |
2801 | spin_unlock( & split_queue_lock) |
2802 | __split_huge_page(page, list, end, flags) |
2803 | If PageSwapCache(head) Then |
2804 | swp_entry_t entry = {val = page_private(head)} |
2806 | ret = split_swap_cluster(entry) |
2807 | Else ret = 0 |
2809 | Else |
2826 | out_unlock : |
2827 | If anon_vma Then |
2829 | put_anon_vma(anon_vma) |
2831 | If mapping Then i_mmap_unlock_read(mapping) |
2833 | out : |
2834 | Disable counters |
2835 | Return ret |
Name | Describe |
---|---|
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 |
Source code conversion tool public plug-in interface | X |
---|---|
Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion |