From patchwork Tue Dec 8 15:34:57 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mel Gorman X-Patchwork-Id: 11958807 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=-11.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT 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 7D09DC433FE for ; Tue, 8 Dec 2020 15:36:38 +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 03F5323AC8 for ; Tue, 8 Dec 2020 15:36:37 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 03F5323AC8 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=QBtak1RNVdAqlIr+8cg3sEHPKa6RGzGBm/kdd1Lo1eE=; b=bb6+SWouJgJ49G9C+9WNu7mziE 6/e+pIRaH0ePQuFOTMPj/q/JigwbaigFwqcivTxvkF3vcDPcbhS4kI1TdelP0yNVFO4Nyd4u+xleG lS6VYh1nZ478zan1qrH6rFRkNV8Vf4+VGjMg53u44DmH6kpX+cAtElz+P0bNFl4ffiY+3YzVPPQeC VBcQ5DxmvP0gUOSi1EmpzQJpFo4iP6hTcBYilJ15OUfjl164qyqYH1EPTvL7u7K50WmEGdvcXoZ0M N020A/jYuq+k3LYVml8CXXob0olG8/KQe6hszJb9ygvYm4qbpkdS6fhVc1hsRFuyk00XOw+RjF4Gj ENZe5uxQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kmf1M-0006iY-BC; Tue, 08 Dec 2020 15:35:20 +0000 Received: from outbound-smtp26.blacknight.com ([81.17.249.194]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kmf1K-0006ht-5V for linux-arm-kernel@lists.infradead.org; Tue, 08 Dec 2020 15:35:19 +0000 Received: from mail.blacknight.com (pemlinmail04.blacknight.ie [81.17.254.17]) by outbound-smtp26.blacknight.com (Postfix) with ESMTPS id 2537ECAC6D for ; Tue, 8 Dec 2020 15:35:13 +0000 (GMT) Received: (qmail 9668 invoked from network); 8 Dec 2020 15:35:12 -0000 Received: from unknown (HELO stampy.112glenside.lan) (mgorman@techsingularity.net@[84.203.22.4]) by 81.17.254.9 with ESMTPA; 8 Dec 2020 15:35:12 -0000 From: Mel Gorman To: Peter Ziljstra , Ingo Molnar , LKML Subject: [PATCH 0/4] Reduce scanning of runqueues in select_idle_sibling Date: Tue, 8 Dec 2020 15:34:57 +0000 Message-Id: <20201208153501.1467-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-20201208_103518_316473_A5DD903F X-CRM114-Status: UNSURE ( 8.20 ) 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 , Aubrey Li , Mel Gorman , Valentin Schneider , Linux-ARM Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Changelog since v1 o Drop single-pass patch (vincent) o Scope variables used for SIS_AVG_CPU (dietmar) o Remove redundant assignment (dietmar This reduces 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 moves all SIS_PROP-related calculations under SIS_PROP Patch 3 improves the hit rate of p->recent_used_cpu to reduce the amount of scanning. It should be relatively uncontroversial Patch 4 returns an idle candidate if one is found while scanning for a free core.