On Wed, 2019-02-27 at 00:27 -0600, Parav Pandit wrote: +AD4 +-+ACM-include +ADw-linux/completion.h+AD4 +AD4 +-struct loopback+AF8-resource +AHs +AD4 +- struct completion completion+ADs +AD4 +- /+ACo wait for all datapath references to drop, we don't want to do +AD4 +- +ACo large memcpy while holding rcu, refcount doesn't hurt the +AD4 +- +ACo performance. +AD4 +- +ACo-/ +AD4 +- refcount+AF8-t refcount+ADs Please consider struct kref instead of open-coding the kref implementation. +AD4 +-/+ACo TODO: replace with kernel pfifo, which consumes more memory +ACo-/ +AD4 +-struct loopback+AF8-fifo +AHs +AD4 +- /+ACo Protect insert, remove to list +ACo-/ +AD4 +- spinlock+AF8-t lock+ADs +AD4 +- /+ACo head of entries, FIFO order +ACo-/ +AD4 +- struct list+AF8-head list+ADs +AD4 +- u32 entries+ADs +AD4 +-+AH0AOw How do pfifo and kfifo compare and which of the two is the most appropriate for this driver? Thanks, Bart.