Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp1144689ybk; Thu, 14 May 2020 01:21:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy0c7w8R4IX2t3jczaN6XUx84ITkt7zNwq536f9Vqi9Ti82POVjYJBo5juKj2Mg9Ve0SNJm X-Received: by 2002:a05:6402:1adc:: with SMTP id ba28mr2941196edb.336.1589444499813; Thu, 14 May 2020 01:21:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589444499; cv=none; d=google.com; s=arc-20160816; b=SCs79Oyu3jyHR6iCbBayHjR82578t6ttmn+nLnF41eV8vgUhUSAHoX96J7sV9zjnlC foeCwHP1zE0NAOH0OgoB1EHsgXmocIZIFJq9djLK5e7NjfRbhGiNKDEEcc/LXmTDefEC xffkg25MNaD8mF7H5dpace/K7V5h5sQ0FIAgwpnWAnEaFQmTx3UNhebU/5XufwbTRMcG 1xqmpyxaaJSNNK/k6/yJYhK19WY7XXI+m78SozLxhzRagyugrrbsRtpLzmQi+vDQ2WuI 4WneLQp/cArIWmXvbSZJ/JR9USshAuDistrtTZwnX5+Ms/RNJ6UI5pCuWEpeW4ycKeny A4mg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=nV+pjnxNzhUaIVaL0d+Q+czgaVh94PJJNBtyQf89HuA=; b=m11SgH7gaoAgwiaKOdsyWpnDtNmlFTdrSUTHwAxS6F3bVXafEypPVgSBYb3rCzcWQH 5WwGajYF8N2LSMptJdKV2vLGf4JTB6ZnOgWDIIYOhwZZ/cXvRyQjdu44iK7nbDEogJf6 yw9wtyAZUKU4eWydJSQDgZ7DLpao7bk33zyiICr5U8Knws16cAP1LdFYu/Aik/Tmoh2+ lI3Vb6RNAKizTN7VmyOmDrn3swjfyV+pqt9E++gjZAmjgk1C5hRN2xeEFgWMH/vFKt9D 05yAYZBjLs4RFJ+cahwqF1VS6mGWC0qUFgUEcedNKSu87taNDujYTkVASEghz5u4EH/5 H4wA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=bwqQu7ds; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j14si757242ejy.206.2020.05.14.01.21.16; Thu, 14 May 2020 01:21:39 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=bwqQu7ds; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726015AbgENITw (ORCPT + 99 others); Thu, 14 May 2020 04:19:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34066 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1725886AbgENITw (ORCPT ); Thu, 14 May 2020 04:19:52 -0400 Received: from mail-qt1-x843.google.com (mail-qt1-x843.google.com [IPv6:2607:f8b0:4864:20::843]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 32884C061A0C for ; Thu, 14 May 2020 01:19:52 -0700 (PDT) Received: by mail-qt1-x843.google.com with SMTP id i68so2167941qtb.5 for ; Thu, 14 May 2020 01:19:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=nV+pjnxNzhUaIVaL0d+Q+czgaVh94PJJNBtyQf89HuA=; b=bwqQu7dsz6fMq5SL+sSD61OzDG6vFt+sG+Dtmn2KHQEXyvruCjQJRVMO0rcUkWbR4U 3sBG2XIUE/tDcJxqlcxCKRZwVtTGXiqQqrz1W1j1VCo+pamFrLGrbNEVowY6fZeWz3dF lP8o4i0KqfUWhOHYFoa1pol4Wf7ScVyeR1jFc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=nV+pjnxNzhUaIVaL0d+Q+czgaVh94PJJNBtyQf89HuA=; b=VaP2IaH2r0Y+A56nKnoRifU+sVUVfnrRPuAqw0KKHXdYt6EzgHB7poD/bFAcdHJceJ U31wftiFR3ejJXRqOu4ahRPJQc0Fv7GF1+kLg7UzdM7m+1u6SVHAmxQNK4k0QOnNUjql S0X+V1HTcUOtuGIYEq+YArY/W7004MVMlkIenhYCSexmwRTU4NcALizoV1eSJNZIOzHS CqwvOF9KMAY23e/vZ84FBnLmRYUcK50ALannaXWxgvEU7A2VMg1weWpbxnNhpTWcgUAp qpW6SdihO2QB/NojEXtsOPqs84P26P6GrTdUrAFpNKFVF2S+0ME8pq1Sq52Quk9frzFt WHrA== X-Gm-Message-State: AOAM533yRNAQCu/3IAWvms8ZUZXo0pVqcKZnPyrvOOWRoWuqBBSITz8w W7+g650HBXwSnVCF9X1458nDgkPRRKOarAQKeP/NnQ== X-Received: by 2002:aed:24a6:: with SMTP id t35mr3208654qtc.72.1589444391477; Thu, 14 May 2020 01:19:51 -0700 (PDT) MIME-Version: 1.0 References: <20200311112004.47138-1-stevensd@chromium.org> <20200311112004.47138-2-stevensd@chromium.org> In-Reply-To: From: David Stevens Date: Thu, 14 May 2020 17:19:40 +0900 Message-ID: Subject: Re: [PATCH v3 1/4] dma-buf: add support for virtio exported objects To: Daniel Vetter Cc: Tomasz Figa , Gerd Hoffmann , David Airlie , "Michael S . Tsirkin" , Jason Wang , Sumit Semwal , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , Linux Kernel Mailing List , dri-devel , "open list:VIRTIO CORE, NET..." , "open list:DMA BUFFER SHARING FRAMEWORK" , "moderated list:DMA BUFFER SHARING FRAMEWORK" , virtio-dev@lists.oasis-open.org Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Sorry for the duplicate reply, didn't notice this until now. > Just storing > the uuid should be doable (assuming this doesn't change during the > lifetime of the buffer), so no need for a callback. Directly storing the uuid doesn't work that well because of synchronization issues. The uuid needs to be shared between multiple virtio devices with independent command streams, so to prevent races between importing and exporting, the exporting driver can't share the uuid with other drivers until it knows that the device has finished registering the uuid. That requires a round trip to and then back from the device. Using a callback allows the latency from that round trip registration to be hidden. -David