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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 601A5ECAAA2 for ; Thu, 25 Aug 2022 22:49:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243952AbiHYWtp (ORCPT ); Thu, 25 Aug 2022 18:49:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38526 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229890AbiHYWtl (ORCPT ); Thu, 25 Aug 2022 18:49:41 -0400 Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C9754C6B7F for ; Thu, 25 Aug 2022 15:49:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1661467780; x=1693003780; h=from:to:cc:subject:date:message-id; bh=tLbNGU4RI2JTJAIEeBbwGScjf3qo7q5qkLaLflr2WFo=; b=PZMzS/2ObYERrUH5dxTB/Yf9AYorUMYAW50cr7MCtLnL6+R8hMMC+b4E jIMG3r0eseF+mAgRDAB+5BXPkCCqro5P0m91iG/PRVNoxtZCd7GS5RT0d qqgUsSBOQjtkMO3cjdnyYvZd7I/GKP3SFARHNBI10lmvFvfGAWrXRRhVf B34Jb2+thJSKN4t14IfIOWfVxnyLUSVoW/Tt8gT/Jy1ajlyPSJLrWrN4W vXvxzo8OplezW6godfuwlYLjOR2741nSxjSh8HJk8ZyMJQeOM9hrQvlpo Rydk9BlHYAJ5DrGZgWUEqAcXujrJBsujYtLpm1hF0IAPpX9/H9015bOny Q==; X-IronPort-AV: E=McAfee;i="6500,9779,10450"; a="295153913" X-IronPort-AV: E=Sophos;i="5.93,264,1654585200"; d="scan'208";a="295153913" Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Aug 2022 15:49:40 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.93,264,1654585200"; d="scan'208";a="678642670" Received: from ranerica-svr.sc.intel.com ([172.25.110.23]) by fmsmga004.fm.intel.com with ESMTP; 25 Aug 2022 15:49:40 -0700 From: Ricardo Neri To: "Peter Zijlstra (Intel)" , Juri Lelli , Vincent Guittot Cc: Ricardo Neri , "Ravi V. Shankar" , Ben Segall , Daniel Bristot de Oliveira , Dietmar Eggemann , Len Brown , Mel Gorman , "Rafael J. Wysocki" , Srinivas Pandruvada , Steven Rostedt , Tim Chen , Valentin Schneider , x86@kernel.org, linux-kernel@vger.kernel.org, Ricardo Neri Subject: [PATCH 0/4] sched/fair: Avoid unnecessary migrations within SMT domains Date: Thu, 25 Aug 2022 15:55:25 -0700 Message-Id: <20220825225529.26465-1-ricardo.neri-calderon@linux.intel.com> X-Mailer: git-send-email 2.17.1 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Intel processors that support Intel Turbo Boost Max 3.0 use asym_packing to assign higher priorities to CPUs with higher maximum frequencies. It artificially assigns, however, a lower priority to the higher-numbered SMT siblings to ensure that they are used last. This results in unnecessary task migrations within the SMT domains. On processors with a mixture of higher-frequency SMT cores and lower- frequency non-SMT cores (such as Intel hybrid processors), a lower- priority CPU pulls tasks from the higher-priority cores if more than one SMT sibling is busy. Do not use different priorities for each SMT sibling. Instead, tweak the asym_packing load balancer to recognize SMT cores with more than one busy sibling and let lower-priority CPUs pull tasks. Removing these artificial priorities avoids superfluous migrations and lets lower-priority cores inspect all SMT siblings for the busiest queue. Thanks and BR, Ricardo Ricardo Neri (4): sched/fair: Simplify asym_packing logic for SMT sched groups sched/fair: Do not disqualify either runqueues of SMT sched groups sched/fair: Let lower-priority CPUs do active balancing x86/sched: Avoid unnecessary migrations within SMT domains arch/x86/kernel/itmt.c | 23 +++++----------------- kernel/sched/fair.c | 44 ++++++++++++++++++++---------------------- 2 files changed, 26 insertions(+), 41 deletions(-) -- 2.25.1