Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp985491pxb; Thu, 15 Apr 2021 10:59:42 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxBhFmCQ99FRmbQEKLIbD2mXM/VAUs5YJcJsOoAZDQ9ckLsh6lAhOOO/drgNt3t1eVgoC/G X-Received: by 2002:a17:90a:850c:: with SMTP id l12mr5089698pjn.224.1618509582275; Thu, 15 Apr 2021 10:59:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618509582; cv=none; d=google.com; s=arc-20160816; b=WERT5nixkNfV2VAEuhSNpdSIJHdC8X3vNo2f4v3Xufw4SiNd6+0icQ3ctDEX4tGDnl A2GEemYFrE/gNiLBqwp+cG5qXEi5vUwHxPL19cSIL8Why8U2XWsRjgd0JuwWkFh70AX+ Nto1M4LbWjjmJfao0dsJ0QG9FElQkLS1Pa+DkHIaNZ1oNDpA2hyYCTx0WtLg7fpmuGil nwnCofUlTb0Vj28l6Ga1VP04+1SnyKlQ1qwRLBOSdQxoa8HS/GQWaeCT26L2vLFS3V70 MB3a3VDwxAh/JyovUK4QKoNydtiL+nQtGBHcp0b/kP+zkxheDY9Z6LTe3FsKvHud/w5h 9IOA== 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; bh=BsXw+DtTm7+cp9ls8G36Y4FoPPMzrcHx5dy4vMpmHmA=; b=PlATP7GEwpn5wqqoNaZL+pguBgHtdxeMyGh9ENvuv5M4hQcAPaThY2ZxTUoM8NnbRR yZA5i/VubS8rsfYAWb8T7LNcniCt2BnqPOHcG06wazOqbrQi24ZSznAghpZx5/gdbMSh 1q4kNcwqs+6ovX2Eum/bF2klQj8brXOmuEWR+Q7F6P6nPRw+J+7cNeEYSCw0FYGu786H Lx8JoLk5nI13qJFlOPL/UH7hSZbQv5vaA55CQw7lYIoYJ64WfAoPcESlKEM6ESXyZFoj vEWeA6FgjMsgHqrtD67tXGshzcmyFv7mtCYly0KYYiS6nrGtIDf+g3U4TsgmrS7HHSu1 AVBQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h21si3444613pgg.456.2021.04.15.10.59.29; Thu, 15 Apr 2021 10:59:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234221AbhDOR7V (ORCPT + 99 others); Thu, 15 Apr 2021 13:59:21 -0400 Received: from foss.arm.com ([217.140.110.172]:51796 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232759AbhDOR7V (ORCPT ); Thu, 15 Apr 2021 13:59:21 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 98E5E106F; Thu, 15 Apr 2021 10:58:57 -0700 (PDT) Received: from e113632-lin.cambridge.arm.com (e113632-lin.cambridge.arm.com [10.1.194.46]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 125DC3FA45; Thu, 15 Apr 2021 10:58:55 -0700 (PDT) From: Valentin Schneider To: linux-kernel@vger.kernel.org Cc: Peter Zijlstra , Ingo Molnar , Vincent Guittot , Dietmar Eggemann , Morten Rasmussen , Qais Yousef , Quentin Perret , Pavan Kondeti , Rik van Riel , Lingutla Chandrasekhar Subject: [PATCH 0/2] sched/fair: (The return of) misfit task load-balance tweaks Date: Thu, 15 Apr 2021 18:58:44 +0100 Message-Id: <20210415175846.494385-1-valentin.schneider@arm.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi folks, This is the misfit-specific bits I tore out of [1] and that I've been further chewing on. o Patch 1 pays attention to group vs CPU capacity checks. It's removing some safeguard we had against downmigrations, so it had to grow fatter to compensate for it. o Patch 2 aligns running and non-running misfit task cache hotness considerations This is based on top of today's tip/sched/core at: e0ccd4a3b01 ("rseq: Optimise rseq_get_rseq_cs() and clear_rseq_cs()") Revisions ========= v3 -> part 2 v1 --------------- o Removed sg_lb_stats->group_has_misfit_task (Vincent) o Shoved misfit specific update_sg_lb_stats() work into its own function (Vincent) o Added migrate_degrades_capacity() o Made task_hot() tweak depend on src_grp_type == group_has_spare rather than idle != CPU_NOT_IDLE v2 -> v3 -------- o Rebased on top of latest tip/sched/core o Added test results vs stress-ng.vm-segv v1 -> v2 -------- o Collected Reviewed-by o Minor comment and code cleanups o Consolidated static key vs SD flag explanation (Dietmar) Note to Vincent: I didn't measure the impact of adding said static key to load_balance(); I do however believe it is a low hanging fruit. The wrapper keeps things neat and tidy, and is also helpful for documenting the intricacies of the static key status vs the presence of the SD flag in a CPU's sched_domain hierarchy. o Removed v1 patch 4 - root_domain.max_cpu_capacity is absolutely not what I had convinced myself it was. o Squashed capacity margin usage with removal of group_smaller_{min, max}_capacity() (Vincent) o Replaced v1 patch 7 with Lingutla's can_migrate_task() patch [2] o Rewrote task_hot() modification changelog Links ===== [1]: http://lore.kernel.org/r/20210311120527.167870-1-valentin.schneider@arm.com [2]: http://lore.kernel.org/r/20210217120854.1280-1-clingutla@codeaurora.org Cheers, Valentin Valentin Schneider (2): sched/fair: Filter out locally-unsolvable misfit imbalances sched/fair: Relax task_hot() for misfit tasks kernel/sched/fair.c | 99 ++++++++++++++++++++++++++++++++++++--------- 1 file changed, 81 insertions(+), 18 deletions(-) -- 2.25.1