函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:z3fold_page_migrate

函数原型:static int z3fold_page_migrate(struct address_space *mapping, struct page *newpage, struct page *page, enum migrate_mode mode)

返回类型:int

参数:

类型参数名称
struct address_space *mapping
struct page *newpage
struct page *page
enum migrate_modemode
1611  VM_BUG_ON_PAGE(!PageMovable(page), page)
1612  VM_BUG_ON_PAGE(!PageIsolated(page), page)
1613  VM_BUG_ON_PAGE(!PageLocked(newpage), newpage)
1615  zhdr等于page_address(page)
1616  pool等于zhdr_to_pool(zhdr)
1618  如果非Try to lock a z3fold page
1619  返回:负EAGAIN
1621  如果mapped_count不等于0或foreign_handles不等于0则
1622  Unlock a z3fold page
1623  返回:负EBUSY
1625  如果work_pending - Find out whether a work item is currently pending*@work: The work item in question( & work)则
1626  Unlock a z3fold page
1627  返回:负EAGAIN
1629  new_zhdr等于page_address(newpage)
1630  memcpy(new_zhdr, zhdr, PAGE_SIZE)
1631  私有数据指针等于私有数据指针
1632  私有数据指针等于0
1633  Unlock a z3fold page
1634  spin_lock_init( & page_lock)
1635  INIT_WORK( & work, compact_page_work)
1640  初始化链表头
1641  new_mapping等于page_mapping(page)
1642  __ClearPageMovable(page)
1643  Private page markings that may be used by the filesystem that owns the page* for its own purposes.* - PG_private and PG_private_2 cause releasepage() and co to be invoked
1645  get_page(newpage)
1646  Lock a z3fold page
1647  如果first_chunksencode_handle(new_zhdr, FIRST)
1649  如果last_chunksencode_handle(new_zhdr, LAST)
1651  如果middle_chunksencode_handle(new_zhdr, MIDDLE)
1653  设置内存位
1654  cpu等于当前cpu ID()
1655  加自旋锁
1656  添加链表项
1657  自旋锁解锁
1658  __SetPageMovable(newpage, new_mapping)
1659  Unlock a z3fold page
1661  queue_work_on - queue work on specific cpu*@cpu: CPU number to execute work on*@wq: workqueue to use*@work: work to queue* We queue the work to a specific CPU, the caller must ensure it* can't go away.
1663  The atomic page->_mapcount, starts from -1: so that transitions* both from it and to it can be tracked, using atomic_inc_and_test* and atomic_add_negative(-1).
1664  Perform a free_page(), also freeing any swap cache associated with* this page if it is the last user of the page.
1665  返回:0