Lines Matching refs:ksm_scan
138 struct ksm_scan { struct
237 static struct ksm_scan ksm_scan = { variable
852 age = (unsigned char)(ksm_scan.seqnr - rmap_item->address); in remove_rmap_item_from_tree()
1025 ksm_scan.mm_slot = mm_slot_entry(slot, struct ksm_mm_slot, slot); in unmerge_and_remove_all_rmap_items()
1028 for (mm_slot = ksm_scan.mm_slot; mm_slot != &ksm_mm_head; in unmerge_and_remove_all_rmap_items()
1029 mm_slot = ksm_scan.mm_slot) { in unmerge_and_remove_all_rmap_items()
1058 ksm_scan.mm_slot = mm_slot_entry(slot, struct ksm_mm_slot, slot); in unmerge_and_remove_all_rmap_items()
1074 ksm_scan.seqnr = 0; in unmerge_and_remove_all_rmap_items()
1080 ksm_scan.mm_slot = &ksm_mm_head; in unmerge_and_remove_all_rmap_items()
2057 rmap_item->address |= (ksm_scan.seqnr & SEQNR_MASK); in unstable_tree_search_insert()
2320 mm_slot = ksm_scan.mm_slot; in scan_get_next_rmap_item()
2322 trace_ksm_start_scan(ksm_scan.seqnr, ksm_rmap_items); in scan_get_next_rmap_item()
2363 ksm_scan.mm_slot = mm_slot; in scan_get_next_rmap_item()
2372 ksm_scan.address = 0; in scan_get_next_rmap_item()
2373 ksm_scan.rmap_list = &mm_slot->rmap_list; in scan_get_next_rmap_item()
2378 vma_iter_init(&vmi, mm, ksm_scan.address); in scan_get_next_rmap_item()
2387 if (ksm_scan.address < vma->vm_start) in scan_get_next_rmap_item()
2388 ksm_scan.address = vma->vm_start; in scan_get_next_rmap_item()
2390 ksm_scan.address = vma->vm_end; in scan_get_next_rmap_item()
2392 while (ksm_scan.address < vma->vm_end) { in scan_get_next_rmap_item()
2395 *page = follow_page(vma, ksm_scan.address, FOLL_GET); in scan_get_next_rmap_item()
2397 ksm_scan.address += PAGE_SIZE; in scan_get_next_rmap_item()
2404 flush_anon_page(vma, *page, ksm_scan.address); in scan_get_next_rmap_item()
2407 ksm_scan.rmap_list, ksm_scan.address); in scan_get_next_rmap_item()
2409 ksm_scan.rmap_list = in scan_get_next_rmap_item()
2411 ksm_scan.address += PAGE_SIZE; in scan_get_next_rmap_item()
2419 ksm_scan.address += PAGE_SIZE; in scan_get_next_rmap_item()
2426 ksm_scan.address = 0; in scan_get_next_rmap_item()
2427 ksm_scan.rmap_list = &mm_slot->rmap_list; in scan_get_next_rmap_item()
2433 remove_trailing_rmap_items(ksm_scan.rmap_list); in scan_get_next_rmap_item()
2438 ksm_scan.mm_slot = mm_slot_entry(slot, struct ksm_mm_slot, slot); in scan_get_next_rmap_item()
2439 if (ksm_scan.address == 0) { in scan_get_next_rmap_item()
2471 mm_slot = ksm_scan.mm_slot; in scan_get_next_rmap_item()
2475 trace_ksm_stop_scan(ksm_scan.seqnr, ksm_rmap_items); in scan_get_next_rmap_item()
2476 ksm_scan.seqnr++; in scan_get_next_rmap_item()
2734 list_add_tail(&slot->mm_node, &ksm_scan.mm_slot->slot.mm_node); in __ksm_enter()
2765 if (mm_slot && ksm_scan.mm_slot != mm_slot) { in __ksm_exit()
2772 &ksm_scan.mm_slot->slot.mm_node); in __ksm_exit()
3445 return sysfs_emit(buf, "%lu\n", ksm_scan.seqnr); in full_scans_show()