Received: by 10.213.65.68 with SMTP id h4csp434188imn; Fri, 6 Apr 2018 02:53:52 -0700 (PDT) X-Google-Smtp-Source: AIpwx49YSlqHEfjUPfjT5Efru+jO167P7NcLJPElQd4PJvJ6lH4b9FzvSX2LGxH/7Jdw37H5j+bU X-Received: by 10.98.150.75 with SMTP id c72mr19912153pfe.62.1523008432578; Fri, 06 Apr 2018 02:53:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523008432; cv=none; d=google.com; s=arc-20160816; b=erl45Jk30Ay5aQDxqvGVT6baTSA9IBJDcRqj6UG4/z9dut0DXgCPemKSNLpoSpx8E6 26hgnjOiVLXRmOLRGmCjxYXLb6uP4sFgqfT5i5vH/78zo4yOCpNYF/ZqTmASDUsTRwxt HBiqFGAWJ16zryXokix2VV0mwOxxa7jA178QtldCyiCwPGxCKj8pSjbPKB8v3lj9zt8d hbwfxEobKhmWZ15WJ3qcgv6U5Fy7CFGV56WWqLP0v+zGa/6Q+4M1V0k2Xd/d7SI1MyRe ZFC/6Xfg8R5wm9h4/156phfP1IlUY3nZ+bw/kGBNLs+4dk5JS71cWlN07hbI70FeIz3o YvLw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:cc:to:subject :message-id:date:from:references:in-reply-to:mime-version :dkim-signature:arc-authentication-results; bh=VU4iZ8OQMphS73PqpLjMQTfxtZ1jbXT7+qm1sizQrrc=; b=bNOQvHC3ucytJSf6TM/MfnjLTsbG4PbH1NDMAhhZibtSd8tF/yOlbPb6Y7V3Hjearx dTYrBDaCKfWwE+Av3D+3KjGFsDjt3dAMQqTnd2hkxtRb/mN+qUUh2kkNmA0r3iboR21q T1CusQt8Z1CDlU6Ehkl5k7kd56NaowNOIYO13ADFCxqcDr5YjHlUX2FO51PxD1FDvQmT 56xMdWg7NEItNpPYjDtq+//9W0ZHnHzk8TeT5sTBpeu1c8jy66Spe5bYAOC7WheS/mKy MZT0cY5IeXSF7tBogC0j2O/wB1sBKMvXOQS8uKFMHSwHaOef/AaOCvWNvd4Dw5uXZTCu rVJg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@fooishbar-org.20150623.gappssmtp.com header.s=20150623 header.b=bpu44jSk; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f5-v6si8600779plo.410.2018.04.06.02.53.38; Fri, 06 Apr 2018 02:53:52 -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=@fooishbar-org.20150623.gappssmtp.com header.s=20150623 header.b=bpu44jSk; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751749AbeDFJwZ (ORCPT + 99 others); Fri, 6 Apr 2018 05:52:25 -0400 Received: from mail-wr0-f196.google.com ([209.85.128.196]:38616 "EHLO mail-wr0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751415AbeDFJwX (ORCPT ); Fri, 6 Apr 2018 05:52:23 -0400 Received: by mail-wr0-f196.google.com with SMTP id m13so1037085wrj.5 for ; Fri, 06 Apr 2018 02:52:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fooishbar-org.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=VU4iZ8OQMphS73PqpLjMQTfxtZ1jbXT7+qm1sizQrrc=; b=bpu44jSkmhZIwP4A+Ypb+ShaW2XerX2lUOc5Jb0QxVbkSDNighy9Y3SP8BHiczW6QD sGsDSOiFDtxzP0tc+a9VEgyNPMhNcvXqW0+djjeyth4StmmN1LAe0iIzPBbbXQm6dTwZ qQ63Tvyh5M7A+Jkh7WaRFuHqoBDujXUD15Nhx0uDBtVFaEUhdlWOmqvPs0MwjDZ4/wJ1 RP9FIftHwso7GoAbFQqpYLrRfgekakBpSB4r038XbtUzoV6pWf4pmFcM88h1RzqIdusb JfqHv5Ikf6oP0+2vm4xXjwqCyB2ku/6h5rr8cJRdsdQCrAluoyGk8oUWCxnq6QBviZDp necA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=VU4iZ8OQMphS73PqpLjMQTfxtZ1jbXT7+qm1sizQrrc=; b=DuCQmkxG1ImkV1CCUS3hXD84m2vA8AzRLRKy883G7tFF0XJnJN2a/07HPaoe8CJgqJ exeooTl2IhaNRZXSLNmFGKWS5SOAaGylzygIJAr6d/eD71fwa6odJNMmFaedHjXa4mmL gkY4CXDUID+jGAGHQTrzgxa2nIzDVv8U08m0MLoEdPHpD2jkOb7XWcKhjxS8NRsMdk3B nAUFAuACIvINnKFscG/IXULnqgwKsoGBLSV0F/8EQ23UVFwr+YSmPvsETIN0s99LKO7q Y66ULnmqVdtNXYPtZJSh9dQh/N/MDpWiHjnAiFG2/0ub+K5KPvi2mfL4Z9fm/1LYKtNu NMow== X-Gm-Message-State: ALQs6tBb5ewujAkgvmLx2IaoVB2tzI12/nQLge+M7nWmamqlM/BB4i61 03DdWD1qsd27e8t3oOSuydZVibD8u/jYaFVJCsyOjw== X-Received: by 2002:a19:eb0b:: with SMTP id j11-v6mr16109050lfh.120.1523008342429; Fri, 06 Apr 2018 02:52:22 -0700 (PDT) MIME-Version: 1.0 Received: by 10.46.82.210 with HTTP; Fri, 6 Apr 2018 02:52:21 -0700 (PDT) In-Reply-To: <20180314080301.366zycak3whqvvqx@sirius.home.kraxel.org> References: <20180313154826.20436-1-kraxel@redhat.com> <20180313161035.GL4788@phenom.ffwll.local> <20180314080301.366zycak3whqvvqx@sirius.home.kraxel.org> From: Daniel Stone Date: Fri, 6 Apr 2018 10:52:21 +0100 Message-ID: Subject: Re: [RfC PATCH] Add udmabuf misc device To: Gerd Hoffmann Cc: dri-devel , Tomeu Vizoso , David Airlie , open list , qemu-devel@nongnu.org, "moderated list:DMA BUFFER SHARING FRAMEWORK" , "open list:DMA BUFFER SHARING FRAMEWORK" Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Gerd, On 14 March 2018 at 08:03, Gerd Hoffmann wrote: >> Either mlock account (because it's mlocked defacto), and get_user_pages >> won't do that for you. >> >> Or you write the full-blown userptr implementation, including mmu_notifi= er >> support (see i915 or amdgpu), but that also requires Christian K=C3=B6ni= gs >> latest ->invalidate_mapping RFC for dma-buf (since atm exporting userptr >> buffers is a no-go). > > I guess I'll look at mlock accounting for starters then. Easier for > now, and leaves the door open to switch to userptr later as this should > be transparent to userspace. Out of interest, do you have usecases for full userptr support? Maybe another way would be to allow creation of dmabufs from memfds. Cheers, Daniel