On Fri, 2019-12-13 at 03:50:35 UTC, Michael Ellerman wrote: > From: Srikar Dronamraju <sri...@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: sta...@vger.kernel.org # v4.18+ > Reported-by: Parth Shah <pa...@linux.ibm.com> > Reported-by: Ihor Pasichnyk <ihor.pasich...@ibm.com> > Tested-by: Juri Lelli <juri.le...@redhat.com> > Acked-by: Waiman Long <long...@redhat.com> > Reviewed-by: Gautham R. Shenoy <e...@linux.vnet.ibm.com> > Signed-off-by: Srikar Dronamraju <sri...@linux.vnet.ibm.com> > Acked-by: Phil Auld <pa...@redhat.com> > Reviewed-by: Vaidyanathan Srinivasan <sva...@linux.ibm.com> > Tested-by: Parth Shah <pa...@linux.ibm.com> > [mpe: Move the key and setting of the key to pseries/setup.c] > Signed-off-by: Michael Ellerman <m...@ellerman.id.au>
Series applied to powerpc fixes. https://git.kernel.org/powerpc/c/14c73bd344da60abaf7da3ea2e7733ddda35bbac cheers