Function report |
Source Code:mm\memcontrol.c |
Create Date:2022-07-28 16:13:36 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:mem_cgroup_move_charge_pte_range
Proto:static int mem_cgroup_move_charge_pte_range(pmd_t *pmd, unsigned long addr, unsigned long end, struct mm_walk *walk)
Type:int
Parameter:
Type | Parameter | Name |
---|---|---|
pmd_t * | pmd | |
unsigned long | addr | |
unsigned long | end | |
struct mm_walk * | walk |
5682 | ret = 0 |
5691 | If ptl Then |
5692 | If precharge < HPAGE_PMD_NR Then |
5693 | spin_unlock(ptl) |
5694 | Return 0 |
5696 | target_type = We don't consider PMD mapped swapping or file mapped pages because THP does* not support them for now.* Caller should make sure that pmd_trans_huge(pmd) is true. |
5697 | If target_type == MC_TARGET_PAGE Then |
5702 | precharge -= HPAGE_PMD_NR |
5703 | moved_charge += HPAGE_PMD_NR |
5708 | Else if target_type == MC_TARGET_DEVICE Then |
5712 | precharge -= HPAGE_PMD_NR |
5713 | moved_charge += HPAGE_PMD_NR |
5717 | spin_unlock(ptl) |
5718 | Return 0 |
5721 | If This is a noop if Transparent Hugepage Support is not built into* the kernel Then Return 0 |
5723 | retry : |
5724 | pte = pte_offset_map_lock(The address space we belong to. , pmd, addr, & ptl) |
5727 | bool device = false |
5730 | If Not precharge Then Break |
5735 | device = true |
5745 | If PageTransCompound returns true for both transparent huge pages* and hugetlbfs pages, so it should only be called when it's known* that hugetlbfs pages aren't involved. Then Go to put |
5751 | precharge-- |
5753 | moved_charge++ |
5757 | put : |
5759 | Break |
5763 | precharge-- |
5765 | moved_swap++ |
5767 | Break |
5768 | Default |
5769 | Break |
5772 | pte_unmap_unlock(pte - 1, ptl) |
5773 | cond_resched() |
5787 | Return ret |
Source code conversion tool public plug-in interface | X |
---|---|
Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion |