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 gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (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 95DBFCFB44F for ; Mon, 7 Oct 2024 17:52:28 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id EAA3110E3F1; Mon, 7 Oct 2024 17:52:27 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="t+3U/Ho2"; dkim-atps=neutral Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by gabe.freedesktop.org (Postfix) with ESMTPS id 2D3CB10E3F2 for ; Mon, 7 Oct 2024 17:52:26 +0000 (UTC) Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id D34A75C55F9; Mon, 7 Oct 2024 17:52:20 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 665E4C4CEC6; Mon, 7 Oct 2024 17:52:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1728323544; bh=VKNB4XBcfhiBgluEKG+Mul6VTYbXbhUMQSR4/m5WxFs=; h=Subject:To:Cc:From:Date:From; b=t+3U/Ho2++BxiyvWibFGd5O9ktOetHKPJkoTViI18BLn6MlfbulXl3ic6Axjlp4kX v05OB8rUe5Y6ilBPbjyesL/gTsPUuTxnQcRP4RhpvvVkz6Qy9770rpduSNt+ola+iH zkJyxzPi08T4KpdsKLTWQRj9hrG5q7lMb22ZsLCc= Subject: Patch "drm/sched: Always increment correct scheduler score" has been added to the 6.11-stable tree To: airlied@gmail.com, christian.koenig@amd.com, daniel@ffwll.ch, dri-devel@lists.freedesktop.org, gregkh@linuxfoundation.org, ltuikov89@gmail.com, matthew.brost@intel.com, nirmoy.das@amd.com, nirmoy.das@intel.com, tvrtko.ursulin@igalia.com Cc: From: Date: Mon, 07 Oct 2024 19:51:06 +0200 Message-ID: <2024100705-hatchback-collapse-e418@gregkh> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-stable: commit X-Patchwork-Hint: ignore X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" This is a note to let you know that I've just added the patch titled drm/sched: Always increment correct scheduler score to the 6.11-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: drm-sched-always-increment-correct-scheduler-score.patch and it can be found in the queue-6.11 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let know about it. >From 087913e0ba2b3b9d7ccbafb2acf5dab9e35ae1d5 Mon Sep 17 00:00:00 2001 From: Tvrtko Ursulin Date: Tue, 24 Sep 2024 11:19:09 +0100 Subject: drm/sched: Always increment correct scheduler score MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From: Tvrtko Ursulin commit 087913e0ba2b3b9d7ccbafb2acf5dab9e35ae1d5 upstream. Entities run queue can change during drm_sched_entity_push_job() so make sure to update the score consistently. Signed-off-by: Tvrtko Ursulin Fixes: d41a39dda140 ("drm/scheduler: improve job distribution with multiple queues") Cc: Nirmoy Das Cc: Christian König Cc: Luben Tuikov Cc: Matthew Brost Cc: David Airlie Cc: Daniel Vetter Cc: dri-devel@lists.freedesktop.org Cc: # v5.9+ Reviewed-by: Christian König Reviewed-by: Nirmoy Das Link: https://patchwork.freedesktop.org/patch/msgid/20240924101914.2713-4-tursulin@igalia.com Signed-off-by: Christian König Signed-off-by: Greg Kroah-Hartman --- drivers/gpu/drm/scheduler/sched_entity.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/gpu/drm/scheduler/sched_entity.c +++ b/drivers/gpu/drm/scheduler/sched_entity.c @@ -586,7 +586,6 @@ void drm_sched_entity_push_job(struct dr ktime_t submit_ts; trace_drm_sched_job(sched_job, entity); - atomic_inc(entity->rq->sched->score); WRITE_ONCE(entity->last_user, current->group_leader); /* @@ -614,6 +613,7 @@ void drm_sched_entity_push_job(struct dr rq = entity->rq; sched = rq->sched; + atomic_inc(sched->score); drm_sched_rq_add_entity(rq, entity); spin_unlock(&entity->rq_lock); Patches currently in stable-queue which might be from tvrtko.ursulin@igalia.com are queue-6.11/drm-sched-always-increment-correct-scheduler-score.patch queue-6.11/drm-v3d-prevent-out-of-bounds-access-in-performance-query-extensions.patch queue-6.11/drm-sched-always-wake-up-correct-scheduler-in-drm_sched_entity_push_job.patch queue-6.11/drm-sched-add-locking-to-drm_sched_entity_modify_sched.patch