Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1675321

Re: [Intel-gfx] [PATCH v9 5/7] vfio: Define vfio based dma-buf operations

From Gerd Hoffmann <kraxel@redhat.com>
Newsgroups linux.kernel
Subject Re: [Intel-gfx] [PATCH v9 5/7] vfio: Define vfio based dma-buf operations
Date 2017-06-27 08:20 +0200
Message-ID <tWS0W-4W7-23@gated-at.bofh.it> (permalink)
References (8 earlier) <tUn1f-6h1-3@gated-at.bofh.it> <tUp34-7yf-13@gated-at.bofh.it> <tVEMq-7yC-19@gated-at.bofh.it> <tWvQJ-7gm-1@gated-at.bofh.it> <tWFZL-5dU-9@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


  Hi,

> Hmm, I don't like that interface.  Can you cite examples of other
> ioctls that behave this way?  It doesn't feel like an elegant user
> interface; the user can get the dmabuf, but only after they query the
> dmabuf, even though the get-dmabuf ioctl returns the same data as the
> query-plane ioctl, but they can't get the dmabuf if the plane has
> changed in the interim, which is not something the user can
> know.  Are
> we causing our own problems with this model of cycling through dmabuf
> fds?  We talked previously about an enum of plane types, primary and
> cursor.  What if the user was simply able to get a dmabuf fd for each
> of
> those and they queried the current plane information via those fds?
> IOW, the fd is persistent and specific to a given plane type, but the
> format within it is dynamic.

Will not work due to how dma-bufs are designed.

But, yes, the QUERY then GET split is ugly for a number of reasons.

Does gvt track the live cycle of all dma-bufs it has handed out?
If so, then maybe we can let the kernel check whenever a dma-buf for
the current plane exists?  And if that isn't the case hand out a dma-
buf right away, without expecting userspace explicitly asking for it?

That will simplify the interface and remove the race condition at the
expense of some additional bookkeeping in the kernel.

cheers,
  Gerd

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

RE: [Intel-gfx] [PATCH v9 5/7] vfio: Define vfio based dma-buf         operations "Zhang, Tina" <tina.zhang@intel.com> - 2017-06-20 10:50 +0200
  Re: [Intel-gfx] [PATCH v9 5/7] vfio: Define vfio based dma-buf  operations Gerd Hoffmann <kraxel@redhat.com> - 2017-06-20 13:00 +0200
    Re: [Intel-gfx] [PATCH v9 5/7] vfio: Define vfio based dma-buf  operations Alex Williamson <alex.williamson@redhat.com> - 2017-06-20 17:10 +0200
      Re: [Intel-gfx] [PATCH v9 5/7] vfio: Define vfio based dma-buf  operations Kirti Wankhede <kwankhede@nvidia.com> - 2017-06-20 19:10 +0200
      RE: [Intel-gfx] [PATCH v9 5/7] vfio: Define vfio based dma-buf  operations "Zhang, Tina" <tina.zhang@intel.com> - 2017-06-21 01:10 +0200
        Re: [Intel-gfx] [PATCH v9 5/7] vfio: Define vfio based dma-buf  operations Alex Williamson <alex.williamson@redhat.com> - 2017-06-21 01:30 +0200
          RE: [Intel-gfx] [PATCH v9 5/7] vfio: Define vfio based dma-buf  operations "Zhang, Tina" <tina.zhang@intel.com> - 2017-06-21 11:30 +0200
            Re: [Intel-gfx] [PATCH v9 5/7] vfio: Define vfio based dma-buf  operations Gerd Hoffmann <kraxel@redhat.com> - 2017-06-21 13:10 +0200
              Re: [Intel-gfx] [PATCH v9 5/7] vfio: Define vfio based dma-buf  operations Alex Williamson <alex.williamson@redhat.com> - 2017-06-21 21:00 +0200
                Re: [Intel-gfx] [PATCH v9 5/7] vfio: Define vfio based dma-buf  operations Gerd Hoffmann <kraxel@redhat.com> - 2017-06-22 10:40 +0200
                Re: [Intel-gfx] [PATCH v9 5/7] vfio: Define vfio based dma-buf  operations Alex Williamson <alex.williamson@redhat.com> - 2017-06-22 21:00 +0200
                Re: [Intel-gfx] [PATCH v9 5/7] vfio: Define vfio based dma-buf  operations Gerd Hoffmann <kraxel@redhat.com> - 2017-06-23 09:30 +0200
                Re: [Intel-gfx] [PATCH v9 5/7] vfio: Define vfio based dma-buf operations Zhi Wang <zhi.a.wang@intel.com> - 2017-06-23 10:10 +0200
                Re: [Intel-gfx] [PATCH v9 5/7] vfio: Define vfio based dma-buf  operations Gerd Hoffmann <kraxel@redhat.com> - 2017-06-23 10:40 +0200
                Re: [Intel-gfx] [PATCH v9 5/7] vfio: Define vfio based dma-buf  operations Alex Williamson <alex.williamson@redhat.com> - 2017-06-23 18:50 +0200
                Re: [Intel-gfx] [PATCH v9 5/7] vfio: Define vfio based dma-buf  operations Alex Williamson <alex.williamson@redhat.com> - 2017-06-23 19:20 +0200
                Re: [Intel-gfx] [PATCH v9 5/7] vfio: Define vfio based dma-buf  operations Gerd Hoffmann <kraxel@redhat.com> - 2017-06-26 08:20 +0200
              RE: [Intel-gfx] [PATCH v9 5/7] vfio: Define vfio based dma-buf  operations "Zhang, Tina" <tina.zhang@intel.com> - 2017-06-22 02:30 +0200
      Re: [Intel-gfx] [PATCH v9 5/7] vfio: Define vfio based dma-buf  operations Gerd Hoffmann <kraxel@redhat.com> - 2017-06-21 09:40 +0200
    RE: [Intel-gfx] [PATCH v9 5/7] vfio: Define vfio based dma-buf  operations "Zhang, Tina" <tina.zhang@intel.com> - 2017-06-24 00:00 +0200
      Re: [Intel-gfx] [PATCH v9 5/7] vfio: Define vfio based dma-buf  operations Gerd Hoffmann <kraxel@redhat.com> - 2017-06-26 08:40 +0200
        Re: [Intel-gfx] [PATCH v9 5/7] vfio: Define vfio based dma-buf  operations Alex Williamson <alex.williamson@redhat.com> - 2017-06-26 19:30 +0200
          Re: [Intel-gfx] [PATCH v9 5/7] vfio: Define vfio based dma-buf  operations Gerd Hoffmann <kraxel@redhat.com> - 2017-06-27 08:20 +0200
            RE: [Intel-gfx] [PATCH v9 5/7] vfio: Define vfio based dma-buf  operations "Zhang, Tina" <tina.zhang@intel.com> - 2017-06-28 14:50 +0200
              Re: [Intel-gfx] [PATCH v9 5/7] vfio: Define vfio based dma-buf  operations Gerd Hoffmann <kraxel@redhat.com> - 2017-06-29 08:50 +0200
                Re: [Intel-gfx] [PATCH v9 5/7] vfio: Define vfio based dma-buf  operations Daniel Vetter <daniel@ffwll.ch> - 2017-06-29 10:40 +0200

csiph-web