Function report |
Source Code:mm\swapfile.c |
Create Date:2022-07-28 15:16:47 |
Last Modify:2020-03-17 22:19:49 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:Try to get a swap entry from current cpu's swap entry pool (a cluster). This* might involve allocating a new cluster for current CPU too.
Proto:static bool scan_swap_map_try_ssd_cluster(struct swap_info_struct *si, unsigned long *offset, unsigned long *scan_base)
Type:bool
Parameter:
Type | Parameter | Name |
---|---|---|
struct swap_info_struct * | si | |
unsigned long * | offset | |
unsigned long * | scan_base |
607 | new_cluster : |
609 | If cluster_is_null( & Current cluster index ) Then |
610 | If Not cluster_list_empty( & clusters list ) Then |
611 | Current cluster index = head |
614 | Else if Not cluster_list_empty( & discard clusters list ) Then |
621 | Go to new_cluster |
622 | Else Return false |
626 | found_free = false |
636 | cluster_set_null( & Current cluster index ) |
637 | Go to new_cluster |
639 | ci = lock_cluster(si, tmp) |
647 | unlock_cluster(ci) |
648 | If Not found_free Then |
649 | cluster_set_null( & Current cluster index ) |
650 | Go to new_cluster |
652 | Likely next allocation offset = tmp + 1 |
655 | Return found_free |
Name | Describe |
---|---|
scan_swap_map_slots |
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 |