On Fri, Jul 24, 2020 at 08:46:16PM +0100, Chris Wilson wrote:
Quoting Umesh Nerlige Ramappa (2020-07-24 20:35:11)
I agree, but strangely, with mmap sequence below, I don't see
i915_perf_release() called at all. So destroy() is not called.
perf_fd = i915_perf_open_ioctl()
mmap(..., perf_fd...)
close(perf_fd)
delay for a few seconds.
If I call munmap() after the close(), I see i915_perf_release() ->
destroy() -> unmap_mapping_range()
Hmm, vma->vm_file is pointing to the perf-fd. Ah, that's a big
difference to what I'm used to. So all the references are handled for
you by the correct vma->vm_file, and you don't need the
vm_open/vm_close, the kref or the closed. Sorry.
no worries at all. This is all new for me, so I appreciate all your
prompt guidance that helped me look into this implementation in detail.
Thanks,
Umesh
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx