search for: kvm_idle_update_poll_duration

Displaying 2 results from an estimated 2 matches for "kvm_idle_update_poll_duration".

2017 Nov 13
0
[PATCH RFC v3 6/6] KVM guest: introduce smart idle poll algorithm
...l time to 10000ns */ + if (old == 0 && grow) + return 10000; + + val = old * grow; + if (val > max) + val = max; + + return val; +} + +static unsigned int shrink_poll_ns(unsigned int old, unsigned int shrink) +{ + if (shrink == 0) + return 0; + + return old / shrink; +} + +static void kvm_idle_update_poll_duration(ktime_t idle) +{ + unsigned long poll_duration = this_cpu_read(poll_duration_ns); + + /* so far poll duration is based on nohz */ + if (idle == -1ULL) + return; + + if (poll_duration && idle > paravirt_poll_threshold_ns) + poll_duration = shrink_poll_ns(poll_duration, + para...
2017 Nov 13
0
[PATCH RFC v3 6/6] KVM guest: introduce smart idle poll algorithm
...l time to 10000ns */ + if (old == 0 && grow) + return 10000; + + val = old * grow; + if (val > max) + val = max; + + return val; +} + +static unsigned int shrink_poll_ns(unsigned int old, unsigned int shrink) +{ + if (shrink == 0) + return 0; + + return old / shrink; +} + +static void kvm_idle_update_poll_duration(ktime_t idle) +{ + unsigned long poll_duration = this_cpu_read(poll_duration_ns); + + /* so far poll duration is based on nohz */ + if (idle == -1ULL) + return; + + if (poll_duration && idle > paravirt_poll_threshold_ns) + poll_duration = shrink_poll_ns(poll_duration, + para...