函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:Purges all lazily-freed vmap areas.

函数原型:static bool __purge_vmap_area_lazy(unsigned long start, unsigned long end)

返回类型:bool

参数:

类型参数名称
unsigned longstart
unsigned longend
1280  lockdep_assert_held( & Serialize vmap purging. There is no actual criticial section protected* by this look, but we want to avoid concurrent calls for performance* reasons and to make the pcpu_get_vm_areas more deterministic.)
1282  valist等于llist_del_all - delete all entries from lock-less list*@head: the head of lock-less list to delete all entries* If list is empty, return NULL, otherwise, delete all entries and* return the pointer to the first entry. The order of entries
1283  如果此条件成立可能性小(为编译器优化)(valist == NULL)则返回:false
1290  Implement a stub for vmalloc_sync_all() if the architecture chose not to* have one.* The purpose of this function is to make sure the vmalloc area* mappings are identical in all page-tables in the system.
1297  如果va_start小于startstart等于va_start
1299  如果va_end大于endend等于va_end
1303  flush_tlb_kernel_range(start, end)
1304  resched_threshold等于lazy_max_pages()左移1位
1306  加自旋锁
1308  nr等于va_endva_start右移PAGE_SHIFT determines the page size
1309  orig_start等于va_start
1310  orig_end等于va_end
1317  va等于Merge de-allocated chunk of VA memory with previous* and next free blocks. If coalesce is not done a new* free area is inserted. If VA has been merged, it is* freed.
1320  如果is_vmalloc_or_module_addr((void * )orig_start)则kasan_release_vmalloc(orig_start, orig_end, va_start, va_end)
1324  atomic_long_sub(nr, & vmap_lazy_nr)
1326  如果atomic_long_read( & vmap_lazy_nr)小于resched_thresholdcond_resched_lock( & free_vmap_area_lock)
1329  自旋锁解锁
1330  返回:true
调用者
名称描述
try_purge_vmap_area_lazyKick off a purge of the outstanding lazy areas. Don't bother if somebody* is already purging.
purge_vmap_area_lazy
_vm_unmap_aliases