From nobody Fri Feb 13 00:20:48 2026 Received: from mail-pl1-f172.google.com (mail-pl1-f172.google.com [209.85.214.172]) (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 111771BBBF1 for ; Fri, 3 Jan 2025 06:59:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.172 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1735887588; cv=none; b=PA7CYR6ynsrOSu6yUZgJVZDbNzyyczmylwX5QOI4B7mq47VlpME3z6Mwt1xaFQWgyaYCmrJW226GX7ZxUBNYC+lfJuSW1Hk1ITH4obG/qOIA6WDpxvvVujJnxQF+M1BpXov1ejWGqePnClj6v4WQIbNwSd2Det8nNzGraEaJn20= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1735887588; c=relaxed/simple; bh=ohLsD+qDL1nmNqxVtGLCqz+g4wP286cVFpWMSMrR9CY=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=IWgO2JZDHvi9plONqaQAUlLH91HxX00qx1ewm/jObaRcKXUfmjPLlUy4P+iFkLaG7U8MEk1XIyYCw1IJtg2e9VbaSSAij6dml07XfyGO7TRMFsvRQQQ3/hvAh4PQ2oiceMc/A/Q3CbG5hBYtUoyNrk+Agj2RRmSqDfdmDvWhSfM= 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=IIptCwA1; arc=none smtp.client-ip=209.85.214.172 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="IIptCwA1" Received: by mail-pl1-f172.google.com with SMTP id d9443c01a7336-2166f1e589cso200987145ad.3 for ; Thu, 02 Jan 2025 22:59:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bytedance.com; s=google; t=1735887585; x=1736492385; 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=MG/wB8SMfVE/PkecyFMpopAK8HOyY3He387122nZY5A=; b=IIptCwA1q+PyQ9+PA3HAW4iR7nYjvJJwXKHNodVTXGGTxd7Wb0G3Utk2jZ3z6G4+wh fyAm+GXkBsPePuSq97EmWqD39d6uHYI7BZa+Yjrs95tqQvBqmOq5A9rOFyS/0K79ACDc tKoZLQI3mUhRgJwjwuln9PD/mcXXI6iTaGxmDbEOEGcD2vk8AEZnZ/i0uAAsHwga9jaS vI8Jx5apgqbewlg6QuAXf6jZHxPgvst5iUeULJSx9gzlZs2pF2xUHM8eDS3XiJZfrMP+ /okum6JQxRkKy0LSZSxrMvQnAzsTBxSDqTSdjyCLeynfrCUvdT1cBKPfQsIRHVU3BKNP +FWQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1735887585; x=1736492385; 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=MG/wB8SMfVE/PkecyFMpopAK8HOyY3He387122nZY5A=; b=bat8Xbh84iUTr8yPL7dXqX7DSrZI9PEvX7lNE4suUWvkABk4Tf1RySUQc8oFXw4VGw Pq+32nLR8SCTlPz14OOT0JiAYuLBj3GB91EmUFIqauRd/2gBSIzXmAMhTagH2quySc0k TLUU6cavsvUEy8RVc74oz4YNga9t4xaU/U4XSHRcEzTCYQt9IsqKfu48evYycrfB4EP7 8Pdhbm3UkND+BGK69HHCmFMlhd+dzFip6atOwo5CLU04QAR4gm3Ew/deiDPnNhzTUOWL SPe2SpHcRIBaOs21fWGSDutFTT/jQSaci3Os51qf+aTyqY5HWWJW4fAcE+o+fF5Y/WbK 1FMQ== X-Forwarded-Encrypted: i=1; AJvYcCV97gIuCubTvWQxdB+idlmpZdloQvYluaG/F4lS1IQrX7BdxrlNVHuN5uNkOZLyo3BYHzWWc4vZuk5mFgs=@vger.kernel.org X-Gm-Message-State: AOJu0YySeMxvODorTwZN070ovIApN3pgN6CNSKgVPp/AZZ1KZbJRbW2z lZeaDpPAuaZnoJbNcWbv7yTluG8L3nIXKqRidDHKIrH0yVREX1lcW3ikk0qbREs= X-Gm-Gg: ASbGncvQ9axrQYDdpNIyrZ4rKL+K+Db3qrlPbsylSX3hMoCal9LlnIgOzigjHdyGA1I F631B7VX/nr7Egl4PIgiaYvu63I+vxYU2zdzn6Irr0zZ4wf3pXbJIp66e1Wn9mW/QHnP+/fEHdP 8UB3YVH63UZy7c7Z15bG9q0HsL8QCXpiTyDQC5lt4/mKsrKUrTN1iLLUATBQPHB/75m+PG/vs40 qLLQ40cI2DpSfsRztTRQJriu0ek84ANSTg1RuftIeJJ1yBjpENvejjg36EgN8Bp/1PYEE00PSUa X-Google-Smtp-Source: AGHT+IF999mstoJn5vli8l6HxkNwCN61AxH9dKX6ZqAJLg0ebPqYXV2E/9K2lskmtu7z8tELFG9qpw== X-Received: by 2002:a17:903:238b:b0:216:644f:bc0e with SMTP id d9443c01a7336-219e6ebc9eamr747205755ad.24.1735887585306; Thu, 02 Jan 2025 22:59:45 -0800 (PST) Received: from n37-019-243.byted.org ([180.184.84.173]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-219dc9631d1sm238456235ad.42.2025.01.02.22.59.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Jan 2025 22:59:45 -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 Subject: [PATCH v2 1/3] sched/fair: Remove unused task_numa_migrate return value Date: Fri, 3 Jan 2025 14:59:28 +0800 Message-Id: <20250103065930.413464-2-zhouchuyi@bytedance.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20250103065930.413464-1-zhouchuyi@bytedance.com> References: <20250103065930.413464-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 Signed-off-by: Chuyi Zhou Reviewed-by: Madadi Vineeth Reddy --- 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