From patchwork Wed Sep 26 16:00:27 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Matthew Wilcox (Oracle)" X-Patchwork-Id: 10617539 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 0D8BE14BD for ; Thu, 27 Sep 2018 07:28:51 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EAA242AF31 for ; Thu, 27 Sep 2018 07:28:50 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DEB172AF36; Thu, 27 Sep 2018 07:28:50 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id A84EA2AF31 for ; Thu, 27 Sep 2018 07:28:50 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id B8E5A6E520; Thu, 27 Sep 2018 07:28:43 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) by gabe.freedesktop.org (Postfix) with ESMTPS id 8166C891D9 for ; Wed, 26 Sep 2018 16:00:36 +0000 (UTC) Received: from willy by bombadil.infradead.org with local (Exim 4.90_1 #2 (Red Hat Linux)) id 1g5CEt-0004EB-7r; Wed, 26 Sep 2018 16:00:35 +0000 From: Matthew Wilcox To: David Airlie , Gerd Hoffmann Subject: [PATCH 0/4] Improve virtio ID allocation Date: Wed, 26 Sep 2018 09:00:27 -0700 Message-Id: <20180926160031.15721-1-willy@infradead.org> X-Mailer: git-send-email 2.14.4 X-Mailman-Approved-At: Thu, 27 Sep 2018 07:27:59 +0000 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Matthew Wilcox , virtualization@lists.linux-foundation.org MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP I noticed you were using IDRs where you could be using the more efficient IDAs, then while fixing that I noticed the lack of error handling, and I decided to follow that up with an efficiency improvement. There's probably a v2 of this to follow because I couldn't figure out how to properly handle one of the error cases ... see the comment embedded in one of the patches. Matthew Wilcox (4): drm/virtio: Replace IDRs with IDAs drm/virtio: Handle context ID allocation errors drm/virtio: Handle object ID allocation errors drm/virtio: Use IDAs more efficiently drivers/gpu/drm/virtio/virtgpu_drv.h | 9 ++--- drivers/gpu/drm/virtio/virtgpu_fb.c | 10 ++++-- drivers/gpu/drm/virtio/virtgpu_gem.c | 10 ++++-- drivers/gpu/drm/virtio/virtgpu_ioctl.c | 5 ++- drivers/gpu/drm/virtio/virtgpu_kms.c | 46 +++++++++----------------- drivers/gpu/drm/virtio/virtgpu_vq.c | 19 ++++------- 6 files changed, 44 insertions(+), 55 deletions(-)