• Home
  • Raw
  • Download

Lines Matching refs:cpu

42 struct tick_sched *tick_get_tick_sched(int cpu)  in tick_get_tick_sched()  argument
44 return &per_cpu(tick_cpu_sched, cpu); in tick_get_tick_sched()
188 int cpu = smp_processor_id(); in tick_sched_do_timer() local
205 tick_do_timer_cpu = cpu; in tick_sched_do_timer()
210 if (tick_do_timer_cpu == cpu) { in tick_sched_do_timer()
306 static bool can_stop_full_tick(int cpu, struct tick_sched *ts) in can_stop_full_tick() argument
310 if (unlikely(!cpu_online(cpu))) in can_stop_full_tick()
354 void tick_nohz_full_kick_cpu(int cpu) in tick_nohz_full_kick_cpu() argument
356 if (!tick_nohz_full_cpu(cpu)) in tick_nohz_full_kick_cpu()
359 irq_work_queue_on(&per_cpu(nohz_full_kick_work, cpu), cpu); in tick_nohz_full_kick_cpu()
364 int cpu; in tick_nohz_kick_task() local
394 cpu = task_cpu(tsk); in tick_nohz_kick_task()
397 if (cpu_online(cpu)) in tick_nohz_kick_task()
398 tick_nohz_full_kick_cpu(cpu); in tick_nohz_kick_task()
408 int cpu; in tick_nohz_full_kick_all() local
414 for_each_cpu_and(cpu, tick_nohz_full_mask, cpu_online_mask) in tick_nohz_full_kick_all()
415 tick_nohz_full_kick_cpu(cpu); in tick_nohz_full_kick_all()
447 void tick_nohz_dep_set_cpu(int cpu, enum tick_dep_bits bit) in tick_nohz_dep_set_cpu() argument
452 ts = per_cpu_ptr(&tick_cpu_sched, cpu); in tick_nohz_dep_set_cpu()
458 if (cpu == smp_processor_id()) { in tick_nohz_dep_set_cpu()
463 tick_nohz_full_kick_cpu(cpu); in tick_nohz_dep_set_cpu()
470 void tick_nohz_dep_clear_cpu(int cpu, enum tick_dep_bits bit) in tick_nohz_dep_clear_cpu() argument
472 struct tick_sched *ts = per_cpu_ptr(&tick_cpu_sched, cpu); in tick_nohz_dep_clear_cpu()
549 bool tick_nohz_cpu_hotpluggable(unsigned int cpu) in tick_nohz_cpu_hotpluggable() argument
556 if (tick_nohz_full_running && tick_do_timer_cpu == cpu) in tick_nohz_cpu_hotpluggable()
561 static int tick_nohz_cpu_down(unsigned int cpu) in tick_nohz_cpu_down() argument
563 return tick_nohz_cpu_hotpluggable(cpu) ? 0 : -EBUSY; in tick_nohz_cpu_down()
568 int cpu, ret; in tick_nohz_init() local
587 cpu = smp_processor_id(); in tick_nohz_init()
589 if (cpumask_test_cpu(cpu, tick_nohz_full_mask)) { in tick_nohz_init()
591 "for timekeeping\n", cpu); in tick_nohz_init()
592 cpumask_clear_cpu(cpu, tick_nohz_full_mask); in tick_nohz_init()
596 for_each_cpu(cpu, tick_nohz_full_mask) in tick_nohz_init()
597 context_tracking_cpu_set(cpu); in tick_nohz_init()
634 bool tick_nohz_tick_stopped_cpu(int cpu) in tick_nohz_tick_stopped_cpu() argument
636 struct tick_sched *ts = per_cpu_ptr(&tick_cpu_sched, cpu); in tick_nohz_tick_stopped_cpu()
668 update_ts_time_stats(int cpu, struct tick_sched *ts, ktime_t now, u64 *last_update_time) in update_ts_time_stats() argument
674 if (nr_iowait_cpu(cpu) > 0) in update_ts_time_stats()
715 u64 get_cpu_idle_time_us(int cpu, u64 *last_update_time) in get_cpu_idle_time_us() argument
717 struct tick_sched *ts = &per_cpu(tick_cpu_sched, cpu); in get_cpu_idle_time_us()
725 update_ts_time_stats(cpu, ts, now, last_update_time); in get_cpu_idle_time_us()
728 if (ts->idle_active && !nr_iowait_cpu(cpu)) { in get_cpu_idle_time_us()
756 u64 get_cpu_iowait_time_us(int cpu, u64 *last_update_time) in get_cpu_iowait_time_us() argument
758 struct tick_sched *ts = &per_cpu(tick_cpu_sched, cpu); in get_cpu_iowait_time_us()
766 update_ts_time_stats(cpu, ts, now, last_update_time); in get_cpu_iowait_time_us()
769 if (ts->idle_active && nr_iowait_cpu(cpu) > 0) { in get_cpu_iowait_time_us()
809 static ktime_t tick_nohz_next_event(struct tick_sched *ts, int cpu) in tick_nohz_next_event() argument
878 if (cpu != tick_do_timer_cpu && in tick_nohz_next_event()
894 static void tick_nohz_stop_tick(struct tick_sched *ts, int cpu) in tick_nohz_stop_tick() argument
912 if (cpu == tick_do_timer_cpu) { in tick_nohz_stop_tick()
976 static void tick_nohz_stop_sched_tick(struct tick_sched *ts, int cpu) in tick_nohz_stop_sched_tick() argument
978 if (tick_nohz_next_event(ts, cpu)) in tick_nohz_stop_sched_tick()
979 tick_nohz_stop_tick(ts, cpu); in tick_nohz_stop_sched_tick()
1009 int cpu = smp_processor_id(); in __tick_nohz_full_update_tick() local
1011 if (can_stop_full_tick(cpu, ts)) in __tick_nohz_full_update_tick()
1012 tick_nohz_stop_sched_tick(ts, cpu); in __tick_nohz_full_update_tick()
1029 static bool can_stop_idle_tick(int cpu, struct tick_sched *ts) in can_stop_idle_tick() argument
1038 if (unlikely(!cpu_online(cpu))) { in can_stop_idle_tick()
1039 if (cpu == tick_do_timer_cpu) in can_stop_idle_tick()
1072 if (tick_do_timer_cpu == cpu) in can_stop_idle_tick()
1086 int cpu = smp_processor_id(); in __tick_nohz_idle_stop_tick() local
1094 else if (can_stop_idle_tick(cpu, ts)) in __tick_nohz_idle_stop_tick()
1095 expires = tick_nohz_next_event(ts, cpu); in __tick_nohz_idle_stop_tick()
1104 tick_nohz_stop_tick(ts, cpu); in __tick_nohz_idle_stop_tick()
1111 nohz_balance_enter_idle(cpu); in __tick_nohz_idle_stop_tick()
1219 int cpu = smp_processor_id(); in tick_nohz_get_sleep_length() local
1231 if (!can_stop_idle_tick(cpu, ts)) in tick_nohz_get_sleep_length()
1234 next_event = tick_nohz_next_event(ts, cpu); in tick_nohz_get_sleep_length()
1255 unsigned long tick_nohz_get_idle_calls_cpu(int cpu) in tick_nohz_get_idle_calls_cpu() argument
1257 struct tick_sched *ts = tick_get_tick_sched(cpu); in tick_nohz_get_idle_calls_cpu()
1533 void tick_cancel_sched_timer(int cpu) in tick_cancel_sched_timer() argument
1535 struct tick_sched *ts = &per_cpu(tick_cpu_sched, cpu); in tick_cancel_sched_timer()
1561 int cpu; in tick_clock_notify() local
1563 for_each_possible_cpu(cpu) in tick_clock_notify()
1564 set_bit(0, &per_cpu(tick_cpu_sched, cpu).check_clocks); in tick_clock_notify()