Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp769000pxb; Tue, 9 Feb 2021 11:56:44 -0800 (PST) X-Google-Smtp-Source: ABdhPJy1vfO2drAng6QezBGCd+OjEJqFisNtwx0liDDDgkx/ln0uik4WaGV2Klj7WYf6QYwM1vIJ X-Received: by 2002:a17:906:5fc1:: with SMTP id k1mr17041484ejv.16.1612900603748; Tue, 09 Feb 2021 11:56:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612900603; cv=none; d=google.com; s=arc-20160816; b=K/AziTyI4qbgf3XwjAbegpETnip0PV1hlhDGh4iKe0eDI8jOwHsxWJQQt/x0xJ8wnT xam1oEf5uAuN0Yavcb+ZIu42NrL6goHhmKv7Fx4J2fVMAjfT26phoSBe/Q+Asr/kB846 IqQm+I5+Ufyf5/ZZ9Uz5Qn6y4ym8hY817pR/6RH6Cn9P1CYoNwxGlv+HFkRrPuo5dNG4 +wh/a0vKpdjKjWf7TejmSDErvYYHe7lrfSxNQMiNII8tSlrBi+Ip8bMnO0yiMzDMnURz rjJyhGnG6cEB5KaRqsPOOoTUGMIRHR/rbmjzU+cC0GIj0wRU+N1qq45+HtsbTc7RmbpS lZ2A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:user-agent :references:in-reply-to:subject:cc:to:from; bh=38qiIsObGSh950MXs9W6mH/NGt1sp5/pWW8F6K3uFhE=; b=mupjrEyRR9bnA8WEEUeP3f7C+OcLdq1486AtxsWqmAE9f6oU2dqYlPCOJMjYqmq2L3 dolDdn1N7k4nvEm57TirTw3+DYAOYjF9K/dTdY2BatXkL+SygUhuuhyT5CpIOfZZ5NRs BTKKTwnonZrH237XUM0W7CecY00KrYb+FwFWNUSFK0c31KisjarfoH7/32Dpto01CsG9 PPvog+tL7hPb6OQQKytRNi6ZRVEAzZLUzHHeoyQfhnZSou5E8LWoCAgUSuvFOZh1Osq+ u0hn/XobZlJ7+0G7LpETHGk6yvWC+TzCl1/zXIQMrQUga/20vJz4C9JZcj6n/wdg7ckJ hT+g== 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 co21si15545215edb.165.2021.02.09.11.56.19; Tue, 09 Feb 2021 11:56:43 -0800 (PST) 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 S233715AbhBITvU (ORCPT + 99 others); Tue, 9 Feb 2021 14:51:20 -0500 Received: from foss.arm.com ([217.140.110.172]:55200 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233284AbhBISUh (ORCPT ); Tue, 9 Feb 2021 13:20:37 -0500 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 EF8F6106F; Tue, 9 Feb 2021 10:19:46 -0800 (PST) Received: from e113632-lin (e113632-lin.cambridge.arm.com [10.1.194.46]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 9CBD63F73B; Tue, 9 Feb 2021 10:19:45 -0800 (PST) From: Valentin Schneider To: Vincent Guittot Cc: linux-kernel , Peter Zijlstra , Ingo Molnar , Dietmar Eggemann , Morten Rasmussen , Qais Yousef , Quentin Perret , Pavan Kondeti , Rik van Riel Subject: Re: [PATCH 7/8] sched/fair: Attempt misfit active balance when migration_type != migrate_misfit In-Reply-To: References: <20210128183141.28097-1-valentin.schneider@arm.com> <20210128183141.28097-8-valentin.schneider@arm.com> User-Agent: Notmuch/0.21 (http://notmuchmail.org) Emacs/26.3 (x86_64-pc-linux-gnu) Date: Tue, 09 Feb 2021 18:19:43 +0000 Message-ID: MIME-Version: 1.0 Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 09/02/21 09:58, Vincent Guittot wrote: > On Thu, 28 Jan 2021 at 19:32, Valentin Schneider >> Giving group_misfit_task a higher group_classify() priority than >> group_imbalance doesn't seem like the right thing to do. Instead, make > > Could you explain why ? > Morten had intentionally placed it above (then) group_other but below group_imbalanced: 3b1baa6496e6 ("sched/fair: Add 'group_misfit_task' load-balance type") The reasoning being misfit balance shouldn't take higher priority than jarring imbalance issues. group_imbalanced is a mixed bag and difficult to classify, but for sure group_overloaded takes priority as it ought to imply you can move tasks around without doing an active balance (there's more tasks than CPUs). Then again, we do have issues where the busiest group is group_overloaded, but we'd "want" this to be classified as misfit. This ties in with patch 8. Take the CPU hog vs pcpu kworker example on a big.LITTLE platform: a,b,c,d are our CPU-hogging tasks k is a per-CPU kworker {CPU0 | a a a a k LITTLE{CPU1 | b b b b a ------|--------- {CPU2 | c c c c . bigs {CPU3 | d d d d ^ | | newidle pull CPU2 finished its work and goes through a newidle balance. Ideally here it would pull either 'a' or 'b' which are CPU-bound tasks running on LITTLE CPUs. Unfortunately, a per-CPU kworker woke up on CPU0, so since we have: DIE [ ] MC [ ][ ] 0 1 2 3 the DIE (0-1) sched_group has 3 runnable tasks, two of which are CPU hogs: it gets classified as group_overloaded. Only task 'a' can be pulled, and it requires patch 8 to be migrated in this scenario. I'm not sure how we could better classify this, even if admitting we started tracking preempted misfit tasks. Perhaps not group classification itself, but the migration_type? i.e. something like if (nr_running - sgs->group_weight <= nr_misfits) => all preempted tasks are misfit => migration_type = migrate_misfit