Function report |
Source Code:mm\gup.c |
Create Date:2022-07-28 14:34:31 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:follow_pmd_mask
Proto:static struct page *follow_pmd_mask(struct vm_area_struct *vma, unsigned long address, pud_t *pudp, unsigned int flags, struct follow_page_context *ctx)
Type:struct page
Parameter:
Type | Parameter | Name |
---|---|---|
struct vm_area_struct * | vma | |
unsigned long | address | |
pud_t * | pudp | |
unsigned int | flags | |
struct follow_page_context * | ctx |
318 | pmd = pmd_offset(pudp, address) |
324 | If pmd_none(pmdval) Then Return no_page_table(vma, flags) |
326 | If pmd_huge(pmdval) && Flags, see mm.h. & Huge TLB Page VM Then |
330 | Return no_page_table(vma, flags) |
338 | Return no_page_table(vma, flags) |
340 | retry : |
341 | If Not pmd_present(pmdval) Then |
342 | If Value is more likely to compile time(!(flags & wait for page to replace migration entry )) Then Return no_page_table(vma, flags) |
344 | VM_BUG_ON(thp_migration_supported() && !is_pmd_migration_entry(pmdval)) |
346 | If is_pmd_migration_entry(pmdval) Then pmd_migration_entry_wait(mm, pmd) |
353 | If pmd_none(pmdval) Then Return no_page_table(vma, flags) |
355 | Go to retry |
357 | If pmd_devmap(pmdval) Then |
360 | spin_unlock(ptl) |
364 | If Value is more likely to compile time(!pmd_trans_huge(pmdval)) Then Return follow_page_pte(vma, address, pmd, flags, & pgmap) |
367 | If flags & rce NUMA hinting page fault && pmd_protnone(pmdval) Then Return no_page_table(vma, flags) |
370 | retry_locked : |
372 | If Value for the false possibility is greater at compile time(pmd_none( * pmd)) Then |
373 | spin_unlock(ptl) |
374 | Return no_page_table(vma, flags) |
376 | If Value for the false possibility is greater at compile time(!pmd_present( * pmd)) Then |
377 | spin_unlock(ptl) |
378 | If Value is more likely to compile time(!(flags & wait for page to replace migration entry )) Then Return no_page_table(vma, flags) |
380 | pmd_migration_entry_wait(mm, pmd) |
381 | Go to retry_locked |
383 | If Value for the false possibility is greater at compile time(!pmd_trans_huge( * pmd)) Then |
384 | spin_unlock(ptl) |
387 | If flags & (don't return transhuge pages, split them | split huge pmd before returning ) Then |
389 | page = Currently stuck as a macro due to indirect forward reference to* linux/mmzone.h's __section_mem_map_addr() definition:( * pmd) |
390 | If is_huge_zero_page(page) Then |
396 | Else if flags & don't return transhuge pages, split them Then |
398 | spin_unlock(ptl) |
401 | spin_unlock(ptl) |
403 | ret = split_huge_page(page) |
406 | If pmd_none( * pmd) Then Return no_page_table(vma, flags) |
408 | Else |
409 | spin_unlock(ptl) |
410 | split_huge_pmd(vma, pmd, address) |
418 | spin_unlock(ptl) |
419 | page_mask = HPAGE_PMD_NR - 1 |
420 | Return page |
Name | Describe |
---|---|
follow_pud_mask |
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 |