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 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 0FF2DD2F7E5 for ; Thu, 17 Oct 2024 05:22:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Type: Content-Transfer-Encoding:MIME-Version:Message-ID:Date:Subject:CC:To:From: Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender :Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=PyM8z3sI+W+xh15WCmRe0Enxn0PlpEuOGN4i5iNNDig=; b=PSdTkPXx1PzReqPovontyeTKLR 4XUPNFDagSBRyJ6risglST9W2MZsUPGtr5RD1If5IKgFyigFdgM+8amIJarN4heZf5/AxX6oX8DUi dsY3JxgAe3LCK/YewwTczQ/0HakD9BnZ/+wM90M4sNWmrYVYs3eBOrjPYq6br7DhdEHno8zrjYxeg nHLnaTfLeg7riJHr6DyoE00vM9WMj9h3I5rRnmtHolHOahOm5kipZr5gm9BjgFCGHxWYM2NOohVHJ XtkeYGY06lPcP5oaq/wAKZPJ4DRuealQHhUvn0slgi2w/9LgVSEPzSmT3A73Ssxe7VqpYcxXnmGJe hxE2m6Gg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1t1IxL-0000000DmS3-3k7v; Thu, 17 Oct 2024 05:21:51 +0000 Received: from smtp-fw-33001.amazon.com ([207.171.190.10]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1t1Ivs-0000000DmFm-1Ubv for linux-arm-kernel@lists.infradead.org; Thu, 17 Oct 2024 05:20:22 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.com; i=@amazon.com; q=dns/txt; s=amazon201209; t=1729142420; x=1760678420; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=PyM8z3sI+W+xh15WCmRe0Enxn0PlpEuOGN4i5iNNDig=; b=ABAIbML13r2KoMNIBhhokko338nR0WT45H3Sc1aQdp7Xr8bAoz7/p7GK gk9NXWuU3CwQQANuDnSFKyqW3eLTL4oNR6Rqq75Ygao151BGkFd+AA9hj 5nkRXy+pXaeSKDPTyx/IfkOf/YVSta4UqC52bI+wy3ckjXMXomNoZ2eB2 c=; X-IronPort-AV: E=Sophos;i="6.11,210,1725321600"; d="scan'208";a="376971359" Received: from pdx4-co-svc-p1-lb2-vlan2.amazon.com (HELO smtpout.prod.us-west-2.prod.farcaster.email.amazon.dev) ([10.25.36.210]) by smtp-border-fw-33001.sea14.amazon.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Oct 2024 05:20:17 +0000 Received: from EX19MTAUWC002.ant.amazon.com [10.0.38.20:13163] by smtpin.naws.us-west-2.prod.farcaster.email.amazon.dev [10.0.59.23:2525] with esmtp (Farcaster) id a239f07b-d0c2-46bd-a0e5-2c1e3121e7e6; Thu, 17 Oct 2024 05:20:16 +0000 (UTC) X-Farcaster-Flow-ID: a239f07b-d0c2-46bd-a0e5-2c1e3121e7e6 Received: from EX19D016UWA004.ant.amazon.com (10.13.139.119) by EX19MTAUWC002.ant.amazon.com (10.250.64.143) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA) id 15.2.1258.34; Thu, 17 Oct 2024 05:20:16 +0000 Received: from 88665a51a6b2.amazon.com (10.106.178.54) by EX19D016UWA004.ant.amazon.com (10.13.139.119) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA) id 15.2.1258.34; Thu, 17 Oct 2024 05:20:14 +0000 From: Cristian Prundeanu To: CC: , Peter Zijlstra , Ingo Molnar , , , Bjoern Doebel , Hazem Mohamed Abuelfotoh , Geoff Blake , Ali Saidi , Csaba Csoma , Cristian Prundeanu Subject: [PATCH 0/2] [tip: sched/core] sched: Disable PLACE_LAG and RUN_TO_PARITY and move them to sysctl Date: Thu, 17 Oct 2024 00:19:58 -0500 Message-ID: <20241017052000.99200-1-cpru@amazon.com> X-Mailer: git-send-email 2.46.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.106.178.54] X-ClientProxiedBy: EX19D044UWA004.ant.amazon.com (10.13.139.7) To EX19D016UWA004.ant.amazon.com (10.13.139.119) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241016_222020_528322_65459517 X-CRM114-Status: GOOD ( 10.57 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org This patchset disables the scheduler features PLACE_LAG and RUN_TO_PARITY and moves them to sysctl. Replacing CFS with the EEVDF scheduler in kernel 6.6 introduced significant performance degradation in multiple database-oriented workloads. This degradation manifests in all kernel versions using EEVDF, across multiple Linux distributions, hardware architectures (x86_64, aarm64, amd64), and CPU generations. For example, running mysql+hammerdb results in a 12-17% throughput reduction and 12-18% latency increase compared to kernel 6.5 (using default scheduler settings everywhere). The magnitude of this performance impact is comparable to the average performance difference of a CPU generation over its predecessor. Testing combinations of available scheduler features showed that the largest improvement (short of disabling all EEVDF features) came from disabling both PLACE_LAG and RUN_TO_PARITY: Kernel | default | NO_PLACE_LAG and aarm64 | config | NO_RUN_TO_PARITY ---------+----------+----------------- 6.5 | baseline | N/A 6.6 | -13.2% | -6.8% 6.7 | -13.1% | -6.0% 6.8 | -12.3% | -6.5% 6.9 | -12.7% | -6.9% 6.10 | -13.5% | -5.8% 6.11 | -12.6% | -5.8% 6.12-rc2 | -12.2% | -8.9% ---------+----------+----------------- Kernel | default | NO_PLACE_LAG and x86_64 | config | NO_RUN_TO_PARITY ---------+----------+----------------- 6.5 | baseline | N/A 6.6 | -16.8% | -10.8% 6.7 | -16.4% | -9.9% 6.8 | -17.2% | -9.5% 6.9 | -17.4% | -9.7% 6.10 | -16.5% | -9.0% 6.11 | -15.0% | -8.5% 6.12-rc2 | -12.7% | -10.9% ---------+----------+----------------- While the long term approach is debugging and fixing the scheduler behavior, algorithm changes to address performance issues of this nature are specialized (and likely prolonged or open-ended) research. Until a change is identified which fixes the performance degradation, in the interest of a better out-of-the-box performance: (1) disable these features by default, and (2) expose these values in sysctl instead of debugfs, so they can be more easily persisted across reboots. Cristian Prundeanu (2): sched: Disable PLACE_LAG and RUN_TO_PARITY sched: Move PLACE_LAG and RUN_TO_PARITY to sysctl include/linux/sched/sysctl.h | 8 ++++++++ kernel/sched/core.c | 13 +++++++++++++ kernel/sched/fair.c | 5 +++-- kernel/sched/features.h | 10 ---------- kernel/sysctl.c | 20 ++++++++++++++++++++ 5 files changed, 44 insertions(+), 12 deletions(-) -- 2.40.1