Function report |
Source Code:mm\frontswap.c |
Create Date:2022-07-28 15:21:34 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name: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.
Proto:static int __frontswap_shrink(unsigned long target_pages, unsigned long *pages_to_unuse, int *type)
Type:int
Parameter:
Type | Parameter | Name |
---|---|---|
unsigned long | target_pages | |
unsigned long * | pages_to_unuse | |
int * | type |
424 | total_pages = 0 |
426 | assert_spin_locked( & swap_lock) |
428 | total_pages = __frontswap_curr_pages() |
429 | If total_pages <= target_pages Then |
431 | pages_to_unuse = 0 |
432 | Return 1 |
435 | Return __frontswap_unuse_pages(total_pages_to_unuse, pages_to_unuse, type) |
Name | Describe |
---|---|
frontswap_shrink | Frontswap, like a true swap device, may unnecessarily retain pages* under certain circumstances; "shrink" frontswap is essentially a* "partial swapoff" and works by calling try_to_unuse to attempt to* unuse enough frontswap pages to attempt to -- subject |
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 |