From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.7 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8CA6AC43603 for ; Fri, 13 Dec 2019 21:23:59 +0000 (UTC) Received: from lists.ozlabs.org (lists.ozlabs.org [203.11.71.2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A3A832465A for ; Fri, 13 Dec 2019 21:23:58 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A3A832465A Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=ellerman.id.au Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 47ZNvc4ysczDrJJ for ; Sat, 14 Dec 2019 08:23:56 +1100 (AEDT) Received: from ozlabs.org (bilbo.ozlabs.org [203.11.71.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 47ZNph382ZzDqw1 for ; Sat, 14 Dec 2019 08:19:40 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=ellerman.id.au Received: by ozlabs.org (Postfix) id 47ZNph0MYTz9sP3; Sat, 14 Dec 2019 08:19:40 +1100 (AEDT) Received: by ozlabs.org (Postfix, from userid 1034) id 47ZNpg6rD7z9sPW; Sat, 14 Dec 2019 08:19:39 +1100 (AEDT) X-powerpc-patch-notification: thanks X-powerpc-patch-commit: 14c73bd344da60abaf7da3ea2e7733ddda35bbac In-Reply-To: <20191213035036.6913-1-mpe@ellerman.id.au> To: Michael Ellerman , linuxppc-dev@ozlabs.org From: Michael Ellerman Subject: Re: [PATCH v5 1/2] powerpc/vcpu: Assume dedicated processors as non-preempt Message-Id: <47ZNpg6rD7z9sPW@ozlabs.org> Date: Sat, 14 Dec 2019 08:19:39 +1100 (AEDT) X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: juri.lelli@redhat.com, parth@linux.ibm.com, pauld@redhat.com, srikar@linux.vnet.ibm.com, ego@linux.vnet.ibm.com, Ihor.Pasichnyk@ibm.com, longman@redhat.com Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" On Fri, 2019-12-13 at 03:50:35 UTC, Michael Ellerman wrote: > From: Srikar Dronamraju > > 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 > Reported-by: Ihor Pasichnyk > Tested-by: Juri Lelli > Acked-by: Waiman Long > Reviewed-by: Gautham R. Shenoy > Signed-off-by: Srikar Dronamraju > Acked-by: Phil Auld > Reviewed-by: Vaidyanathan Srinivasan > Tested-by: Parth Shah > [mpe: Move the key and setting of the key to pseries/setup.c] > Signed-off-by: Michael Ellerman Series applied to powerpc fixes. https://git.kernel.org/powerpc/c/14c73bd344da60abaf7da3ea2e7733ddda35bbac cheers