函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\huge_memory.c Create Date:2022-07-27 17:37:09
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:__split_huge_page

函数原型:static void __split_huge_page(struct page *page, struct list_head *list, unsigned long end, unsigned long flags)

返回类型:void

参数:

类型参数名称
struct page *page
struct list_head *list
unsigned longend
unsigned longflags
2502  head等于compound_head(page)
2503  pgdat等于page_pgdat(head)
2505  struct address_space * swap_cache = NULL
2506  offset等于0
2509  lruvec等于mem_cgroup_page_lruvec(head, pgdat)
2512  mem_cgroup_split_huge_fixup(head)
2514  如果PageAnon(head)且PageSwapCache(head)则
2515  swp_entry_t entry = {val = page_private(head)}
2517  offset等于Extract the `offset' field from a swp_entry_t. The swp_entry_t is in* arch-independent format
2518  swap_cache等于swap_address_space(entry)
2519  xa_lock( & i_pages)
2522 i大于等于1循环
2523  __split_huge_page_tail(head, i, lruvec, list)
2525  如果 Our offset within mapping. 大于等于end
2526  ClearPageDirty(head + i)
2531  否则如果非PageAnon(page)则
2534  否则如果swap_cache
2540  ClearPageCompound(head)
2542  split_page_owner(head, HPAGE_PMD_ORDER)
2545  如果PageAnon(head)则
2547  如果PageSwapCache(head)则
2548  page_ref_add(head, 2)
2549  xa_unlock( & i_pages)
2550  否则
2551  page_ref_inc(head)
2553  否则
2555  page_ref_add(head, 2)
2556  xa_unlock( & i_pages)
2559  spin_unlock_irqrestore( & Write-intensive fields used by page reclaim , flags)
2561  remap_page(head)
2563 i小于HPAGE_PMD_NR循环
2564  subpage等于headi
2565  如果subpage恒等于page则继续下一循环
2567  lock_page - unlock a locked page*@page: the page* Unlocks the page and wakes up sleepers in ___wait_on_page_locked().* Also wakes sleepers in wait_on_page_writeback() because the wakeup* mechanism between PageLocked pages and PageWriteback pages is shared.
2576  Perform a free_page(), also freeing any swap cache associated with* this page if it is the last user of the page.
调用者
名称描述
split_huge_page_to_listThis 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.