函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:__free_zspage

函数原型:static void __free_zspage(struct zs_pool *pool, struct size_class *class, struct zspage *zspage)

返回类型:void

参数:

类型参数名称
struct zs_pool *pool
struct size_class *class
struct zspage *zspage
942  get_zspage_mapping(zspage, & class_idx, & fg)
944  assert_spin_locked( & lock)
946  VM_BUG_ON(Protected by class->lock )
947  VM_BUG_ON(fg != ZS_EMPTY)
949  next等于page等于get_first_page(zspage)
950  循环
951  VM_BUG_ON_PAGE(!PageLocked(page), page)
952  next等于get_next_page(page)
953  reset_page(page)
954  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.
955  dec_zone_page_state(page, allocated in zsmalloc )
956  Perform a free_page(), also freeing any swap cache associated with* this page if it is the last user of the page.
957  page等于next
958  当(page != NULL)循环
960  cache_free_zspage(pool, zspage)
962  ype can be of enum type zs_stat_type or fullness_group
963  atomic_long_sub( Number of PAGE_SIZE sized pages to combine to form a 'zspage' , & pages_allocated)
调用者
名称描述
free_zspage