[PATCH v5 1/2] powerpc/vcpu: Assume dedicated processors as non-preempt

Michael Ellerman patch-notifications at ellerman.id.au
Sat Dec 14 08:19:39 AEDT 2019


On Fri, 2019-12-13 at 03:50:35 UTC, Michael Ellerman wrote:
> From: Srikar Dronamraju <srikar at linux.vnet.ibm.com>
> 
> With commit 247f2f6f3c70 ("sched/core: Don't schedule threads on
> pre-empted vCPUs"), the scheduler avoids preempted vCPUs to schedule
> tasks on wakeup. This leads to wrong choice of CPU, which in-turn
> leads to larger wakeup latencies. Eventually, it leads to performance
> regression in latency sensitive benchmarks like soltp, schbench etc.
> 
> On Powerpc, vcpu_is_preempted() only looks at yield_count. If the
> yield_count is odd, the vCPU is assumed to be preempted. However
> yield_count is increased whenever the LPAR enters CEDE state (idle).
> So any CPU that has entered CEDE state is assumed to be preempted.
> 
> Even if vCPU of dedicated LPAR is preempted/donated, it should have
> right of first-use since they are supposed to own the vCPU.
...
> 
> Waiman Long suggested using static_keys.
> 
> Fixes: 247f2f6f3c70 ("sched/core: Don't schedule threads on pre-empted vCPUs")
> Cc: stable at vger.kernel.org # v4.18+
> Reported-by: Parth Shah <parth at linux.ibm.com>
> Reported-by: Ihor Pasichnyk <Ihor.Pasichnyk at ibm.com>
> Tested-by: Juri Lelli <juri.lelli at redhat.com>
> Acked-by: Waiman Long <longman at redhat.com>
> Reviewed-by: Gautham R. Shenoy <ego at linux.vnet.ibm.com>
> Signed-off-by: Srikar Dronamraju <srikar at linux.vnet.ibm.com>
> Acked-by: Phil Auld <pauld at redhat.com>
> Reviewed-by: Vaidyanathan Srinivasan <svaidy at linux.ibm.com>
> Tested-by: Parth Shah <parth at linux.ibm.com>
> [mpe: Move the key and setting of the key to pseries/setup.c]
> Signed-off-by: Michael Ellerman <mpe at ellerman.id.au>

Series applied to powerpc fixes.

https://git.kernel.org/powerpc/c/14c73bd344da60abaf7da3ea2e7733ddda35bbac

cheers


More information about the Linuxppc-dev mailing list