Function report |
Source Code:mm\vmscan.c |
Create Date:2022-07-28 14:17:37 |
Last Modify:2022-05-23 13:41:30 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:Same as remove_mapping, but if the page is removed from the mapping, it* gets returned with a refcount of 0.
Proto:static int __remove_mapping(struct address_space *mapping, struct page *page, bool reclaimed, struct mem_cgroup *target_memcg)
Type:int
Parameter:
Type | Parameter | Name |
---|---|---|
struct address_space * | mapping | |
struct page * | page | |
bool | reclaimed | |
struct mem_cgroup * | target_memcg |
871 | BUG_ON(!PageLocked(page)) |
872 | BUG_ON(mapping != page_mapping(page)) |
874 | xa_lock_irqsave( & i_pages, flags) |
901 | If Not page_ref_freeze(page, refcount) Then Go to cannot_free |
905 | page_ref_unfreeze(page, refcount) |
906 | Go to cannot_free |
909 | If PageSwapCache(page) Then |
910 | swp_entry_t swap = {val = page_private(page)} |
911 | mem_cgroup_swapout(page, swap) |
912 | __delete_from_swap_cache(page, swap) |
913 | xa_unlock_irqrestore( & i_pages, flags) |
914 | put_swap_page(page, swap) |
915 | Else |
917 | void * shadow = NULL |
940 | xa_unlock_irqrestore( & i_pages, flags) |
946 | Return 1 |
948 | cannot_free : |
949 | xa_unlock_irqrestore( & i_pages, flags) |
950 | Return 0 |
Name | Describe |
---|---|
remove_mapping | Attempt to detach a locked page from its ->mapping. If it is dirty or if* someone else has a ref on the page, abort and return 0. If it was* successfully detached, return 1. Assumes the caller has a single ref on* this page. |
shrink_page_list | shrink_page_list() returns the number of reclaimed 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 |