Lines Matching refs:ksm_scan
118 struct ksm_scan { struct
200 static struct ksm_scan ksm_scan = { variable
646 age = (unsigned char)(ksm_scan.seqnr - rmap_item->address); in remove_rmap_item_from_tree()
776 ksm_scan.mm_slot = list_entry(ksm_mm_head.mm_list.next, in unmerge_and_remove_all_rmap_items()
780 for (mm_slot = ksm_scan.mm_slot; in unmerge_and_remove_all_rmap_items()
781 mm_slot != &ksm_mm_head; mm_slot = ksm_scan.mm_slot) { in unmerge_and_remove_all_rmap_items()
798 ksm_scan.mm_slot = list_entry(mm_slot->mm_list.next, in unmerge_and_remove_all_rmap_items()
817 ksm_scan.seqnr = 0; in unmerge_and_remove_all_rmap_items()
823 ksm_scan.mm_slot = &ksm_mm_head; in unmerge_and_remove_all_rmap_items()
1380 rmap_item->address |= (ksm_scan.seqnr & SEQNR_MASK); in unstable_tree_search_insert()
1547 slot = ksm_scan.mm_slot; in scan_get_next_rmap_item()
1587 ksm_scan.mm_slot = slot; in scan_get_next_rmap_item()
1596 ksm_scan.address = 0; in scan_get_next_rmap_item()
1597 ksm_scan.rmap_list = &slot->rmap_list; in scan_get_next_rmap_item()
1605 vma = find_vma(mm, ksm_scan.address); in scan_get_next_rmap_item()
1610 if (ksm_scan.address < vma->vm_start) in scan_get_next_rmap_item()
1611 ksm_scan.address = vma->vm_start; in scan_get_next_rmap_item()
1613 ksm_scan.address = vma->vm_end; in scan_get_next_rmap_item()
1615 while (ksm_scan.address < vma->vm_end) { in scan_get_next_rmap_item()
1618 *page = follow_page(vma, ksm_scan.address, FOLL_GET); in scan_get_next_rmap_item()
1620 ksm_scan.address += PAGE_SIZE; in scan_get_next_rmap_item()
1626 flush_anon_page(vma, *page, ksm_scan.address); in scan_get_next_rmap_item()
1629 ksm_scan.rmap_list, ksm_scan.address); in scan_get_next_rmap_item()
1631 ksm_scan.rmap_list = in scan_get_next_rmap_item()
1633 ksm_scan.address += PAGE_SIZE; in scan_get_next_rmap_item()
1640 ksm_scan.address += PAGE_SIZE; in scan_get_next_rmap_item()
1646 ksm_scan.address = 0; in scan_get_next_rmap_item()
1647 ksm_scan.rmap_list = &slot->rmap_list; in scan_get_next_rmap_item()
1653 remove_trailing_rmap_items(slot, ksm_scan.rmap_list); in scan_get_next_rmap_item()
1656 ksm_scan.mm_slot = list_entry(slot->mm_list.next, in scan_get_next_rmap_item()
1658 if (ksm_scan.address == 0) { in scan_get_next_rmap_item()
1682 slot = ksm_scan.mm_slot; in scan_get_next_rmap_item()
1686 ksm_scan.seqnr++; in scan_get_next_rmap_item()
1813 list_add_tail(&mm_slot->mm_list, &ksm_scan.mm_slot->mm_list); in __ksm_enter()
1841 if (mm_slot && ksm_scan.mm_slot != mm_slot) { in __ksm_exit()
1848 &ksm_scan.mm_slot->mm_list); in __ksm_exit()
2278 return sprintf(buf, "%lu\n", ksm_scan.seqnr); in full_scans_show()