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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 17F3AECAAA1 for ; Sun, 11 Sep 2022 08:06:04 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 3A9ED8D0002; Sun, 11 Sep 2022 04:06:04 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 358D56B0072; Sun, 11 Sep 2022 04:06:04 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 26F3A8D0002; Sun, 11 Sep 2022 04:06:04 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id 188246B0071 for ; Sun, 11 Sep 2022 04:06:04 -0400 (EDT) Received: from smtpin29.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id 87591140675 for ; Sun, 11 Sep 2022 08:06:03 +0000 (UTC) X-FDA: 79899071406.29.2712DB9 Received: from r3-11.sinamail.sina.com.cn (r3-11.sinamail.sina.com.cn [202.108.3.11]) by imf19.hostedemail.com (Postfix) with ESMTP id 02F531A0075 for ; Sun, 11 Sep 2022 08:06:00 +0000 (UTC) Received: from unknown (HELO localhost.localdomain)([114.249.57.76]) by sina.com (172.16.97.27) with ESMTP id 631D96BF00014C00; Sun, 11 Sep 2022 16:05:21 +0800 (CST) X-Sender: hdanton@sina.com X-Auth-ID: hdanton@sina.com X-SMAIL-MID: 67104049283241 From: Hillf Danton To: K Prateek Nayak Cc: linux-kernel@vger.kernel.org, mgorman@techsingularity.net, peterz@infradead.org, linux-mm@kvack.org, vincent.guittot@linaro.org Subject: Re: [PATCH 5/5] sched/fair: Add exception for hints in load balancing path Date: Sun, 11 Sep 2022 16:05:47 +0800 Message-Id: <20220911080547.2709-1-hdanton@sina.com> In-Reply-To: <20220910105326.1797-6-kprateek.nayak@amd.com> References: <20220910105326.1797-1-kprateek.nayak@amd.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1662883563; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=KOZo9ddy50IyoHXC4WEN/JCFsuK3cEtNIEOJI5B0BAc=; b=Nt0CcG29+2TIaFqvIeBTvYiVsRBDKWTxv6SQ/DNA6om7j6egcJhr3tPVnBMQRZYkzFBXJa lgLC/ytWNt7GlHkB7kQn0VcIDvc6KU3qNcImVS4Y8cGNtePh0ziEv4mHFCLcALV098xgJT 9hcjJLy09+zUf47b6ALmaDRXiJ4x8OI= ARC-Authentication-Results: i=1; imf19.hostedemail.com; dkim=none; spf=pass (imf19.hostedemail.com: domain of hdanton@sina.com designates 202.108.3.11 as permitted sender) smtp.mailfrom=hdanton@sina.com; dmarc=none ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1662883563; a=rsa-sha256; cv=none; b=ZL4aprmGny9TOKGuNYbIN62IKf5HgzK3/Cvj0R5yipmAT39L27l0/v4RE1Ob5KsK2mNvhr Viv29+ai1zft6pIqVZgfDR9Q9cGlCf3ME78pS96YXrBn6syvRMz8l/Gy7TSjiQkpZgPy8O tK6i3obkk9x/WntWRZQW7MaqY/t4nqw= X-Rspam-User: X-Stat-Signature: 9ostksx4ughmn4g5ewxbjsir5b6itrtt X-Rspamd-Server: rspam05 X-Rspamd-Queue-Id: 02F531A0075 Authentication-Results: imf19.hostedemail.com; dkim=none; spf=pass (imf19.hostedemail.com: domain of hdanton@sina.com designates 202.108.3.11 as permitted sender) smtp.mailfrom=hdanton@sina.com; dmarc=none X-HE-Tag: 1662883560-820020 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000057, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On 10 Sep 2022 16:23:26 +0530 K Prateek Nayak wrote: > - Load balancing considerations > > If we have more tasks than the CPUs in the MC Domain, ignore the hint > set by the user. This prevents losing the consolidation done at the > wakeup time. It is waste of time to cure ten pains with a pill in five days a week. > @@ -7977,6 +7980,21 @@ int can_migrate_task(struct task_struct *p, struct lb_env *env) > return 0; > } > > + /* > + * Hints are followed only if the MC Domain is still ideal > + * for the task. > + */ > + if (!env->ignore_hint) { > + /* > + * Only consider the hints from the wakeup path to maintain > + * data locality. > + */ > + if (READ_ONCE(p->hint) & > + (PR_SCHED_HINT_WAKE_AFFINE | PR_SCHED_HINT_WAKE_HOLD)) > + return 0; > + } The wake hints are not honored during lb without PR_SCHED_HINT_IGNORE_LB set then the scheduler works as you hint. Hillf