| Function report | 
| Source Code: mm\frontswap.c | Create Date:2022-07-28 15:21:36 | 
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick | 
| home page | Tree | 
| Annotation kernel can get tool activity | Download SCCT | Chinese | 
Name: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
Proto:void frontswap_shrink(unsigned long target_pages)
Type:void
Parameter:
| Type | Parameter | Name | 
|---|---|---|
| unsigned long | target_pages | 
| 448 | pages_to_unuse = 0 | 
| 457 | ret = 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. | 
| 458 | spin_unlock( & swap_lock) | 
| 459 | If ret == 0 Then If the boolean frontswap is true, only unuse pages_to_unuse pages;* pages_to_unuse==0 means all pages; ignored if frontswap is false | 
| 461 | Return | 
| 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 |