From: Jason Gunthorpe <jgg@nvidia.com>
To: "Christian König" <christian.koenig@amd.com>
Cc: "Kasireddy, Vivek" <vivek.kasireddy@intel.com>,
Wei Lin Guay <wguay@meta.com>, Keith Busch <kbusch@kernel.org>,
"alex.williamson@redhat.com" <alex.williamson@redhat.com>,
"dri-devel@lists.freedesktop.org"
<dri-devel@lists.freedesktop.org>,
"kvm@vger.kernel.org" <kvm@vger.kernel.org>,
"linux-rdma@vger.kernel.org" <linux-rdma@vger.kernel.org>,
Dag Moxnes <dagmoxnes@meta.com>,
Nicolaas Viljoen <nviljoen@meta.com>,
Oded Gabbay <ogabbay@kernel.org>,
Simona Vetter <simona.vetter@ffwll.ch>,
Leon Romanovsky <leon@kernel.org>,
Maor Gottlieb <maorg@nvidia.com>
Subject: Re: [PATCH 0/4] cover-letter: Allow MMIO regions to be exported through dmabuf
Date: Thu, 2 Jan 2025 09:39:51 -0400 [thread overview]
Message-ID: <20250102133951.GB5556@nvidia.com> (raw)
In-Reply-To: <0843cda7-6f33-4484-a38a-1f77cbc9d250@amd.com>
On Thu, Dec 19, 2024 at 11:04:54AM +0100, Christian König wrote:
> > Based on all the above, I think we can conclude that since dma_buf_put()
> > does not directly (or synchronously) call the f_op->release() handler, a
> > deadlock is unlikely to occur in the scenario you described.
Right, there is no deadlock here, and there is nothing inhernetly
wrong with using try_get like this. The locking here is ugly ugly
ugly, I forget why, but this was the best I came up with to untangle
it without deadlocks or races.
> Yeah, I agree.
>
> Interesting to know, I wasn't aware that the task_work functionality exists
> for that use case.
IIRC it was changed a while back because call chains were getting kind of
crazy long with the file release functions and stack overflow was a
problem in some cases.
Jason
next prev parent reply other threads:[~2025-01-02 13:40 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20241216095429.210792-1-wguay@fb.com>
2024-12-16 9:54 ` [PATCH 1/4] vfio: Add vfio_device_get() Wei Lin Guay
2024-12-16 9:54 ` [PATCH 2/4] dma-buf: Add dma_buf_try_get() Wei Lin Guay
2024-12-16 9:54 ` [PATCH 3/4] vfio/pci: Allow MMIO regions to be exported through dma-buf Wei Lin Guay
2024-12-16 9:54 ` [PATCH 4/4] vfio/pci: Allow export dmabuf without move_notify from importer Wei Lin Guay
2024-12-16 10:21 ` [PATCH 0/4] cover-letter: Allow MMIO regions to be exported through dmabuf Christian König
2024-12-16 16:54 ` Keith Busch
2024-12-17 9:53 ` Christian König
2024-12-17 11:06 ` Wei Lin Guay
[not found] ` <e8759159-b141-410b-be08-aad54eaed41f@amd.com>
2024-12-18 6:16 ` Kasireddy, Vivek
2024-12-18 10:01 ` Christian König
2024-12-19 7:02 ` Kasireddy, Vivek
2024-12-19 10:04 ` Christian König
2025-01-02 13:39 ` Jason Gunthorpe [this message]
2025-01-06 12:05 ` Simona Vetter
2025-01-06 16:27 ` Jason Gunthorpe
2025-01-08 16:48 ` Simona Vetter
2024-12-18 10:44 ` Simona Vetter
[not found] <20241216095920.237117-1-wguay@fb.com>
2024-12-16 17:34 ` Kasireddy, Vivek
2024-12-17 12:19 ` Wei Lin Guay
2024-12-18 7:02 ` Kasireddy, Vivek
[not found] ` <61DF4F0E-D947-436B-9160-A40079DB9085@meta.com>
2025-02-26 7:55 ` Kasireddy, Vivek
2025-02-26 13:38 ` Jason Gunthorpe
2025-02-26 17:59 ` Leon Romanovsky
2025-02-26 18:27 ` Wei Lin Guay
2025-03-04 7:15 ` Kasireddy, Vivek
2025-03-04 14:29 ` Christian König
2025-03-04 14:33 ` Jason Gunthorpe
2025-03-04 14:54 ` Leon Romanovsky
2025-02-26 18:24 ` Wei Lin Guay
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250102133951.GB5556@nvidia.com \
--to=jgg@nvidia.com \
--cc=alex.williamson@redhat.com \
--cc=christian.koenig@amd.com \
--cc=dagmoxnes@meta.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=kbusch@kernel.org \
--cc=kvm@vger.kernel.org \
--cc=leon@kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=maorg@nvidia.com \
--cc=nviljoen@meta.com \
--cc=ogabbay@kernel.org \
--cc=simona.vetter@ffwll.ch \
--cc=vivek.kasireddy@intel.com \
--cc=wguay@meta.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).