Function report |
Source Code:mm\swap.c |
Create Date:2022-07-28 14:13:36 |
Last Modify:2022-05-23 13:40:24 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:lease_pages - batched put_page()*@pages: array of pages to release*@nr: number of pages* Decrement the reference count on all the pages in @pages. If it* fell to zero, remove the page from the LRU and free it.
Proto:void release_pages(struct page **pages, int nr)
Type:void
Parameter:
Type | Parameter | Name |
---|---|---|
struct page ** | pages | |
int | nr |
782 | LIST_HEAD(pages_to_free) |
783 | struct pglist_data * locked_pgdat = NULL |
786 | lock_batch = lock_batch |
796 | If locked_pgdat && ++lock_batch == SWAP_CLUSTER_MAX Then |
798 | locked_pgdat = NULL |
801 | If is_huge_zero_page(page) Then Continue |
804 | If is_zone_device_page(page) Then |
820 | page = compound_head(page) |
821 | If Not Drop a ref, return true if the refcount fell to zero (the page has no users) Then Continue |
824 | If PageCompound(page) Then |
834 | pgdat = page_pgdat(page) |
836 | If pgdat != locked_pgdat Then |
837 | If locked_pgdat Then spin_unlock_irqrestore( & Write-intensive fields used by page reclaim , flags) |
840 | lock_batch = 0 |
841 | locked_pgdat = pgdat |
845 | lruvec = mem_cgroup_page_lruvec(page, locked_pgdat) |
846 | VM_BUG_ON_PAGE(!PageLRU(page), page) |
847 | __ClearPageLRU(page) |
852 | __ClearPageActive(page) |
853 | __ClearPageWaiters(page) |
857 | If locked_pgdat Then spin_unlock_irqrestore( & Write-intensive fields used by page reclaim , flags) |
861 | free_unref_page_list( & pages_to_free) |
Name | Describe |
---|---|
pagevec_lru_move_fn | |
__pagevec_release | The pages which we're about to release may be in the deferred lru-addition* queues. That would prevent them from really being freed right now. That's* OK from a correctness point of view but is inefficient - those pages may be |
free_pages_and_swap_cache | Passed an array of pages, drop them all from swapcache and then release* them. They are removed from the LRU and freed if this is their last use. |
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 |