Function report |
Source Code:mm\swapfile.c |
Create Date:2022-07-28 15:20:28 |
Last Modify:2020-03-17 22:19:49 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:swap_count_continued - when the original swap_map count is incremented* from SWAP_MAP_MAX, check if there is already a continuation page to carry* into, carry if so, or else fail until a new continuation page is allocated;* when the original swap_map
Proto:static bool swap_count_continued(struct swap_info_struct *si, unsigned long offset, unsigned char count)
Type:bool
Parameter:
Type | Parameter | Name |
---|---|---|
struct swap_info_struct * | si | |
unsigned long | offset | |
unsigned char | count |
3650 | If page_private(head) != SWP_CONTINUED Then |
3652 | Return false |
3658 | map = kmap_atomic(page) + offset |
3660 | If count == Max duplication count, in first swap_map Then Go to init_map |
3663 | If count == (Max duplication count, in first swap_map | See swap_map continuation for full count ) Then |
3668 | Prevent people trying to call kunmap_atomic() as if it were kunmap()* kunmap_atomic() should get the return value of kmap_atomic, not the page.(map) |
3671 | map = kmap_atomic(page) + offset |
3673 | If map == Max count, in each swap_map continuation Then |
3674 | Prevent people trying to call kunmap_atomic() as if it were kunmap()* kunmap_atomic() should get the return value of kmap_atomic, not the page.(map) |
3680 | map = kmap_atomic(page) + offset |
3681 | init_map : |
3681 | map = 0 |
3683 | map += 1 |
3684 | Prevent people trying to call kunmap_atomic() as if it were kunmap()* kunmap_atomic() should get the return value of kmap_atomic, not the page.(map) |
3687 | map = kmap_atomic(page) + offset |
3692 | ret = true |
3694 | Else |
3699 | When map == See swap_map continuation for full count cycle |
3700 | Prevent people trying to call kunmap_atomic() as if it were kunmap()* kunmap_atomic() should get the return value of kmap_atomic, not the page.(map) |
3703 | map = kmap_atomic(page) + offset |
3706 | map -= 1 |
3709 | Prevent people trying to call kunmap_atomic() as if it were kunmap()* kunmap_atomic() should get the return value of kmap_atomic, not the page.(map) |
3712 | map = kmap_atomic(page) + offset |
3718 | ret = count == See swap_map continuation for full count |
3720 | out : |
3722 | Return ret |
Name | Describe |
---|---|
__swap_entry_free_locked | |
__swap_duplicate | Verify that a swap entry is valid and increment its swap map count.* Returns error code in following case.* - success -> 0* - swp_entry is invalid -> EINVAL* - swp_entry is migration entry -> EINVAL |
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 |