Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp3105859ybi; Fri, 5 Jul 2019 02:01:53 -0700 (PDT) X-Google-Smtp-Source: APXvYqw3rh/9rq2iFIGJHBB9jp0s69MKTtLWtWTdUKDDEc21Y+ozOaerLODWydJmIM0RehX1C7Bu X-Received: by 2002:a17:90a:a404:: with SMTP id y4mr4048396pjp.58.1562317313801; Fri, 05 Jul 2019 02:01:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562317313; cv=none; d=google.com; s=arc-20160816; b=NjiDysLo2aYWME4FWyoBVNItTcnwpR54ltO3Zpauh3W0e3WHG2JltwJrrt4ENvQJ+2 XFCr0k4XeF7VkIVDUTeDYZibf0cclp+n3XwPgcvmdflwlRF2zattXOw5Mb3phyyEuUNj 8n4sh3CCjgRuW7hu0hxm7Mtazwhr7iykmKcKvfkyDQ3VnWYW9XzLhAEKikXtYuZDxjDb mp3WD7xi+CYZjbDpakic4InxOEl56xEFCgS8GMvnBIb61HCORTRLXgGNNi1ClWPkAw3S wV4waQPuAIXfhJKeXlrvI6dXGTJKGb8c+RAsIciGXzASKXeYscDG/+O4tDyet9MCjcZf Askw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=JFi0mT16KAB9wDJ1xSWlcfjrqudwTvIUXYmV3vgSWnY=; b=zoM8/7uQcbrqtYCxdjcAbncziHSbIpO0GqZwM6V5D4sbJ1PXZWNfooeGDolxl+s+7H bXb1xZoWlbSE7c/bOTyjjWbvh8Hh/n5BQbDivB2hTYRR+XTc/2udzgJcqgk2VrIeHqv6 2T8Syy9xyrSa7QkBF96ydjQADgN3flIunWRGeHiw3zhO+XrD+/TjuuyqrEcLAnI0RIdh v742Ni3C4O/emv64apMnmrCn6e1Cy5rVDuInKkgA5WVDgQPnYasp3UGqRMrTIXAr/UWZ x1fJgZJ36NWalZntmYJ53terQseY+yYnopCuKGZXvxfn05KsQgkMbbgh9YMXr84NkCMa iCrg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m99si7734357pjb.107.2019.07.05.02.01.37; Fri, 05 Jul 2019 02:01:53 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728063AbfGEJBR (ORCPT + 99 others); Fri, 5 Jul 2019 05:01:17 -0400 Received: from mx1.redhat.com ([209.132.183.28]:54140 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727982AbfGEJBR (ORCPT ); Fri, 5 Jul 2019 05:01:17 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id A75A03092661; Fri, 5 Jul 2019 09:01:11 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-116-90.ams2.redhat.com [10.36.116.90]) by smtp.corp.redhat.com (Postfix) with ESMTP id 0B3E79D8E9; Fri, 5 Jul 2019 09:01:08 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id C971E16E32; Fri, 5 Jul 2019 11:01:05 +0200 (CEST) Date: Fri, 5 Jul 2019 11:01:05 +0200 From: Gerd Hoffmann To: Chia-I Wu Cc: ML dri-devel , Gurchetan Singh , David Airlie , Daniel Vetter , "open list:VIRTIO GPU DRIVER" , open list Subject: Re: [PATCH v6 14/18] drm/virtio: rework virtio_gpu_transfer_from_host_ioctl fencing Message-ID: <20190705090105.5ivc4gqgbyczwtpo@sirius.home.kraxel.org> References: <20190702141903.1131-1-kraxel@redhat.com> <20190702141903.1131-15-kraxel@redhat.com> <20190704114756.eavkszsgsyymns3m@sirius.home.kraxel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20180716 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.43]); Fri, 05 Jul 2019 09:01:16 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jul 04, 2019 at 11:55:59AM -0700, Chia-I Wu wrote: > On Thu, Jul 4, 2019 at 4:48 AM Gerd Hoffmann wrote: > > > > On Wed, Jul 03, 2019 at 01:05:12PM -0700, Chia-I Wu wrote: > > > On Tue, Jul 2, 2019 at 7:19 AM Gerd Hoffmann wrote: > > > > > > > > Switch to the virtio_gpu_array_* helper workflow. > > > (just repeating my question on patch 6) > > > > > > Does this fix the obj refcount issue? When was the issue introduced? > > > > obj refcount should be fine in both old and new code. > > > > old code: > > drm_gem_object_lookup > > drm_gem_object_put_unlocked > > > > new code: > > virtio_gpu_array_from_handles > > virtio_gpu_array_put_free (in virtio_gpu_dequeue_ctrl_func). > > > > Or did I miss something? > In the old code, drm_gem_object_put_unlocked is called before the vbuf > using the object is retired. Isn't that what object array wants to > fix? I think the fence keeps the bo alive. cheers, Gerd