search for: shrink_poll_n

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

Did you mean: shrink_poll_ns
2017 Nov 13
0
[PATCH RFC v3 6/6] KVM guest: introduce smart idle poll algorithm
...ic unsigned int grow_poll_ns(unsigned int old, unsigned int grow, + unsigned int max) +{ + unsigned int val; + + /* set base poll 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)...
2017 Nov 13
0
[PATCH RFC v3 6/6] KVM guest: introduce smart idle poll algorithm
...ic unsigned int grow_poll_ns(unsigned int old, unsigned int grow, + unsigned int max) +{ + unsigned int val; + + /* set base poll 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)...