Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\zsmalloc.c Create Date:2022-07-28 16:27:05
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:__free_zspage

Proto:static void __free_zspage(struct zs_pool *pool, struct size_class *class, struct zspage *zspage)

Type:void

Parameter:

TypeParameterName
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  Do
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  When (page != NULL) cycle
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)
Caller
NameDescribe
free_zspage