函数逻辑报告 |
Source Code:mm\huge_memory.c |
Create Date:2022-07-27 17:36:47 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
首页 | 函数Tree |
注解内核,赢得工具 | 下载SCCT | English |
函数名称:__split_huge_pmd_locked
函数原型:static void __split_huge_pmd_locked(struct vm_area_struct *vma, pmd_t *pmd, unsigned long haddr, bool freeze)
返回类型:void
参数:
类型 | 参数 | 名称 |
---|---|---|
struct vm_area_struct * | vma | |
pmd_t * | pmd | |
unsigned long | haddr | |
bool | freeze |
2147 | bool young, write, soft_dirty, pmd_migration = false |
2151 | VM_BUG_ON(haddr & ~HPAGE_PMD_MASK) |
2154 | VM_BUG_ON(!is_pmd_migration_entry( * pmd) && !pmd_trans_huge( * pmd) && !pmd_devmap( * pmd)) |
2157 | Disable counters |
2159 | 如果非vma_is_anonymous(vma)则 |
2160 | _pmd等于pmdp_huge_clear_flush_notify(vma, haddr, pmd) |
2165 | 如果arch_needs_pgtable_deposit()则zap_deposited_table(mm, pmd) |
2167 | 如果vma_is_dax(vma)则返回 |
2169 | page等于Currently stuck as a macro due to indirect forward reference to* linux/mmzone.h's __section_mem_map_addr() definition:(_pmd) |
2170 | 如果非PageDirty(page)且pmd_dirty(_pmd)则Dirty a page |
2172 | 如果非PageReferenced(page)且pmd_young(_pmd)则SetPageReferenced(page) |
2176 | add_mm_counter(mm, Optimized variant when page is already known not to be PageAnon , - HPAGE_PMD_NR) |
2177 | 返回 |
2178 | 否则如果is_huge_zero_pmd( * pmd)则 |
2188 | 返回:__split_huge_zero_page_pmd(vma, haddr, pmd) |
2211 | old_pmd等于pmdp_invalidate(vma, haddr, pmd) |
2214 | 如果此条件成立可能性小(为编译器优化)(pmd_migration)则 |
2217 | entry等于pmd_to_swp_entry(old_pmd) |
2218 | page等于pfn_to_page(Extract the `offset' field from a swp_entry_t. The swp_entry_t is in* arch-independent format) |
2219 | write等于is_write_migration_entry(entry) |
2220 | young = false |
2221 | soft_dirty等于pmd_swp_soft_dirty(old_pmd) |
2222 | 否则 |
2223 | page等于Currently stuck as a macro due to indirect forward reference to* linux/mmzone.h's __section_mem_map_addr() definition:(old_pmd) |
2224 | 如果pmd_dirty(old_pmd)则SetPageDirty(page) |
2228 | soft_dirty等于pmd_soft_dirty(old_pmd) |
2230 | VM_BUG_ON_PAGE(!page_count(page), page) |
2231 | page_ref_add(page, HPAGE_PMD_NR - 1) |
2238 | pmd_populate(mm, & _pmd, pgtable) |
2240 | 以i小于HPAGE_PMD_NR循环 |
2247 | 如果freeze或pmd_migration则 |
2249 | swp_entry等于make_migration_entry(page + i, write) |
2250 | entry等于Convert the arch-independent representation of a swp_entry_t into the* arch-dependent pte representation. |
2251 | 如果soft_dirty则entry等于pte_swp_mksoft_dirty(entry) |
2253 | 否则 |
2256 | 如果非write则entry等于pte_wrprotect(entry) |
2260 | 如果soft_dirty则entry等于pte_mksoft_dirty(entry) |
2263 | pte等于pte_offset_map( & _pmd, addr) |
2265 | set_pte_at(mm, addr, pte, entry) |
2274 | 如果compound_mapcount(page)大于1且非TestSetPageDoubleMap(page)则 |
2279 | 如果atomic_add_negative( - 1, compound_mapcount_ptr(page))则 |
2282 | 如果TestClearPageDoubleMap(page)则 |
2289 | smp_wmb() |
2290 | pmd_populate(mm, pmd, pgtable) |
2292 | 如果freeze则 |
2293 | 以i小于HPAGE_PMD_NR循环 |
名称 | 描述 |
---|---|
__split_huge_pmd |
源代码转换工具 开放的插件接口 | X |
---|---|
支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |