Function report |
Source Code:mm\frontswap.c |
Create Date:2022-07-28 15:21:33 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:__frontswap_unuse_pages
Proto:static int __frontswap_unuse_pages(unsigned long total, unsigned long *unused, int *swapid)
Type:int
Parameter:
Type | Parameter | Name |
---|---|---|
unsigned long | total | |
unsigned long * | unused | |
int * | swapid |
386 | struct swap_info_struct * si = NULL |
388 | total_pages_to_unuse = total |
389 | pages = 0 , pages_to_unuse = 0 |
391 | assert_spin_locked( & swap_lock) |
394 | If total_pages_to_unuse < si_frontswap_pages Then |
395 | pages = pages_to_unuse = total_pages_to_unuse |
396 | Else |
397 | pages = si_frontswap_pages |
398 | pages_to_unuse = 0 |
401 | If security_vm_enough_memory_mm(mm, pages) Then |
405 | vm_unacct_memory(pages) |
406 | unused = pages_to_unuse |
408 | ret = 0 |
409 | Break |
412 | Return ret |
Name | Describe |
---|---|
__frontswap_shrink | Used to check if it's necessory and feasible to unuse pages.* Return 1 when nothing to do, 0 when need to shink pages,* error code when there is an error. |
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 |