Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:__zs_unmap_object

Proto:static void __zs_unmap_object(struct mapping_area *area, struct page *pages[2], int off, int size)

Type:void

Parameter:

TypeParameterName
struct mapping_area *area
struct page *pages
intoff
intsize
1212  If mapping mode == ad-only (no copy-out at unmap time) Then Go to out
1215  buf = copy buffer for objects that span pages
1216  buf = buf + ZS_HANDLE_SIZE
1217  size -= ZS_HANDLE_SIZE
1218  off += ZS_HANDLE_SIZE
1220  sizes[0] = PAGE_SIZE - off
1221  sizes[1] = size - sizes[0]
1224  addr = kmap_atomic(pages[0])
1225  memcpy(addr + off, buf, sizes[0])
1226  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.(addr)
1227  addr = kmap_atomic(pages[1])
1228  memcpy(addr, buf + sizes[0], sizes[1])
1229  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.(addr)
1231  out :
1233  pagefault_enable()
Caller
NameDescribe
zs_unmap_object