Advice regarding sync_file implementation

Johannes Lundberg johalun0 at gmail.com
Sun Dec 10 08:49:35 UTC 2017


Hi

I'm working on getting drm-next graphics parts up to Linux 4.11. After
current drm-next version drm start using sync_file to synchronize
access to shared dma buffers between userland and kernel. sync_file is
using anon_inode, both which currently are missing from linuxkpi.

http://elixir.free-electrons.com/linux/v4.11/source/drivers/dma-buf/sync_file.c#L31

https://elixir.free-electrons.com/linux/v4.11/source/fs/anon_inodes.c#L70

This will be used by both kernel (drm and graphics drivers) and
userland (libdrm).

What would be the best solution to implement this on FreeBSD? Do we
have anything equivalent that we can use or is it best to make a
similar implementation as done in Linux?

We want to reduce the need of patching upstream and Linux code as much
as possible and implement things in linuxkpi to make further updates
more smooth.

Cheers!
/Johannes


More information about the freebsd-current mailing list