Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp2496695pxp; Mon, 7 Mar 2022 17:09:32 -0800 (PST) X-Google-Smtp-Source: ABdhPJxNX0P0taLSKvsuStF/3o4j336J4RiCidkO1zFfrd+lXQn0YTeVPAQJTgzzfw6I0WWcblaT X-Received: by 2002:a17:902:dacc:b0:151:c216:2772 with SMTP id q12-20020a170902dacc00b00151c2162772mr14877590plx.107.1646701772134; Mon, 07 Mar 2022 17:09:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646701772; cv=none; d=google.com; s=arc-20160816; b=lLDdMmZf/vWEhjPTk0NmmXU5X149TqXTwEdcbYNj4afYIGIVgxOlH85dkcH2zwMEVg ITHWc1gaEzLmXfZa2WWMlu4LlPL/okKKPcs9vYyiMc7yEBxErCd98zSUxu/ZdPWXS0+c D69HGoC6F2LpZwk3+eBzHUJbeGr3hX20xcWQ7Sv60TKfjArtVWg61mUIV5VhZTAOf0W6 W8BrFDAVHPfA+C817rPaAQ1CLPynve7kN26G2MqsMfWuFrx7Fkwhx96RVY6Nyec8hTR2 zv8c0kj7nClkMgLf3R6Uu6gIqaLD/4J0g5IZFBQpnCiLq+Gt1pEUYZaSxydBJGHo9yDc iXNQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:message-id:in-reply-to :date:references:subject:cc:to:from:dkim-signature; bh=f7UDLuNixJeaVNKX7JDaIrqnQPbZ5TFHtEvW3OnPiK4=; b=mbTJNS0QDRw77e9voI+HlA7zT/bSTcwBjuRsQvdLM98EQX83OxAAUvs+mkrdm4tvhw 7q97u6mjInn1d0OeFuSvFaWGmuTV3s/d6w8l4PNMPp6uk+n+FH4tbcMPJ8r3nZph4ptZ 5gY7I0zjTbisZKc03GE9IE/xZSe4mHLu+mbfQwig+VQmwBzFeS2Ja9g/35NuUfh8nSF+ Bar15J6842Qkn7Q4bEzEXyMkTIAzuymNZtt5IcUH9toH99SnhSO6shvd/7mlpYI0dqAB TX76td/LPDm817+oQWpLlQoBSDf8n0VPRS3SOCDbKyNOaTVsBdygafv+7vN6842/2Rut wgtA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=NITCLjlm; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 144-20020a630296000000b003803aee7e1esi4838133pgc.258.2022.03.07.17.09.15; Mon, 07 Mar 2022 17:09:32 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=NITCLjlm; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244174AbiCHAl0 (ORCPT + 99 others); Mon, 7 Mar 2022 19:41:26 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58256 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244110AbiCHAlX (ORCPT ); Mon, 7 Mar 2022 19:41:23 -0500 Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 809203DDF2; Mon, 7 Mar 2022 16:40:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1646700027; x=1678236027; h=from:to:cc:subject:references:date:in-reply-to: message-id:mime-version; bh=mLllPTDfXt60Bir+ikPy6cJJ1bK+rUaZ0Sed6I0eCbg=; b=NITCLjlm4+dVU0oOfssmBPLhhUP1pVTQcPg1/9c3k8fw6Q7O+Pvd9bI3 JJ7VyDlh+24pMkLkUsZOQ9IbsqIydQlVpN5vT+dyK3psl09V01RqFbBsT u0lkNyOjgKXKh9z7E2O9tp/YWwkPjho+hgwkTUgEhnsnyV9lWSV4o+UKB U7MwwtL1Mdp0RqiKUbBUtjX6swDyTQY/d8kz5zPlXHjlOgezQLDw/MfIf CRI9IkWT6cLFxAG+Am2HfeZ0ooZ3ZTCykOJ94sK8PoWA+aTl/xDnB5i3c CMV9t6sdxOJnc3bX0KnbWUM25ldI8EOLRvURMk2ksMQg6A6ZOEPvk6UW1 A==; X-IronPort-AV: E=McAfee;i="6200,9189,10279"; a="253376521" X-IronPort-AV: E=Sophos;i="5.90,163,1643702400"; d="scan'208";a="253376521" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Mar 2022 16:40:25 -0800 X-IronPort-AV: E=Sophos;i="5.90,163,1643702400"; d="scan'208";a="553397703" Received: from yhuang6-desk2.sh.intel.com (HELO yhuang6-desk2.ccr.corp.intel.com) ([10.239.13.94]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Mar 2022 16:40:23 -0800 From: "Huang, Ying" To: Qian Cai Cc: , , "Peter Zijlstra (Intel)" , , Subject: Re: [tip: sched/core] sched/numa: Avoid migrating task to CPU-less node References: <20220214121553.582248-2-ying.huang@intel.com> <164512421264.16921.689831789198253265.tip-bot2@tip-bot2> <87v8wx1850.fsf@yhuang6-desk2.ccr.corp.intel.com> <87wnh648ec.fsf@yhuang6-desk2.ccr.corp.intel.com> Date: Tue, 08 Mar 2022 08:40:21 +0800 In-Reply-To: (Qian Cai's message of "Mon, 7 Mar 2022 08:53:55 -0500") Message-ID: <87ee3dmg3u.fsf@yhuang6-desk2.ccr.corp.intel.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=ascii X-Spam-Status: No, score=-4.9 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Qian Cai writes: > On Mon, Mar 07, 2022 at 01:51:55PM +0800, Huang, Ying wrote: >> > --- >> > kernel/sched/fair.c | 2 +- >> > 1 file changed, 1 insertion(+), 1 deletion(-) >> > >> > diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c >> > index a3f0ea216ccb..1fe7a4510cca 100644 >> > --- a/kernel/sched/fair.c >> > +++ b/kernel/sched/fair.c >> > @@ -2405,7 +2405,7 @@ static void task_numa_placement(struct task_struct *p) >> > } >> > >> > /* Cannot migrate task to CPU-less node */ >> > - if (!node_state(max_nid, N_CPU)) { >> > + if (max_nid != NUMA_NO_NODE && !node_state(max_nid, N_CPU)) { >> > int near_nid = max_nid; >> > int distance, near_distance = INT_MAX; >> >> Do you have time to give this patch a try? > > Ah, I thought I has already replied it a while ago. Anyway, it works fine. Thanks! Best Regards, Huang, Ying