From patchwork Thu Oct 19 16:05:21 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mathieu Desnoyers X-Patchwork-Id: 15631 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:2010:b0:403:3b70:6f57 with SMTP id fe16csp492293vqb; Thu, 19 Oct 2023 09:06:20 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEf++5/pum2pyejuSzH3Si80qNLXQSPWZXbw4JYbLcvIRWEXXOmqtp54OJeqZCQyMQjLspA X-Received: by 2002:a92:d289:0:b0:34f:b9e8:a431 with SMTP id p9-20020a92d289000000b0034fb9e8a431mr2826788ilp.22.1697731579963; Thu, 19 Oct 2023 09:06:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697731579; cv=none; d=google.com; s=arc-20160816; b=ogyEnOwx/0e9PNqLhfCufDVsFzYvW62/fv91g6levjPsaIYz7ALUq631Ymk4IafLRM 6qBqy52bok4oKge2xV2mGZEwJlQHHk9O3SCjG320aje3bVbhDtcNS5kT6nfQnd0VimI2 BWBjppmJ8q7N7JD1g7gHPKGWB1U8dIStdJJnsRIpRXLmIphQodGRGwsJvsAsrTRCWl6y w1bjfLv+qfd6gEGcCPvNu3/9BU5STSd026aGBndNwJ2Pjw0yEodGlJBG5BOcDjbxUnfg OtdAWz/gn6LW2wpUfjR9wPXfT/XGdtvOmZbakppmUUOblE8ZKJZXTCTh4JmRt0ddWzZk FX0g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=/h0Yg3cCHQvFd9gus2M9zEmgoSJ+EI9V53cE6xrV67A=; fh=MlL9xuK1bL5YhHTfhEwdGxMCfB66v6TLl/GiGg/sHRw=; b=EbWI4PjBoqLPOyel1tHPtBehUZ2/7d7O7cYHvtiVX5xBvVHlsIYcuBwLuRMC92bE0l HlsNs8Dm3ySfN/R2PQedkJgEOe+8yrh3OCOM6drINcIWKI23u9ONuQ4Bfy9dX/14/viW cxMmeDxEIgyudkDcQ/yuSIgsSj0dDzTiTUtSkKwd05J+08yejX/YYV1p56u0kNs5ekDt 15Qqw7l13b3mH91JsNNFjF7GU79wWxrQLYwRRNBKBRaVLIDj+zLnC6Yc0msixzmdgwV1 QXbNQl0OwmCpkBe42ZK8OBKMaej/BhISYfIkJ1s2BqimBuDZEgxroHm65d8d9pyEDCh1 yV6g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@efficios.com header.s=smtpout1 header.b=sOQBiwTu; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=efficios.com Received: from fry.vger.email (fry.vger.email. [23.128.96.38]) by mx.google.com with ESMTPS id 80-20020a630253000000b005859e8c7c22si5057996pgc.658.2023.10.19.09.06.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Oct 2023 09:06:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) client-ip=23.128.96.38; Authentication-Results: mx.google.com; dkim=pass header.i=@efficios.com header.s=smtpout1 header.b=sOQBiwTu; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=efficios.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id 885978051AAC; Thu, 19 Oct 2023 09:05:43 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346409AbjJSQFW (ORCPT + 26 others); Thu, 19 Oct 2023 12:05:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43272 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345104AbjJSQFU (ORCPT ); Thu, 19 Oct 2023 12:05:20 -0400 Received: from smtpout.efficios.com (unknown [IPv6:2607:5300:203:b2ee::31e5]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 687F312A for ; Thu, 19 Oct 2023 09:05:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=efficios.com; s=smtpout1; t=1697731516; bh=HmwG14J3AlJoFMkkIkRSsNIqRZMe3libr4mFaqc0lWQ=; h=From:To:Cc:Subject:Date:From; b=sOQBiwTuhHyiox3zgOd1KHiJH4E0m1+/QHJ135qcyd3qkrjfs25NHK7KSwkEsNHtY OBYe1p6yydyvA98wddrcu0R8YLVH04MRPcIcdx19zbQ20sl77vg8vNUzUN69M/4I7Y tl1YKxIRvBiHH4pVjUAmuDcf2ZsucjVMIJjGyIPICljcpQs6nWemi9F+RTHvzD3tq2 InVT2Q9wOAqugVbn1iwThq0WKU/zdUt5TOTHjXSJ++MUrbhuXf1ThOuc1SzTZB1EKJ OS+fdfrdzZqlGvXLKYohEC92SJFi+UDAmQM8Tn6ER1mBbHhVcKNq5HDAyeJ8u2SCYE eI1sCihlLbQDw== Received: from thinkos.internal.efficios.com (192-222-143-198.qc.cable.ebox.net [192.222.143.198]) by smtpout.efficios.com (Postfix) with ESMTPSA id 4SBCH00lhcz1YPd; Thu, 19 Oct 2023 12:05:16 -0400 (EDT) From: Mathieu Desnoyers To: Peter Zijlstra Cc: linux-kernel@vger.kernel.org, Mathieu Desnoyers , Ingo Molnar , Valentin Schneider , Steven Rostedt , Ben Segall , Mel Gorman , Daniel Bristot de Oliveira , Vincent Guittot , Juri Lelli , Swapnil Sapkal , Aaron Lu , Chen Yu , Tim Chen , K Prateek Nayak , "Gautham R . Shenoy" , x86@kernel.org Subject: [RFC PATCH v2 0/2] sched/fair migration reduction features Date: Thu, 19 Oct 2023 12:05:21 -0400 Message-Id: <20231019160523.1582101-1-mathieu.desnoyers@efficios.com> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (fry.vger.email [0.0.0.0]); Thu, 19 Oct 2023 09:05:43 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1780200589193545996 X-GMAIL-MSGID: 1780200589193545996 Hi, This series introduces two new scheduler features: UTIL_FITS_CAPACITY and SELECT_BIAS_PREV. When used together, they achieve a 41% speedup of a hackbench workload which leaves some idle CPU time on a 192-core AMD EPYC. The main metrics which are significantly improved are: - cpu-migrations are reduced by 80%, - CPU utilization is increased by 17%. Feedback is welcome. I am especially interested to learn whether this series has positive or detrimental effects on performance of other workloads. The main changes since v1 are to take into account feedback from Chen Yu and keep a 20% margin of unused utilization in the capacity fit, and use scale_rt_capacity() which is more precise. Thanks, Mathieu Cc: Ingo Molnar Cc: Peter Zijlstra Cc: Valentin Schneider Cc: Steven Rostedt Cc: Ben Segall Cc: Mel Gorman Cc: Daniel Bristot de Oliveira Cc: Vincent Guittot Cc: Juri Lelli Cc: Swapnil Sapkal Cc: Aaron Lu Cc: Chen Yu Cc: Tim Chen Cc: K Prateek Nayak Cc: Gautham R . Shenoy Cc: x86@kernel.org Mathieu Desnoyers (2): sched/fair: Introduce UTIL_FITS_CAPACITY feature (v2) sched/fair: Introduce SELECT_BIAS_PREV to reduce migrations kernel/sched/fair.c | 68 ++++++++++++++++++++++++++++++++++++----- kernel/sched/features.h | 12 ++++++++ kernel/sched/sched.h | 5 +++ 3 files changed, 77 insertions(+), 8 deletions(-)