Received: by 10.213.65.68 with SMTP id h4csp578168imn; Fri, 6 Apr 2018 05:37:38 -0700 (PDT) X-Google-Smtp-Source: AIpwx48fE+o+BnVF7c/By4mDmS1sNWmVEI6ttRxyav5IpqhB0y7uNo/PRTHpbZ6iofnPIrYMJIvQ X-Received: by 2002:a17:902:848c:: with SMTP id c12-v6mr5548596plo.316.1523018258771; Fri, 06 Apr 2018 05:37:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523018258; cv=none; d=google.com; s=arc-20160816; b=Fbj3NLJvXiKTKzWN9cIq2nnszgOBmBYVzx1LJMFQwYeLAW72hi9dkSSsLcBcrX9854 ROrJuV/arQOGUSO2v0bmNQ7t/QsCUa8C5VVwg10phy2ftyClQ6h2y+TAuyJ58kNG7uDU LPXlLOVJsttL0RKSBbvQl0U9FQpkskaI9GpGBl/jBYE7nmIqv7SYWzA4cspsoy90ypG3 eQtMj/NQUURQykF9Kf+sYxsJMsCb3Gtb4+ON2hDzwVRQh+kX3d1Iv9Rtu3nhAM4NPDrL 5CN/RyCoCVZN8TEy4XtgKKl/8+29FsEzhmYoM1mgP7wkwvl1cFuIAQJPMm6cj9ZiS5PV 9lHA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature :arc-authentication-results; bh=JsKnBmrwxL6fJMtImhn6/dDU9bd07BeRwR3Lig1jvfc=; b=xXcsL3MUZa1uJjBvXKP1a1pnLwSpCXfrIAbFPDl0NMRKqzC0iJ0aCBxc9RYSFTPWRU JzyMhsCpMG52x0ZoyZKoR+TdmmHyB2NKYtaNTcgTS7LfSh9Y9p4HWdAhdocrlR8btpKL pUQISRkuSDXlJ+S4p1KSG2W2wcgRB9Gt1yqjygRZRaGtjfHfYotardIA8m7X142nrEXs DTrGGsGxlLNDjJ1rzwRWEg4Gj+WZ2y+T6lNXKg050pZKUa7rCbnYU6edmjYLhGxiARRA F5ww6Wwyt+MHegH3rZA/fKRmvdI5qBgczV6eG2Fduh3k6nCNG0La+LAy0YfXBLnGUcbw iymA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=JIkAmbir; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 206si7204794pgh.629.2018.04.06.05.37.24; Fri, 06 Apr 2018 05:37:38 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=JIkAmbir; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752479AbeDFMgJ (ORCPT + 99 others); Fri, 6 Apr 2018 08:36:09 -0400 Received: from mail-lf0-f51.google.com ([209.85.215.51]:33792 "EHLO mail-lf0-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752021AbeDFMgH (ORCPT ); Fri, 6 Apr 2018 08:36:07 -0400 Received: by mail-lf0-f51.google.com with SMTP id c78-v6so328686lfh.1; Fri, 06 Apr 2018 05:36:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding:content-language; bh=JsKnBmrwxL6fJMtImhn6/dDU9bd07BeRwR3Lig1jvfc=; b=JIkAmbirD2oVocVwb0YUzyl5g9RjV4PwvVkyozXxrh+RcNL3kRmGkaxQUDSXH5zJnP wZ8Nja2w8ADvLaFHM8pw1xDjJZTOHrh3b1JdcxFrzYBPAWcsZdCT1N1GT4Jmsoq6t1LK GA1Z/kx31XvQZhm4w4I7jEOJTfhLTPCu/tJTa4LKEWq5+wpfn5N64/qg8MUNNvWyn/a7 QZ3ZyOuiLTDTO1JjT2qWgs6noUXfTFbQeJmlm8f5EE57nujIhq6Rcd73x2WGRAvQPtZa 1AEmOW6L994wrL/EaZMlrUH9WTuIFRanljnF6gykdlgrW93kQ/BnGQb3yBu3PI7hxOXp j4TQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=JsKnBmrwxL6fJMtImhn6/dDU9bd07BeRwR3Lig1jvfc=; b=l0tBC0LsmIiNPn5UCwL7IRcVOQIi0osDhWZQTcsB8FkB9K0s0qWA5PZflVoHYQ5la3 BA3Cq0V/Bh31rHl4h1f0Ts6YxmZYgt4fLl/+4spk0nzBpVoKGYoNR8Hu7FKppNWrJgkt qTFKsrEgGs7MT5IN1XE4LRYVNmgSEA0JWxzNfZJzjp+NMhVG6hRISdTonsPXsBuip+mx 6Eg5NCaEqlxitKL5+EfAl5fDN0SNLRFqRTNd3V48Q2NXB8F20BttvIPl0MVdZuEnCIcq 4sfl/LQSdD7in2Fs5kVEmB7kwz+lCoE+7nf0fd9F7Jd+9EWyWxJdKeIchszr8oxsKcKD p3gw== X-Gm-Message-State: ALQs6tCXkDw1iPpBpH/R20WolMI9dahBCKXP/9+8Yb3oQIEZR5ci4/PH BX0+/fdwS673t2c7labynms= X-Received: by 10.46.137.203 with SMTP id c11mr16708031ljk.61.1523018165531; Fri, 06 Apr 2018 05:36:05 -0700 (PDT) Received: from [10.17.182.9] (ll-56.209.223.85.sovam.net.ua. [85.223.209.56]) by smtp.gmail.com with ESMTPSA id g64sm1787229ljf.69.2018.04.06.05.36.04 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 06 Apr 2018 05:36:04 -0700 (PDT) Subject: Re: [RfC PATCH] Add udmabuf misc device To: Gerd Hoffmann Cc: Oleksandr Andrushchenko , Dongwon Kim , Tomeu Vizoso , David Airlie , open list , dri-devel , qemu-devel@nongnu.org, "moderated list:DMA BUFFER SHARING FRAMEWORK" , "open list:DMA BUFFER SHARING FRAMEWORK" , Matt Roper References: <20180313154826.20436-1-kraxel@redhat.com> <20180313161035.GL4788@phenom.ffwll.local> <20180314080301.366zycak3whqvvqx@sirius.home.kraxel.org> <20180406001117.GD31612@mdroper-desk.amr.corp.intel.com> <2411d2c1-33c0-2ba5-67ea-3bb9af5d5ec9@epam.com> <20180406090747.gwiegu22z4noj23i@sirius.home.kraxel.org> <9a085854-3758-1500-9971-806c611cb54f@gmail.com> <20180406115730.jtwcbz5okrphlxli@sirius.home.kraxel.org> From: Oleksandr Andrushchenko Message-ID: <7ef89a29-6584-d23c-efd1-f30d9b767a24@gmail.com> Date: Fri, 6 Apr 2018 15:36:03 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <20180406115730.jtwcbz5okrphlxli@sirius.home.kraxel.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 04/06/2018 02:57 PM, Gerd Hoffmann wrote: > Hi, > >>> I fail to see any common ground for xen-zcopy and udmabuf ... >> Does the above mean you can assume that xen-zcopy and udmabuf >> can co-exist as two different solutions? > Well, udmabuf route isn't fully clear yet, but yes. > > See also gvt (intel vgpu), where the hypervisor interface is abstracted > away into a separate kernel modules even though most of the actual vgpu > emulation code is common. Thank you for your input, I'm just trying to figure out which of the three z-copy solutions intersect and how much >> And what about hyper-dmabuf? > No idea, didn't look at it in detail. > > Looks pretty complex from a distant view. Maybe because it tries to > build a communication framework using dma-bufs instead of a simple > dma-buf passing mechanism. Yes, I am looking at it now, trying to figure out the full story and its implementation. BTW, Intel guys were about to share some test application for hyper-dmabuf, maybe I have missed one. It could probably better explain the use-cases and the complexity they have in hyper-dmabuf. > > Like xen-zcopy it seems to depend on the idea that the hypervisor > manages all memory it is easy for guests to share pages with the help of > the hypervisor. So, for xen-zcopy we were not trying to make it generic, it just solves display (dumb) zero-copying use-cases for Xen. We implemented it as a DRM helper driver because we can't see any other use-cases as of now. For example, we also have Xen para-virtualized sound driver, but its buffer memory usage is not comparable to what display wants and it works somewhat differently (e.g. there is no "frame done" event, so one can't tell when the sound buffer can be "flipped"). At the same time, we do not use virtio-gpu, so this could probably be one more candidate for shared dma-bufs some day. > Which simply isn't the case on kvm. > > hyper-dmabuf and xen-zcopy could maybe share code, or hyper-dmabuf build > on top of xen-zcopy. Hm, I can imagine that: xen-zcopy could be a library code for hyper-dmabuf in terms of implementing all that page sharing fun in multiple directions, e.g. Host->Guest, Guest->Host, Guest<->Guest. But I'll let Matt and Dongwon to comment on that. > > cheers, > Gerd > Thank you, Oleksandr P.S. Sorry for making your original mail thread to discuss things much broader than your RFC...