From nobody Tue Dec 23 16:22:40 2025 Received: from mail-pl1-f174.google.com (mail-pl1-f174.google.com [209.85.214.174]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6CFF223237B for ; Mon, 13 Jan 2025 07:31:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.174 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736753469; cv=none; b=fGlKa3Zi7/QhRR4DWtUhmvmuFjoLAEOwD+btwGtXH5ZASSXTPew1qEwpEPnz+H5WQPA/7+dAVS9mirBD3XXqG9WQCYjuLDJB+IZR1Kf0M05TaT3AiO2uUwzWx/kSohPj9LX4FZIVFpr9MEhnOz9JG6QT9LS/BXbFK6p4EVbKyGQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736753469; c=relaxed/simple; bh=e8V2/5KlrGsOamPD8ebv7YyO3uJsR9dHh6zsXexWUME=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=Vfe8CcEVkSixcWb6ahzjLLj4VXsn1JKNRfgJ2kZExn92u4w1ITEbRSmFQIeCrFc9M81PytREiRMSGnqWGHOfYQQzrGeMulLueZmfKylRyt7wbW9N5EVppu7OJg8bb9PMNTw9sL0EE+TmyeUXAgvxC4i7N4N+oNVep4N5ZAf83Gs= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=bytedance.com; spf=pass smtp.mailfrom=bytedance.com; dkim=pass (2048-bit key) header.d=bytedance.com header.i=@bytedance.com header.b=lSC2BVLC; arc=none smtp.client-ip=209.85.214.174 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=bytedance.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bytedance.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bytedance.com header.i=@bytedance.com header.b="lSC2BVLC" Received: by mail-pl1-f174.google.com with SMTP id d9443c01a7336-21661be2c2dso63949085ad.1 for ; Sun, 12 Jan 2025 23:31:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bytedance.com; s=google; t=1736753466; x=1737358266; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=q66ziXZCi5joAoIC/V9vsSQ6l+tHZim3L8CFSJmAPhk=; b=lSC2BVLCADIK0k2YDKgN/Jt0kk4ZTJXPbZ2n6YQritkZyzAy1djbTMkKXH4rkHAuV2 5cFdIsE6doxCxD96+jqFc8dAex2wHirl/j4lPTur3fOSKZDQVRSZ5xnRpyBGAecdamky ehVUUv7g1/WJhWOCfHFB0PpEE0BkPmxuJ7ZHMkEFoL/t2+SC6vdrvJoLzN71JpnJGUiW 68yXbD0PZRepQ6fZ5NY/fywVNhg4h7JBCTOVdpo+jVrtONcLSBj6Yi7nXRRJvjLj0Je+ UbtG0bPiEiyvMPLdcKEhms4S+GG0VIIbx/K0JVtAYeKo2EMC+sWirGw6/YBdfleVv1E2 9jZA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736753466; x=1737358266; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=q66ziXZCi5joAoIC/V9vsSQ6l+tHZim3L8CFSJmAPhk=; b=AIevDdNTDe/pdM1VygQM6CG3hdc4SEPO3jApVcpjPx4eqShHWd8/diwN6RX7oiu2ZT PPCmUUiZtop6Fpni45s603Ug1tUvSjKDnvWYme5kMVtmKMFvA3NMpblfomV/AD9h769V gi3SlWWeQw+1jCihZ1h6s0OJmrgEkrF7ufHTQcfgyrHHiFsoszteiavQrpkrkGUmMEPm 2yq+UT8tkMYvSsJn0YDR0u7uItX0sehO0g5mH4AG355i+MbJ4o+ud6iVtvn+wlAyrHhx YKBrJoXtc3j/ScnSwUkG1eDWDPgv6V/i5xuXn5ZNWNzw1g429eM4FRdkptAW9RbJtMbq RBbA== X-Forwarded-Encrypted: i=1; AJvYcCVCj9mqm/C+P/d1YeVe1pp79IAuPLvsRiMuVX0byoO7/+YtQz/8tVAfB98R8U/acgbEK2A00YMFaR/XBEU=@vger.kernel.org X-Gm-Message-State: AOJu0YwjZAAfgs+Eh+gDp5tlZbDPAypNSoTi8+/zSEPPXtwZWtRQQnpt pi6nIPocCmDqLWXCCVxrekAPeoulkGUkGxYbE/Pktvv3GIeZmtgidZHpU4XeRwo= X-Gm-Gg: ASbGncsE9adNix7kljtAVI7KiaWmqIZPMRl2XHYnWzO6UDTcyzqgRmda0TTrqYPT3eE KxScWJfNAOoApptTKmXqGF6PJDFgT4GkMTNLIwsjKn+gJuODBskNENEqnMwPvyPW+aC3Pg1FmpN U6PnErbTRR0DmOzbsCBibBASynBySHB0S6TQOpiTaJrcnMPUFh7ZrJWhDy6YcVR21IR8uzQzFdL 45vbijM1iUAD6D+TwXW4QH4/QqOuvaBbXeROIqEYzQSj79lBxYq/XrqRbSsk88aRdPjAKT71jI= X-Google-Smtp-Source: AGHT+IGlwwb4e96GC3+aYqBtTROSCIq8Pg/cuyX2Y7hSsVpWrUsvZ7zFbGaiNu57DfMuy8AKzn3FxQ== X-Received: by 2002:a17:902:e5ce:b0:215:8ca3:3bac with SMTP id d9443c01a7336-21a83f4e46fmr263494635ad.16.1736753465763; Sun, 12 Jan 2025 23:31:05 -0800 (PST) Received: from n37-019-243.byted.org ([115.190.40.11]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-21a9f10e2c6sm47390875ad.33.2025.01.12.23.31.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 12 Jan 2025 23:31:05 -0800 (PST) From: Chuyi Zhou To: mingo@redhat.com, peterz@infradead.org, juri.lelli@redhat.com, vincent.guittot@linaro.org, dietmar.eggemann@arm.com, rostedt@goodmis.org, bsegall@google.com, mgorman@suse.de, vschneid@redhat.com, longman@redhat.com, riel@surriel.com Cc: chengming.zhou@linux.dev, kprateek.nayak@amd.com, linux-kernel@vger.kernel.org, Chuyi Zhou , Madadi Vineeth Reddy Subject: [PATCH v3 1/3] sched/fair: Remove unused task_numa_migrate return value Date: Mon, 13 Jan 2025 15:30:48 +0800 Message-Id: <20250113073050.2811925-2-zhouchuyi@bytedance.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20250113073050.2811925-1-zhouchuyi@bytedance.com> References: <20250113073050.2811925-1-zhouchuyi@bytedance.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Initial NUMA Balancing implementation used the return value of task_numa_migrate() to retry NUMA Balancing in commit 6b9a7460b6ba ("sched/numa: Retry migration of tasks to CPU on a preferred node") however in the same series[1], Mel also included an optimization from Rik which retried NUMA Balancing periodically irrespective the return value from task_numa_migrate() in commit 2739d3eef3a9 ("sched/numa: Retry task_numa_migrate() periodically"). The return value of task_numa_migrate now is unused, remove it. [1] https://lore.kernel.org/all/1381141781-10992-34-git-send-email-mgorman@= suse.de/ Reviewed-by: K Prateek Nayak Reviewed-by: Madadi Vineeth Reddy Signed-off-by: Chuyi Zhou --- kernel/sched/fair.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index d5127d9beaea..f544012b9320 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -2486,7 +2486,7 @@ static void task_numa_find_cpu(struct task_numa_env *= env, } } =20 -static int task_numa_migrate(struct task_struct *p) +static void task_numa_migrate(struct task_struct *p) { struct task_numa_env env =3D { .p =3D p, @@ -2531,7 +2531,7 @@ static int task_numa_migrate(struct task_struct *p) */ if (unlikely(!sd)) { sched_setnuma(p, task_node(p)); - return -EINVAL; + return; } =20 env.dst_nid =3D p->numa_preferred_nid; @@ -2600,7 +2600,7 @@ static int task_numa_migrate(struct task_struct *p) /* No better CPU than the current one was found. */ if (env.best_cpu =3D=3D -1) { trace_sched_stick_numa(p, env.src_cpu, NULL, -1); - return -EAGAIN; + return; } =20 best_rq =3D cpu_rq(env.best_cpu); @@ -2609,7 +2609,7 @@ static int task_numa_migrate(struct task_struct *p) WRITE_ONCE(best_rq->numa_migrate_on, 0); if (ret !=3D 0) trace_sched_stick_numa(p, env.src_cpu, NULL, env.best_cpu); - return ret; + return; } =20 ret =3D migrate_swap(p, env.best_task, env.best_cpu, env.src_cpu); @@ -2618,7 +2618,6 @@ static int task_numa_migrate(struct task_struct *p) if (ret !=3D 0) trace_sched_stick_numa(p, env.src_cpu, env.best_task, env.best_cpu); put_task_struct(env.best_task); - return ret; } =20 /* Attempt to migrate a task to a CPU on the preferred node. */ --=20 2.20.1