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 3C45BC433EF for ; Mon, 7 Mar 2022 13:54:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242938AbiCGNyz (ORCPT ); Mon, 7 Mar 2022 08:54:55 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35742 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241359AbiCGNyx (ORCPT ); Mon, 7 Mar 2022 08:54:53 -0500 Received: from alexa-out-sd-02.qualcomm.com (alexa-out-sd-02.qualcomm.com [199.106.114.39]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2B27E344CE; Mon, 7 Mar 2022 05:53:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; i=@quicinc.com; q=dns/txt; s=qcdkim; t=1646661239; x=1678197239; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=AfhkZU3UC9bKYUCNGyAjLCkAjtrFk65MmiGtIE6ektM=; b=Q66L9hZTo9YHPw16kHNFL959VHtG460ePo9mePN5ZhFBh/JUqonoKcaI KtKxCoLLRHuTnUUoxEzKroX0jne4nyv91dFYmJgVWmZz9QPdhkYv3WLxE 4f/+obGKu3CS4QMa6ZgWVBSUF4fA4F+j1fX4AQnFGjH7QIQ3LO0dqO4LC k=; Received: from unknown (HELO ironmsg01-sd.qualcomm.com) ([10.53.140.141]) by alexa-out-sd-02.qualcomm.com with ESMTP; 07 Mar 2022 05:53:58 -0800 X-QCInternal: smtphost Received: from nasanex01c.na.qualcomm.com ([10.47.97.222]) by ironmsg01-sd.qualcomm.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Mar 2022 05:53:58 -0800 Received: from nalasex01a.na.qualcomm.com (10.47.209.196) by nasanex01c.na.qualcomm.com (10.47.97.222) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.15; Mon, 7 Mar 2022 05:53:58 -0800 Received: from qian (10.80.80.8) by nalasex01a.na.qualcomm.com (10.47.209.196) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.15; Mon, 7 Mar 2022 05:53:57 -0800 Date: Mon, 7 Mar 2022 08:53:55 -0500 From: Qian Cai To: "Huang, Ying" CC: , , "Peter Zijlstra (Intel)" , , Subject: Re: [tip: sched/core] sched/numa: Avoid migrating task to CPU-less node Message-ID: 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> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <87wnh648ec.fsf@yhuang6-desk2.ccr.corp.intel.com> X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01a.na.qualcomm.com (10.52.223.231) To nalasex01a.na.qualcomm.com (10.47.209.196) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 44AD0C433F5 for ; Mon, 7 Mar 2022 13:55:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:CC:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=9CqFJ1UMw3Jrd1fMrpn4prkq9l+EK4XHX+c1AR1yqKA=; b=ht51bjjQKyupa4 CXNH+ErlWKnghnjQtr4KXdFLHo9wh08PrFqNJ4zEP2szeHi7KQGtB/VLxdXymV4VA/82yqf3jdRCe ZIKsYyJKEEIvoRL6FwNOb5inAg/yMTi2zq+33VYFZ2Zdd6dzHhIzFMM8Yrs9tC0F7P2sn2hCYgwWm yOpQq8l0wfezwx+gQy3XZLewU+UhOOrLXLBuiXBHM4+taL/f0PGk1Raj07zzaHmxTmVlcFjdFQxAf aKl5f/3kEN9spepH2pKGmtxLOOEb9ljQ0ygI/enwIz6RFn2poyeH6B0mODrKYNVDvCsS2WZAL7RVX dTObC6Xyjvy/nTxujZgA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nRDoJ-000Im7-6Z; Mon, 07 Mar 2022 13:54:03 +0000 Received: from alexa-out-sd-02.qualcomm.com ([199.106.114.39]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nRDoG-000IlX-LN for linux-arm-kernel@lists.infradead.org; Mon, 07 Mar 2022 13:54:01 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; i=@quicinc.com; q=dns/txt; s=qcdkim; t=1646661240; x=1678197240; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=AfhkZU3UC9bKYUCNGyAjLCkAjtrFk65MmiGtIE6ektM=; b=BkNWbYwx4cCNq95y+2NbOY4gWDfzPttjHbW3JA7GHTrkaMFtk2BrONc8 lxSztxMygBxIub7RD3IDMEIbCIHkyyAg9Q221Id57oi5IzDjLiEOeaBtu tbuHS4Bh+6pRyZw22fjMhLhZUtkUcbZWm7TuRxkmdeLpB3lqh1o87vMIC o=; Received: from unknown (HELO ironmsg01-sd.qualcomm.com) ([10.53.140.141]) by alexa-out-sd-02.qualcomm.com with ESMTP; 07 Mar 2022 05:53:58 -0800 X-QCInternal: smtphost Received: from nasanex01c.na.qualcomm.com ([10.47.97.222]) by ironmsg01-sd.qualcomm.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Mar 2022 05:53:58 -0800 Received: from nalasex01a.na.qualcomm.com (10.47.209.196) by nasanex01c.na.qualcomm.com (10.47.97.222) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.15; Mon, 7 Mar 2022 05:53:58 -0800 Received: from qian (10.80.80.8) by nalasex01a.na.qualcomm.com (10.47.209.196) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.15; Mon, 7 Mar 2022 05:53:57 -0800 Date: Mon, 7 Mar 2022 08:53:55 -0500 From: Qian Cai To: "Huang, Ying" CC: , , "Peter Zijlstra (Intel)" , , Subject: Re: [tip: sched/core] sched/numa: Avoid migrating task to CPU-less node Message-ID: 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> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <87wnh648ec.fsf@yhuang6-desk2.ccr.corp.intel.com> X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01a.na.qualcomm.com (10.52.223.231) To nalasex01a.na.qualcomm.com (10.47.209.196) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220307_055400_772234_A3901090 X-CRM114-Status: GOOD ( 15.55 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel