search for: grow_poll_ns

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

2017 Nov 13
0
[PATCH RFC v3 6/6] KVM guest: introduce smart idle poll algorithm
...gt; #include <linux/nmi.h> #include <linux/swait.h> +#include <linux/tick.h> #include <asm/timer.h> #include <asm/cpu.h> #include <asm/traps.h> @@ -365,11 +366,57 @@ static void kvm_guest_cpu_init(void) kvm_register_steal_time(); } +static 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...
2017 Nov 13
0
[PATCH RFC v3 6/6] KVM guest: introduce smart idle poll algorithm
...gt; #include <linux/nmi.h> #include <linux/swait.h> +#include <linux/tick.h> #include <asm/timer.h> #include <asm/cpu.h> #include <asm/traps.h> @@ -365,11 +366,57 @@ static void kvm_guest_cpu_init(void) kvm_register_steal_time(); } +static 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...