Received: by 2002:ab2:7a55:0:b0:1f4:4a7d:290d with SMTP id u21csp616330lqp; Fri, 5 Apr 2024 04:04:52 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWVuUvwwws5VjnCslIKygFdeS+RwJYnRBMy8/WetJjMe6ZP4eS3o/ViWHu0KkLN1F3F/fl+r/6fWcwOdxXjkNGJy7ENHnDgKAOByyLv6w== X-Google-Smtp-Source: AGHT+IEEpcwcf8zq2W/FY8suQWjBPiLEWy2YVDBpdRiBDzXqaNn83oJKb0aU3AuKYPIGylSD8N9A X-Received: by 2002:a05:6a20:244c:b0:1a7:4823:8efc with SMTP id t12-20020a056a20244c00b001a748238efcmr36941pzc.57.1712315092581; Fri, 05 Apr 2024 04:04:52 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712315092; cv=pass; d=google.com; s=arc-20160816; b=MRJTw5hRxwOQ87+VTCP+dnRYnxiCrowIJmNzM0eWG3HfIYvvtrS0ie4AFkPcY0PqHw CI8vjXFr9Sj/16IPLP9sIK38RAqo+Pq7bDWkid55ubriOLAdkqqoTsP9NXFfCz8SFpJz JmktdM7VbA9hnsDGRMfvXP8Y7xCNU8EoZaHnGUsrPBvFbosf4NdKlRx1DeyI6wWw4gNw cL5KeB8s5WNFQFPqD93L+Dv+ecywWgkKfnLgerRVFbwi2sm4cLylheN1S1xnEWIQ4Uhq umCSyCxN3DraBblrRr+loeWktJHsvpVGmWyQFYnoihadQXYTBao9HcPUEFhsKJi4pnhq n/8g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:subject:cc:to:from:date:user-agent:message-id :dkim-signature; bh=Y5Ccj0++8TjNxyCdrumDAmasoET46Cckf/W1eeLKY0g=; fh=3eU22lworbfn3SW0+3NlbIyHftl34KjRA7Qmky/3j80=; b=eooa5Q8uSRXUr0b98Ojpe+hQ7eQbuu6JASNcn5G+5lWWcBr3rkjV4WiT8g+bjs4Qe5 gUsit1O4lzxok4lMptzhA7Kmk6CBXOgKIEmHXcB9BS3n6w0MDxFJQA775rfocSCiUKst ja40ndz5Dy+BKALpHsX83AjRK4fivehEWjLZqH9hXJg0iyGU4gJZpBKWzifhqi7agJnN WILoNRZ5MDVZFT3kwhQoneLYvr6UbOjgH4XU3xgByLvQ725MERLw6qj0PQ9fAwQeJ7ih 2yQJHBKu5PxN2oEHQVWvD3u2Z9SyGFcRJuhBhE7owrf3E90Oo94yTzpbwzmrxjL83NRT 0xRg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=q+YbpgwB; arc=pass (i=1 dkim=pass dkdomain=infradead.org); spf=pass (google.com: domain of linux-kernel+bounces-132878-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-132878-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id x53-20020a056a000bf500b006ead4e87791si1191742pfu.6.2024.04.05.04.04.52 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Apr 2024 04:04:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-132878-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=q+YbpgwB; arc=pass (i=1 dkim=pass dkdomain=infradead.org); spf=pass (google.com: domain of linux-kernel+bounces-132878-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-132878-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 715112855ED for ; Fri, 5 Apr 2024 11:04:44 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 77D7716C6AE; Fri, 5 Apr 2024 11:04:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="q+YbpgwB" Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D2F3216C442 for ; Fri, 5 Apr 2024 11:04:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=90.155.50.34 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712315046; cv=none; b=KNMAB4z31rPQaP3aDT6VJrudK2wu8mL0XhlFA+iewUvwdmeA/vIsxxb9EYZOaORNSw0B6PLQKoT1VlLf25J7+t7R76L8JZyeO1FbpNJaiSlOmcWRNfoJD1edOR/H5IyDzcE0XUhATiGViQ9+K9gFzdzg0Tg0E4/VmNCaYxFAqxk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712315046; c=relaxed/simple; bh=itOTK8ClA+pTJ/B6S2TzJ7Aj4zf26Rg68UHzyKxe108=; h=Message-Id:Date:From:To:Cc:Subject:References:MIME-Version: Content-Type; b=Om+Uc7LikTglyvvTAjwX9wcqPk4W89CWBujm/4/NIo75AC9qG1OzKTbt6zmB3mWOAY7S20r1qfJ+M1d2tcxYi9kGiHEJj31KYYQb84TbwktMgmoyOsjxtCF0w3q1mTL2A5No6peX4k5T2afZGeNZFSuj2z3PVMRWsZ4e4nhgGNU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org; spf=none smtp.mailfrom=infradead.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b=q+YbpgwB; arc=none smtp.client-ip=90.155.50.34 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Type:MIME-Version:References: Subject:Cc:To:From:Date:Message-Id:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:In-Reply-To; bh=Y5Ccj0++8TjNxyCdrumDAmasoET46Cckf/W1eeLKY0g=; b=q+YbpgwB0Ma1uMhNzTymsNxd9j fot2skru4PqQsb0A+tgQoa5EMNmktXZV7GLTq5KDm8ol3V7u/0oTKcmAbaRUQCT1nvUXyNig4WmLT sU6Bb8dB05frgGLOXwoB2oYKcE/cmfcryUGBzMeBu844xf/S7QBSkYrEEQwctI4BTuERtstKFmysd KMVn4rg9V8LNTzm9I+FpWBMUfzKGyboKqXvlXQu605LE7gtGso0QOFOHBnQ1hp9k2CSXEzwPiJVUM HBhJL/fAVeszSGrOuyN+HssIzsAZy7eY0TAmtGjJrN/TBb/j6iDR81lq/tS7hSLI/mg5QqQtO6oSh vPX6Ep5A==; Received: from j130084.upc-j.chello.nl ([24.132.130.84] helo=noisy.programming.kicks-ass.net) by casper.infradead.org with esmtpsa (Exim 4.97.1 #2 (Red Hat Linux)) id 1rshMG-0000000AKMK-3lJ9; Fri, 05 Apr 2024 11:03:45 +0000 Received: by noisy.programming.kicks-ass.net (Postfix, from userid 0) id 8A62530243A; Fri, 5 Apr 2024 13:03:44 +0200 (CEST) Message-Id: <20240405110010.129481249@infradead.org> User-Agent: quilt/0.65 Date: Fri, 05 Apr 2024 12:27:58 +0200 From: Peter Zijlstra 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, bristot@redhat.com, vschneid@redhat.com, linux-kernel@vger.kernel.org Cc: kprateek.nayak@amd.com, wuyun.abel@bytedance.com, tglx@linutronix.de, efault@gmx.de Subject: [RFC][PATCH 04/10] sched/fair: Cleanup pick_task_fair()s curr References: <20240405102754.435410987@infradead.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 With 4c456c9ad334 ("sched/fair: Remove unused 'curr' argument from pick_next_entity()") curr is no longer being used, so no point in clearing it. Signed-off-by: Peter Zijlstra (Intel) --- kernel/sched/fair.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -8427,15 +8427,9 @@ static struct task_struct *pick_task_fai return NULL; do { - struct sched_entity *curr = cfs_rq->curr; - /* When we pick for a remote RQ, we'll not have done put_prev_entity() */ - if (curr) { - if (curr->on_rq) - update_curr(cfs_rq); - else - curr = NULL; - } + if (cfs_rq->curr && cfs_rq->curr->on_rq) + update_curr(cfs_rq); if (unlikely(check_cfs_rq_runtime(cfs_rq))) goto again;