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=-6.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=no 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 5633EC0018C for ; Mon, 7 Dec 2020 09:17:08 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (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 1546422A85 for ; Mon, 7 Dec 2020 09:17:08 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1546422A85 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=techsingularity.net Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject: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=gUgmRwWJ92UFIKEofCInD8LscusII9MILgjqVii9dLg=; b=hrSxxkqyz1XpsWYm+KJKT7bW74 vKwaVzhbhCQaErVyF/w9lGWv0BlHd6jvuadldrMfiaEcVuEmcn4H1dRe6beN/k0kHsr53g+9lpgv1 7JnM29sdQmUjyuMSUb+quECUpsl6rAkP0xr0roEK1WNffldr9eTowsG/Z4NipYLLekqGDjCNMZI4M qGlAjW0hE9Ta6sgPdyA2zsKVQh2If5m0Eg/v2AbbWmKlMeQ9aasv+4/HuKKhn26bIr2P5BZn1+zPF 8fVd2IjRfX4IZPfDS0RcPYWRm2I68rjGWn+KMhav0uOJXFXhPJoMCdBp17Xu1oEQcfWlMZjq5fGbI zwXQyMLg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kmCcI-0000ba-AJ; Mon, 07 Dec 2020 09:15:34 +0000 Received: from outbound-smtp35.blacknight.com ([46.22.139.218]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kmCcF-0000at-6R for linux-arm-kernel@lists.infradead.org; Mon, 07 Dec 2020 09:15:32 +0000 Received: from mail.blacknight.com (pemlinmail02.blacknight.ie [81.17.254.11]) by outbound-smtp35.blacknight.com (Postfix) with ESMTPS id 54603192E for ; Mon, 7 Dec 2020 09:15:27 +0000 (GMT) Received: (qmail 11227 invoked from network); 7 Dec 2020 09:15:27 -0000 Received: from unknown (HELO stampy.112glenside.lan) (mgorman@techsingularity.net@[84.203.22.4]) by 81.17.254.9 with ESMTPA; 7 Dec 2020 09:15:26 -0000 From: Mel Gorman To: LKML Subject: [RFC PATCH 0/4] Reduce worst-case scanning of runqueues in select_idle_sibling Date: Mon, 7 Dec 2020 09:15:12 +0000 Message-Id: <20201207091516.24683-1-mgorman@techsingularity.net> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201207_041531_336516_9328CA24 X-CRM114-Status: UNSURE ( 8.72 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Barry Song , Juri Lelli , Vincent Guittot , Peter Ziljstra , Aubrey Li , Ingo Molnar , Mel Gorman , Valentin Schneider , Linux-ARM Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org This is a minimal series to reduce the amount of runqueue scanning in select_idle_sibling in the worst case. Patch 1 removes SIS_AVG_CPU because it's unused. Patch 2 improves the hit rate of p->recent_used_cpu to reduce the amount of scanning. It should be relatively uncontroversial Patch 3-4 scans the runqueues in a single pass for select_idle_core() and select_idle_cpu() so runqueues are not scanned twice. It's a tradeoff because it benefits deep scans but introduces overhead for shallow scans. Even if patch 3-4 is rejected to allow more time for Aubrey's idle cpu mask approach to stand on its own, patches 1-2 should be fine. The main decision with patch 4 is whether select_idle_core() should do a full scan when searching for an idle core, whether it should be throttled in some other fashion or whether it should be just left alone. -- 2.26.2 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel 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=-6.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_GIT autolearn=no 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 99494C433FE for ; Mon, 7 Dec 2020 09:16:35 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 5B9CD22A85 for ; Mon, 7 Dec 2020 09:16:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726637AbgLGJQQ (ORCPT ); Mon, 7 Dec 2020 04:16:16 -0500 Received: from outbound-smtp29.blacknight.com ([81.17.249.32]:56941 "EHLO outbound-smtp29.blacknight.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726395AbgLGJQP (ORCPT ); Mon, 7 Dec 2020 04:16:15 -0500 Received: from mail.blacknight.com (pemlinmail02.blacknight.ie [81.17.254.11]) by outbound-smtp29.blacknight.com (Postfix) with ESMTPS id 4E9FABEC6E for ; Mon, 7 Dec 2020 09:15:27 +0000 (GMT) Received: (qmail 11227 invoked from network); 7 Dec 2020 09:15:27 -0000 Received: from unknown (HELO stampy.112glenside.lan) (mgorman@techsingularity.net@[84.203.22.4]) by 81.17.254.9 with ESMTPA; 7 Dec 2020 09:15:26 -0000 From: Mel Gorman To: LKML Cc: Aubrey Li , Barry Song , Ingo Molnar , Peter Ziljstra , Juri Lelli , Vincent Guittot , Valentin Schneider , Linux-ARM , Mel Gorman Subject: [RFC PATCH 0/4] Reduce worst-case scanning of runqueues in select_idle_sibling Date: Mon, 7 Dec 2020 09:15:12 +0000 Message-Id: <20201207091516.24683-1-mgorman@techsingularity.net> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This is a minimal series to reduce the amount of runqueue scanning in select_idle_sibling in the worst case. Patch 1 removes SIS_AVG_CPU because it's unused. Patch 2 improves the hit rate of p->recent_used_cpu to reduce the amount of scanning. It should be relatively uncontroversial Patch 3-4 scans the runqueues in a single pass for select_idle_core() and select_idle_cpu() so runqueues are not scanned twice. It's a tradeoff because it benefits deep scans but introduces overhead for shallow scans. Even if patch 3-4 is rejected to allow more time for Aubrey's idle cpu mask approach to stand on its own, patches 1-2 should be fine. The main decision with patch 4 is whether select_idle_core() should do a full scan when searching for an idle core, whether it should be throttled in some other fashion or whether it should be just left alone. -- 2.26.2