static int load_stats_start(void) { int err; struct sched_param param = { .sched_priority = 1 }; err = load_stats_sysfs(); if (err) return err; load_stats_wq = alloc_workqueue("cpuquiet-load_stats", WQ_HIGHPRI, 0); if (!load_stats_wq) return -ENOMEM; INIT_DELAYED_WORK(&load_stats_work, load_stats_work_func); input_boost_task = kthread_create ( load_stats_boost_task, NULL, "cpuquiet_input_boost_task" ); if (IS_ERR(input_boost_task)) pr_err("%s: failed to create input boost task\n", __func__); else { sched_setscheduler_nocheck(input_boost_task, SCHED_RR, ¶m); get_task_struct(input_boost_task); input_boost_task_alive = true; hotplug_info("%s: input boost task created\n", __func__); } first_call = true; total_time = 0; last_time = 0; load_stats_state = IDLE; load_stats_work_func(NULL); return 0; } struct cpuquiet_governor load_stats_governor = { .name = "load_stats", .start = load_stats_start, .device_free_notification = load_stats_device_free, .device_busy_notification = load_stats_device_busy, .stop = load_stats_stop, .touch_event_notification = load_stats_touch_event, .owner = THIS_MODULE, }; static int __init init_load_stats(void) { return cpuquiet_register_governor(&load_stats_governor); } static void __exit exit_load_stats(void) { cpuquiet_unregister_governor(&load_stats_governor); } MODULE_LICENSE("GPL"); module_init(init_load_stats); module_exit(exit_load_stats);
static void __exit exit_rq_stats(void) { cpuquiet_unregister_governor(&rq_stats_governor); }
static void __exit exit_runnables(void) { cpuquiet_unregister_governor(&runnables_governor); }
static void __exit exit_usermode(void) { cpuquiet_unregister_governor(&userspace_governor); }