Function report | 
Source Code:mm\swapfile.c | 
Create Date:2022-07-28 15:17:10 | 
| Last Modify:2020-03-17 22:19:49 | Copyright©Brick | 
| home page | Tree | 
| Annotation kernel can get tool activity | Download SCCT | Chinese | 
Name:swap_alloc_cluster
Proto:static int swap_alloc_cluster(struct swap_info_struct *si, swp_entry_t *slot)
Type:int
Parameter:
| Type | Parameter | Name | 
|---|---|---|
| struct swap_info_struct * | si | |
| swp_entry_t * | slot | 
| 941 | VM_WARN_ON_ONCE(1) | 
| 942 | Return 0 | 
| 945 | If cluster_list_empty( & clusters list ) Then Return 0 | 
| 948 | idx = cluster_list_first( & clusters list ) | 
| 949 | offset = idx * SWAPFILE_CLUSTER | 
| 950 | ci = lock_cluster(si, offset) | 
| 951 | alloc_cluster(si, idx) | 
| 955 | When i < SWAPFILE_CLUSTER cycle map[i] = Flag page is cached, in first swap_map | 
| 957 | unlock_cluster(ci) | 
| 958 | swap_range_alloc(si, offset, SWAPFILE_CLUSTER) | 
| 961 | Return 1 | 
| Name | Describe | 
|---|---|
| get_swap_pages | 
| 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  |