<div dir="auto">Thanks a lot. I will try out this.</div><div class="gmail_extra"><br><div class="gmail_quote">On 10-Feb-2018 2:08 PM, "Pintu Kumar" <<a href="mailto:pintu.ping@gmail.com">pintu.ping@gmail.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Fri, Feb 9, 2018 at 12:52 AM, Neil Thomas <<a href="mailto:neilkt27@gmail.com">neilkt27@gmail.com</a>> wrote:<br>
> Thanks, I will check it out.<br>
><br>
> On 09-Feb-2018 12:50 AM, <<a href="mailto:valdis.kletnieks@vt.edu">valdis.kletnieks@vt.edu</a>> wrote:<br>
>><br>
>> On Thu, 08 Feb 2018 23:38:01 +0530, Neil Thomas said:<br>
>><br>
>> > I am just a beginner. I have tried procfs, Netlink socket to communicate<br>
>> > between user space and kernel space and it works fine.<br>
>> ><br>
>> > I am developing a monitoring utility to trace the VFS operation and find<br>
>> > the frequency of VFS function calls. This monitoring utility runs in<br>
>> > kernel<br>
>> > space. We have to record the occurrence of each VFS function calls<br>
>> > (like<br>
>> > vfs_open(), vfs_read()). I don't know which is best mechanism to<br>
>> > report<br>
>> > this VFS event to the monitoring utility.<br>
>> ><br>
>> > Could anyone please suggest the best mechanism to transfer data<br>
>> > frequently<br>
>> > between kernel modules.<br>
<br>
You can also use ION (CONFIG_ION) or DMABUF (DMA_SHARED_BUFFER) buffer<br>
sharing mechanism to share data between 2 drivers.<br>
Check this:<br>
<a href="https://www.kernel.org/doc/html/latest/driver-api/dma-buf.html" rel="noreferrer" target="_blank">https://www.kernel.org/doc/<wbr>html/latest/driver-api/dma-<wbr>buf.html</a><br>
<a href="https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/staging/android/ion?h=v4.15" rel="noreferrer" target="_blank">https://git.kernel.org/pub/<wbr>scm/linux/kernel/git/torvalds/<wbr>linux.git/tree/drivers/<wbr>staging/android/ion?h=v4.15</a><br>
<br>
>><br>
>> There's a perfectly good perf-based function trace facility that will<br>
>> provide<br>
>> this info to userspace.<br>
>><br>
>> <a href="http://www.brendangregg.com/perf.html#StaticKernelTracing" rel="noreferrer" target="_blank">http://www.brendangregg.com/<wbr>perf.html#StaticKernelTracing</a><br>
>><br>
><br>
> ______________________________<wbr>_________________<br>
> Kernelnewbies mailing list<br>
> <a href="mailto:Kernelnewbies@kernelnewbies.org">Kernelnewbies@kernelnewbies.<wbr>org</a><br>
> <a href="https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies" rel="noreferrer" target="_blank">https://lists.kernelnewbies.<wbr>org/mailman/listinfo/<wbr>kernelnewbies</a><br>
><br>
</blockquote></div></div>