函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:zs_object_copy

函数原型:static void zs_object_copy(struct size_class *class, unsigned long dst, unsigned long src)

返回类型:void

参数:

类型参数名称
struct size_class *class
unsigned longdst
unsigned longsrc
1593  written等于0
1595  s_size等于d_size等于* Size of objects stored in this class. Must be multiple * of ZS_ALIGN.
1597  bj_to_location - get (, ) from encoded object value*@obj: the encoded object value*@page: page object resides in zspage*@obj_idx: object index
1598  bj_to_location - get (, ) from encoded object value*@obj: the encoded object value*@page: page object resides in zspage*@obj_idx: object index
1600  s_off等于* Size of objects stored in this class. Must be multiple * of ZS_ALIGN.s_objidx按位与PAGE_MASK的反
1601  d_off等于* Size of objects stored in this class. Must be multiple * of ZS_ALIGN.d_objidx按位与PAGE_MASK的反
1603  如果s_off* Size of objects stored in this class. Must be multiple * of ZS_ALIGN.大于PAGE_SIZEs_size等于PAGE_SIZEs_off
1606  如果d_off* Size of objects stored in this class. Must be multiple * of ZS_ALIGN.大于PAGE_SIZEd_size等于PAGE_SIZEd_off
1609  s_addr等于kmap_atomic(s_page)
1610  d_addr等于kmap_atomic(d_page)
1612  当1循环
1613  size等于两数取小(s_size, d_size)
1614  memcpy(d_addr + d_off, s_addr + s_off, size)
1615  written加等于size
1617  如果written恒等于* Size of objects stored in this class. Must be multiple * of ZS_ALIGN.退出
1620  s_off加等于size
1621  s_size减等于size
1622  d_off加等于size
1623  d_size减等于size
1625  如果s_off大于等于PAGE_SIZE
1628  s_page等于get_next_page(s_page)
1629  s_addr等于kmap_atomic(s_page)
1630  d_addr等于kmap_atomic(d_page)
1632  s_off等于0
1635  如果d_off大于等于PAGE_SIZE
1637  d_page等于get_next_page(d_page)
1638  d_addr等于kmap_atomic(d_page)
1640  d_off等于0
1644  Prevent people trying to call kunmap_atomic() as if it were kunmap()* kunmap_atomic() should get the return value of kmap_atomic, not the page.(d_addr)
1645  Prevent people trying to call kunmap_atomic() as if it were kunmap()* kunmap_atomic() should get the return value of kmap_atomic, not the page.(s_addr)
调用者
名称描述
migrate_zspage