Commits
Alexandr Andreev authored and Pavel Emelianov committed fbb9b075fa5
[SCHED] optimization: dynamic vcpu_timeslice vcpu_timeslice == -1 now has special meaning (and -1 is default value now). In this case, actual vcpu_timeslice value will depend on number of VCPU's ready to run: assume N = ready_vcpus / nr_pcpus for N <= 1, vcpu_timeslice will be 8 1 < N <= 2, vcpu_timeslice = 4 2 < N <= 3, vcpu_timeslice = 2 3 < N <= 4, vcpu_timeslice = 1 N > 4, vcpu_timeslice = 0 This patch lets significantly improve performance of 'context switch' test from unixbench-4.1.0-wht-1, when several instances of this test is running. On a host with 16 CPU's: # cd unixbench-4.1.0-wht-1 # echo 0 > /proc/sys/kernel/vcpu_timeslice # ./Run context1 16 108.4 # echo -1 > /proc/sys/kernel/vcpu_timeslice # ./Run context1 16 435.3