/* Drop the CPU's cached committed space back into the central pool. */ static int cpu_swap_callback(struct notifier_block *nfb, unsigned long action, void *hcpu) { long *committed; committed = &per_cpu(committed_space, (long)hcpu); if (action == CPU_DEAD || action == CPU_DEAD_FROZEN) { atomic_long_add(*committed, &vm_committed_space); *committed = 0; drain_cpu_pagevecs((long)hcpu); } return NOTIFY_OK; }
void lru_add_drain(void) { drain_cpu_pagevecs(swap_get_cpu()); swap_put_cpu(); }
void lru_add_drain(void) { drain_cpu_pagevecs(get_cpu()); put_cpu(); }
// dyc: move pages from cpu's pagevecs to zone->active/inactive list,then try to free them void lru_add_drain(void) { drain_cpu_pagevecs(get_cpu()); // preempy_enable() put_cpu(); }