Thread (5 messages) flat view 5 messages, 3 authors, 2019-12-13

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

From: Michael Ellerman <hidden>
Date: 2019-12-13 21:23:59

On Fri, 2019-12-13 at 03:50:35 UTC, Michael Ellerman wrote:
From: Srikar Dronamraju <redacted>

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@vger.kernel.org # v4.18+
Reported-by: Parth Shah <redacted>
Reported-by: Ihor Pasichnyk <redacted>
Tested-by: Juri Lelli <juri.lelli@redhat.com>
Acked-by: Waiman Long <longman@redhat.com>
Reviewed-by: Gautham R. Shenoy <redacted>
Signed-off-by: Srikar Dronamraju <redacted>
Acked-by: Phil Auld <redacted>
Reviewed-by: Vaidyanathan Srinivasan <redacted>
Tested-by: Parth Shah <redacted>
[mpe: Move the key and setting of the key to pseries/setup.c]
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Series applied to powerpc fixes.

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

cheers
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help