From patchwork Tue Mar 18 15:54:16 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Tvrtko Ursulin X-Patchwork-Id: 14021195 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 BDAEDC35FFA for ; Tue, 18 Mar 2025 15:54:42 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 1634D10E4AE; Tue, 18 Mar 2025 15:54:35 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=igalia.com header.i=@igalia.com header.b="Cn68p0+f"; dkim-atps=neutral Received: from fanzine2.igalia.com (fanzine.igalia.com [178.60.130.6]) by gabe.freedesktop.org (Postfix) with ESMTPS id B253710E1D4 for ; Tue, 18 Mar 2025 15:54:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=igalia.com; s=20170329; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-ID: Date:Subject:Cc:To:From:Sender:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=Az51bzdTOWuH1co+0k7wIPf2e1cgPXZHlJirg9ce5rI=; b=Cn68p0+frzWQ43DW5gcbb99/9A HywLCK4xKQawu/tClfNVex/byIjHcmq2QRwk3kDOytbLkjsy4O5b2kxHOuDbmuUQTBGbTOQtaEqD7 o/pBs67jyD/4ZBJb7is6RrhX3ykt+RCEOOQSGW7Gh4ArEWtntNqFGDlZffzaJ6DSeYXQMyiyTb0No bJJdhosbkxXfaC1Jbhf0iuTk7pBTILBLPpboEqqcZeciJo3AkNseCzJARdunrrGMHraCu4FfUooUy tt7dzuBiJWz63eVWTunuYLsk3uO/c8r9/OSk3WCB4HS7IZlVlpq2CQqm9yYvuv4uwRSAKwczuEf3C y2iOWhJw==; Received: from [90.241.98.187] (helo=localhost) by fanzine2.igalia.com with esmtpsa (Cipher TLS1.3:ECDHE_SECP256R1__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim) id 1tuZGs-002ngQ-7i; Tue, 18 Mar 2025 16:54:26 +0100 From: Tvrtko Ursulin To: dri-devel@lists.freedesktop.org Cc: kernel-dev@igalia.com, Tvrtko Ursulin Subject: [PATCH 0/7] A few drm_syncobj optimisations Date: Tue, 18 Mar 2025 15:54:16 +0000 Message-ID: <20250318155424.78552-1-tvrtko.ursulin@igalia.com> X-Mailer: git-send-email 2.48.0 MIME-Version: 1.0 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" A small set of drm_syncobj optimisations which should make things a tiny bit more efficient on the CPU side of things. Improvement seems to be around 1.5%* more FPS if observed with "vkgears -present-mailbox" on a Steam Deck Plasma desktop, but I am reluctant to make a definitive claim on the numbers since there is some run to run variance. But, as suggested by Michel Dänzer, I did do a five ~100 second runs on the each kernel to be able to show the ministat analysis. x before + after +------------------------------------------------------------+ | x + | | x x + | | x xx ++++ | | x x xx x ++++ | | x xx x xx x+ ++++ | | xxxxx xxxxxx+ ++++ + + | | xxxxxxx xxxxxx+x ++++ +++ | | x xxxxxxxxxxx*xx+* x++++++++ ++ | | x x xxxxxxxxxxxx**x*+*+*++++++++ ++++ + | | xx x xxxxxxxxxx*x****+***+**+++++ ++++++ | |x xxx x xxxxx*x****x***********+*++**+++++++ + + +| | |_______A______| | | |______A_______| | +------------------------------------------------------------+ N Min Max Median Avg Stddev x 135 21697.58 22809.467 22321.396 22307.707 198.75011 + 118 22200.746 23277.09 22661.4 22671.442 192.10609 Difference at 95.0% confidence 363.735 +/- 48.3345 1.63054% +/- 0.216672% (Student's t, pooled s = 195.681) Tvrtko Ursulin (7): drm/syncobj: Remove unhelpful helper drm/syncobj: Do not allocate an array to store zeros when waiting drm/syncobj: Avoid one temporary allocation in drm_syncobj_array_find drm/syncobj: Use put_user in drm_syncobj_query_ioctl drm/syncobj: Avoid temporary allocation in drm_syncobj_timeline_signal_ioctl drm/syncobj: Add a fast path to drm_syncobj_array_wait_timeout drm/syncobj: Add a fast path to drm_syncobj_array_find drivers/gpu/drm/drm_syncobj.c | 281 ++++++++++++++++++---------------- 1 file changed, 147 insertions(+), 134 deletions(-)