On 07/15/2015 07:43 AM, Waiman Long wrote:
Performing CPU kicking at lock time can be a bit faster if there is no kick-ahead. On the other hand, deferring it to unlock time is preferrable when kick-ahead can be performed or when the VM guest is having too few vCPUs that a vCPU may be kicked twice before getting the lock. This patch implements the deferring kicking when either one of the above 2 conditions is true.Linux kernel builds were run in KVM guest on an 8-socket, 4 cores/socket Westmere-EX system and a 4-socket, 8 cores/socket Haswell-EX system. Both systems are configured to have 32 physical CPUs. The kernel build times before and after the patch were: Westmere Haswell Patch 32 vCPUs 48 vCPUs 32 vCPUs 48 vCPUs ----- -------- -------- -------- -------- Before patch 3m27.4s 10m32.0s 2m00.8s 14m52.5s After patch 3m01.3s 9m50.9s 2m00.5s 13m28.1s On Westmere, both 32/48 vCPUs case showed some sizeable increase in performance. For Haswell, there was some improvement in the overcommitted (48 vCPUs) case. Signed-off-by: Waiman Long <[email protected]> ---
Hi Waiman, For virtual guests, from my experiments, lock waiter preemption was the main concern especially with fair locks. I find that these set of patches are in right direction to address them. Thanks for the patches. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/

