Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp3029460rwb; Mon, 15 Aug 2022 16:28:17 -0700 (PDT) X-Google-Smtp-Source: AA6agR4XnzDu4jzDy+OGjqLjoAIqaisGI4KbYfWF1Mq/XU4xml5L/MCAi8bZbOK2X0Mlz9OKYhBN X-Received: by 2002:a17:906:8cb0:b0:731:5149:a983 with SMTP id qr48-20020a1709068cb000b007315149a983mr11722670ejc.549.1660605984159; Mon, 15 Aug 2022 16:26:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660605984; cv=none; d=google.com; s=arc-20160816; b=iCO+D3UONNyA5S+Qjodm04iuckt4ZvOkSqeF/gV0vHNHJSX8uLQzXl0vzerc7EBZxV GV+ORh+rU/EuQTTugGFTi8AomWLutzlKQoCCvzvZi1QvhqAlHJUyAbQUU7oDQWwlSty3 1aHVlJfKRO8H6WC4QyPe8x7kdY6x4LnzTjj+DtCJdFInH9apb1XbHwB8N/Ejj7HRCGkO RTwWE/bkTjwTXc5yNDd1HMpE5ot+TXS46CxZ0CRrxRPiqiNn4Oo/EWs6RSAo2AGHXUFs az3RB4rUbXklW13XWDBJ1lfp7dLjw9qIXvR0iBMH/voHebTPfekmcN4F2+oo2jaqODwU jyeg== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=C0ouIFyPkkf7JAn6NIT9TkaqlrQ7O3hYCcSIQhN5XJo=; b=hL1mnpn9OyhrqhsCOfsszpDRe8ltZy8uORbWh33eLtZz7hblBKSWRjX0T6NUClZp28 1hSlf6LE0QHEF/wCSRukhbx/701gvzpUnz9270GMCRX/3iQjTAgDA7rNUBPh448P4M2C EeQAPVf2Zw2bGdQEKV+CFB+S+x39MEjDEd9Uu8BGchRPzUkBMhPcCj7sWnprj4ts7Hm2 mtEFs+6L4s9Aed5GTwzvbElosGimUx2ezoot1+wYQaPemN1sNndihqRtLtBJcylug8li QrnDpfckYBrLRuiHYQGgr+OLLfwlGGX4HyLS5Gq93GhaIgjgJYtTG+lTleDdv8PVO8Hh hIqA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=pyU8inuh; 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=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ga33-20020a1709070c2100b00732f83eb741si9256713ejc.985.2022.08.15.16.25.59; Mon, 15 Aug 2022 16:26:24 -0700 (PDT) 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=@linuxfoundation.org header.s=korg header.b=pyU8inuh; 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=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244164AbiHOXKQ (ORCPT + 99 others); Mon, 15 Aug 2022 19:10:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33916 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1353278AbiHOXHk (ORCPT ); Mon, 15 Aug 2022 19:07:40 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0EC7D1436DB; Mon, 15 Aug 2022 12:59:41 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 2F25161226; Mon, 15 Aug 2022 19:59:40 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2FFB5C433C1; Mon, 15 Aug 2022 19:59:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660593579; bh=Pz3tTLwJMRiGBif8JSeF3IXDhjB3n2Y2I1XT1uepea8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=pyU8inuhFUktWzkC9CLUQ2lMejzQuLOELO+ji1mo1NEdqGsAS7dJuLcABOIhhk2a4 e6yG9bLvf0YEYZtFYDvDJb7CwR7gO278yLfb0//k5S48fD9+oiB64PXHYjg4AWp/Aa JpuFmpffUt37I1SH0uhGufKUqtR9Onp47X/KYZlM= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Mel Gorman , "Peter Zijlstra (Intel)" , K Prateek Nayak , Sasha Levin Subject: [PATCH 5.19 0291/1157] sched/numa: Initialise numa_migrate_retry Date: Mon, 15 Aug 2022 19:54:07 +0200 Message-Id: <20220815180451.263889074@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220815180439.416659447@linuxfoundation.org> References: <20220815180439.416659447@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,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 From: Mel Gorman [ Upstream commit 70ce3ea9aa4ed901c8a90de667df5ef307766e71 ] On clone, numa_migrate_retry is inherited from the parent which means that the first NUMA placement of a task is non-deterministic. This affects when load balancing recognises numa tasks and whether to migrate "regular", "remote" or "all" tasks between NUMA scheduler domains. Signed-off-by: Mel Gorman Signed-off-by: Peter Zijlstra (Intel) Tested-by: K Prateek Nayak Link: https://lore.kernel.org/r/20220520103519.1863-2-mgorman@techsingularity.net Signed-off-by: Sasha Levin --- kernel/sched/fair.c | 1 + 1 file changed, 1 insertion(+) diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index 9d6058b0a3d4..0cba1b2e295b 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -2885,6 +2885,7 @@ void init_numa_balancing(unsigned long clone_flags, struct task_struct *p) p->node_stamp = 0; p->numa_scan_seq = mm ? mm->numa_scan_seq : 0; p->numa_scan_period = sysctl_numa_balancing_scan_delay; + p->numa_migrate_retry = 0; /* Protect against double add, see task_tick_numa and task_numa_work */ p->numa_work.next = &p->numa_work; p->numa_faults = NULL; -- 2.35.1