SMB Direct Implementation via Linux Device Driver for Samba Design Doc, final?
ogerlitz at mellanox.com
Tue Sep 3 16:44:17 CEST 2013
On 03/09/2013 17:21, Richard Sharpe wrote:
> Hi Or,
> These days (since about 2.6.12 or so) unlocked_ioctl does not run
> under the BKL. I was planning on using that.
> However, I was thinking of taking an approach like kqueue under
> FreeBSD, where you can pass in an array of objects and ask the driver
> to return as many as it can along with a count of the remaining events
> etc available.
Yes, basically, there are multiple ways to achieve events/commands
batching in both directions (user to kernel, kernel to user).
Basically, you would need to use one notification "channel" e.g
poll/epoll on your char dev for kernel --> user and one channel for user
--> kernel (e.g IOCTL/write)just to signal the other side they have some
N > 0 events in a cyclic-buffer implemented in shared/mmaped memory. And
a cyclic-buffer (e.gone per direction) that these events are written to
before the notification by one side and read from after the notification.
More information about the samba-technical