Re: Query on mechanisms to communicate between kernel modules in Linux

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Thanks a lot. I will try out this.

On 10-Feb-2018 2:08 PM, "Pintu Kumar" <pintu.ping@xxxxxxxxx> wrote:
On Fri, Feb 9, 2018 at 12:52 AM, Neil Thomas <neilkt27@xxxxxxxxx> wrote:
> Thanks, I will check it out.
>
> On 09-Feb-2018 12:50 AM, <valdis.kletnieks@xxxxxx> wrote:
>>
>> On Thu, 08 Feb 2018 23:38:01 +0530, Neil Thomas said:
>>
>> > I am just a beginner. I have tried procfs, Netlink socket to communicate
>> > between user space and kernel space and it works fine.
>> >
>> > I am developing a monitoring utility to trace the VFS operation and find
>> > the frequency of VFS function calls. This monitoring utility runs in
>> > kernel
>> > space. We have to record the occurrence of each  VFS function calls
>> > (like
>> > vfs_open(), vfs_read()).  I don't know  which is best mechanism to
>> > report
>> > this VFS event to the monitoring utility.
>> >
>> > Could anyone please suggest the best mechanism to transfer data
>> > frequently
>> > between kernel modules.

You can also use ION (CONFIG_ION) or DMABUF (DMA_SHARED_BUFFER) buffer
sharing mechanism to share data between 2 drivers.
Check this:
https://www.kernel.org/doc/html/latest/driver-api/dma-buf.html
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/staging/android/ion?h=v4.15

>>
>> There's a perfectly good perf-based function trace facility that will
>> provide
>> this info to userspace.
>>
>> http://www.brendangregg.com/perf.html#StaticKernelTracing
>>
>
> _______________________________________________
> Kernelnewbies mailing list
> Kernelnewbies@kernelnewbies.org
> https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>
_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]

  Powered by Linux