From: "Christian König" <ckoenig.leichtzumerken@gmail.com>
To: Chris Wilson <chris@chris-wilson.co.uk>,
christian.koenig@amd.com, linaro-mm-sig@lists.linaro.org,
linux-media@vger.kernel.org, dri-devel@lists.freedesktop.org,
amd-gfx@lists.freedesktop.org
Subject: Re: [PATCH 1/5] dma-buf: add optional invalidate_mappings callback v2
Date: Mon, 19 Mar 2018 17:23:23 +0100 [thread overview]
Message-ID: <0bd85f69-c64c-70d1-a4a0-10ae0ed8b4e8@gmail.com> (raw)
In-Reply-To: <152147480241.18954.4556582215766884582@mail.alporthouse.com>
Am 19.03.2018 um 16:53 schrieb Chris Wilson:
> Quoting Christian König (2018-03-16 14:22:32)
> [snip, probably lost too must context]
>> This allows for full grown pipelining, e.g. the exporter can say I need
>> to move the buffer for some operation. Then let the move operation wait
>> for all existing fences in the reservation object and install the fence
>> of the move operation as exclusive fence.
> Ok, the situation I have in mind is the non-pipelined case: revoking
> dma-buf for mmu_invalidate_range or shrink_slab. I would need a
> completion event that can be waited on the cpu for all the invalidate
> callbacks. (Essentially an atomic_t counter plus struct completion; a
> lighter version of dma_fence, I wonder where I've seen that before ;)
Actually that is harmless.
When you need to unmap a DMA-buf because of mmu_invalidate_range or
shrink_slab you need to wait for it's reservation object anyway.
This needs to be done to make sure that the backing memory is now idle,
it doesn't matter if the jobs where submitted by DMA-buf importers or
your own driver.
The sg tables pointing to the now released memory might live a bit
longer, but that is unproblematic and actually intended.
When we would try to destroy the sg tables in an mmu_invalidate_range or
shrink_slab callback we would run into a lockdep horror.
Regards,
Christian.
>
> Even so, it basically means passing a fence object down to the async
> callbacks for them to signal when they are complete. Just to handle the
> non-pipelined version. :|
> -Chris
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2018-03-19 16:23 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-16 13:20 RFC: unpinned DMA-buf exporting v2 Christian König
2018-03-16 13:20 ` [PATCH 1/5] dma-buf: add optional invalidate_mappings callback v2 Christian König
2018-03-16 13:51 ` Chris Wilson
[not found] ` <152120831102.25315.4326885184264378830-M6iVdVfohj6unts5RBS2dVaTQe2KTcn/@public.gmane.org>
2018-03-16 14:22 ` Christian König
2018-03-19 15:53 ` Chris Wilson
2018-03-19 16:23 ` Christian König [this message]
[not found] ` <0bd85f69-c64c-70d1-a4a0-10ae0ed8b4e8-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2018-03-20 7:44 ` [Linaro-mm-sig] " Daniel Vetter
2018-03-20 10:54 ` Christian König
[not found] ` <19ed21a5-805d-271f-9120-49e0c00f510f-5C7GfCeVMHo@public.gmane.org>
2018-03-20 14:08 ` Daniel Vetter
[not found] ` <20180320140810.GU14155-dv86pmgwkMBes7Z6vYuT8azUEOm+Xw19@public.gmane.org>
2018-03-20 17:47 ` Christian König
[not found] ` <37ba7394-2a5c-a0bc-cc51-c8a0edc2991d-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2018-03-21 8:18 ` Daniel Vetter
[not found] ` <20180321081800.GW14155-dv86pmgwkMBes7Z6vYuT8azUEOm+Xw19@public.gmane.org>
2018-03-21 9:34 ` Christian König
[not found] ` <c9070eb2-9b4e-9ac2-ecbc-74dcf5069858-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2018-03-22 7:14 ` Daniel Vetter
[not found] ` <20180322071425.GG14155-dv86pmgwkMBes7Z6vYuT8azUEOm+Xw19@public.gmane.org>
2018-03-22 9:37 ` Christian König
2018-03-26 7:51 ` Daniel Vetter
2018-03-21 8:28 ` Daniel Vetter
[not found] ` <20180321082839.GA14155-dv86pmgwkMBes7Z6vYuT8azUEOm+Xw19@public.gmane.org>
2018-03-21 11:54 ` Christian König
2018-03-22 7:18 ` Daniel Vetter
[not found] ` <20180322071804.GH14155-dv86pmgwkMBes7Z6vYuT8azUEOm+Xw19@public.gmane.org>
2018-03-22 9:58 ` Christian König
[not found] ` <ef9fa9a2-c368-1fca-a8ac-8ee8d522b6ab-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2018-03-26 8:01 ` Daniel Vetter
[not found] ` <20180326080121.GO14155-dv86pmgwkMBes7Z6vYuT8azUEOm+Xw19@public.gmane.org>
2018-03-26 15:42 ` Jerome Glisse
2018-03-27 7:35 ` Christian König
2018-03-27 7:53 ` Daniel Vetter
2018-03-27 8:06 ` Christian König
[not found] ` <71f3f0cc-263d-bf60-aff8-6f2277884aaf-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2018-03-27 8:27 ` Daniel Vetter
2018-03-19 14:04 ` Daniel Vetter
[not found] ` <20180316132049.1748-1-christian.koenig-5C7GfCeVMHo@public.gmane.org>
2018-03-16 13:20 ` [PATCH 2/5] drm/ttm: keep a reference to transfer pipelined BOs Christian König
[not found] ` <20180316132049.1748-3-christian.koenig-5C7GfCeVMHo@public.gmane.org>
2018-03-27 3:32 ` He, Roger
2018-03-16 13:20 ` [PATCH 3/5] drm/ttm: remove the backing store if no placement is given Christian König
2018-03-16 13:20 ` [PATCH 4/5] drm/amdgpu: add independent DMA-buf export v2 Christian König
2018-03-19 14:09 ` RFC: unpinned DMA-buf exporting v2 Daniel Vetter
2018-03-16 13:20 ` [PATCH 5/5] drm/amdgpu: add independent DMA-buf import v2 Christian König
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=0bd85f69-c64c-70d1-a4a0-10ae0ed8b4e8@gmail.com \
--to=ckoenig.leichtzumerken@gmail.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=chris@chris-wilson.co.uk \
--cc=christian.koenig@amd.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=linaro-mm-sig@lists.linaro.org \
--cc=linux-media@vger.kernel.org \
/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