• Home
  • Raw
  • Download

Lines Matching refs:head

2321 static void lru_add_page_tail(struct page *head, struct page *tail,  in lru_add_page_tail()  argument
2324 VM_BUG_ON_PAGE(!PageHead(head), head); in lru_add_page_tail()
2325 VM_BUG_ON_PAGE(PageCompound(tail), head); in lru_add_page_tail()
2326 VM_BUG_ON_PAGE(PageLRU(tail), head); in lru_add_page_tail()
2331 VM_WARN_ON(PageLRU(head)); in lru_add_page_tail()
2336 VM_WARN_ON(!PageLRU(head)); in lru_add_page_tail()
2338 list_add_tail(&tail->lru, &head->lru); in lru_add_page_tail()
2342 static void __split_huge_page_tail(struct page *head, int tail, in __split_huge_page_tail() argument
2345 struct page *page_tail = head + tail; in __split_huge_page_tail()
2356 page_tail->flags |= (head->flags & in __split_huge_page_tail()
2375 page_tail->mapping = head->mapping; in __split_huge_page_tail()
2376 page_tail->index = head->index + tail; in __split_huge_page_tail()
2390 page_ref_unfreeze(page_tail, 1 + (!PageAnon(head) || in __split_huge_page_tail()
2391 PageSwapCache(head))); in __split_huge_page_tail()
2393 if (page_is_young(head)) in __split_huge_page_tail()
2395 if (page_is_idle(head)) in __split_huge_page_tail()
2398 page_cpupid_xchg_last(page_tail, page_cpupid_last(head)); in __split_huge_page_tail()
2405 lru_add_page_tail(head, page_tail, lruvec, list); in __split_huge_page_tail()
2411 struct page *head = compound_head(page); in __split_huge_page() local
2415 unsigned int nr = thp_nr_pages(head); in __split_huge_page()
2419 split_page_memcg(head, nr); in __split_huge_page()
2421 if (PageAnon(head) && PageSwapCache(head)) { in __split_huge_page()
2422 swp_entry_t entry = { .val = page_private(head) }; in __split_huge_page()
2430 lruvec = lock_page_lruvec(head); in __split_huge_page()
2432 ClearPageHasHWPoisoned(head); in __split_huge_page()
2435 __split_huge_page_tail(head, i, lruvec, list); in __split_huge_page()
2437 if (head[i].index >= end) { in __split_huge_page()
2438 ClearPageDirty(head + i); in __split_huge_page()
2439 __delete_from_page_cache(head + i, NULL); in __split_huge_page()
2440 if (shmem_mapping(head->mapping)) in __split_huge_page()
2441 shmem_uncharge(head->mapping->host, 1); in __split_huge_page()
2442 put_page(head + i); in __split_huge_page()
2444 __xa_store(&head->mapping->i_pages, head[i].index, in __split_huge_page()
2445 head + i, 0); in __split_huge_page()
2448 head + i, 0); in __split_huge_page()
2452 ClearPageCompound(head); in __split_huge_page()
2456 split_page_owner(head, nr); in __split_huge_page()
2459 if (PageAnon(head)) { in __split_huge_page()
2461 if (PageSwapCache(head)) { in __split_huge_page()
2462 page_ref_add(head, 2); in __split_huge_page()
2465 page_ref_inc(head); in __split_huge_page()
2469 page_ref_add(head, 2); in __split_huge_page()
2470 xa_unlock(&head->mapping->i_pages); in __split_huge_page()
2474 remap_page(head, nr); in __split_huge_page()
2476 if (PageSwapCache(head)) { in __split_huge_page()
2477 swp_entry_t entry = { .val = page_private(head) }; in __split_huge_page()
2483 struct page *subpage = head + i; in __split_huge_page()
2617 struct page *head = compound_head(page); in split_huge_page_to_list() local
2618 struct deferred_split *ds_queue = get_deferred_split_queue(head); in split_huge_page_to_list()
2625 VM_BUG_ON_PAGE(!PageLocked(head), head); in split_huge_page_to_list()
2626 VM_BUG_ON_PAGE(!PageCompound(head), head); in split_huge_page_to_list()
2628 is_hzp = is_huge_zero_page(head); in split_huge_page_to_list()
2629 VM_WARN_ON_ONCE_PAGE(is_hzp, head); in split_huge_page_to_list()
2633 if (PageWriteback(head)) in split_huge_page_to_list()
2636 if (PageAnon(head)) { in split_huge_page_to_list()
2645 anon_vma = page_get_anon_vma(head); in split_huge_page_to_list()
2654 mapping = head->mapping; in split_huge_page_to_list()
2681 if (!can_split_huge_page(head, &extra_pins)) { in split_huge_page_to_list()
2686 unmap_page(head); in split_huge_page_to_list()
2691 XA_STATE(xas, &mapping->i_pages, page_index(head)); in split_huge_page_to_list()
2698 if (xas_load(&xas) != head) in split_huge_page_to_list()
2704 if (page_ref_freeze(head, 1 + extra_pins)) { in split_huge_page_to_list()
2705 if (!list_empty(page_deferred_list(head))) { in split_huge_page_to_list()
2707 list_del(page_deferred_list(head)); in split_huge_page_to_list()
2711 int nr = thp_nr_pages(head); in split_huge_page_to_list()
2713 if (PageSwapBacked(head)) { in split_huge_page_to_list()
2714 __mod_lruvec_page_state(head, NR_SHMEM_THPS, in split_huge_page_to_list()
2717 __mod_lruvec_page_state(head, NR_FILE_THPS, in split_huge_page_to_list()
2731 remap_page(head, thp_nr_pages(head)); in split_huge_page_to_list()