函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:_vm_unmap_aliases

函数原型:static void _vm_unmap_aliases(unsigned long start, unsigned long end, int flush)

返回类型:void

参数:

类型参数名称
unsigned longstart
unsigned longend
intflush
1707  如果此条件成立可能性小(为编译器优化)(!vmap_initialized)则返回
1710  might_sleep()
1712  遍历可用CPU(cpu)
1713  vbq等于per_cpu(Queue of free and dirty vmap blocks, for allocation and flushing purposes , cpu)
1716  _read_lock() - mark the beginning of an RCU read-side critical section* When synchronize_rcu() is invoked on one CPU while other CPUs* are within RCU read-side critical sections, then the* synchronize_rcu() is guaranteed to block until after all the other
1718  加自旋锁
1719  如果dirty
1720  va_start等于va_start
1726  start等于两数取小(s, start)
1727  end等于两数取大(e, end)
1729  flush等于1
1731  自旋锁解锁
1733  _read_unlock() - marks the end of an RCU read-side critical section.* In most situations, rcu_read_unlock() is immune from deadlock.* However, in kernels built with CONFIG_RCU_BOOST, rcu_read_unlock()
1736  mutex_lock( & 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.)
1737  r per-CPU blocks
1738  如果非Purges all lazily-freed vmap areas.flushflush_tlb_kernel_range(start, end)
1740  mutex_unlock - release the mutex*@lock: the mutex to be released* Unlock a mutex that has been locked by this task previously.* This function must not be used in interrupt context. Unlocking* of a not locked mutex is not allowed.
调用者
名称描述
vm_unmap_aliasesvm_unmap_aliases - unmap outstanding lazy aliases in the vmap layer* The vmap/vmalloc layer lazily flushes kernel virtual mappings primarily* to amortize TLB flushing overheads
vm_remove_mappingsHandle removing and resetting vm mappings related to the vm_struct.