* Query on mechanisms to communicate between kernel modules in Linux
@ 2018-02-08 4:09 Neil Thomas
2018-02-08 14:26 ` Greg KH
0 siblings, 1 reply; 8+ messages in thread
From: Neil Thomas @ 2018-02-08 4:09 UTC (permalink / raw)
To: kernelnewbies
Hi,
I want to share information between two kernel modules (Kernel version 4.0
or above). What are the ways of communication between kernel modules in
Linux.
Please list out the available mechanisms to do this.
Thanks & Regards
Neil Thomas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20180208/e1602db5/attachment.html>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Query on mechanisms to communicate between kernel modules in Linux
2018-02-08 4:09 Query on mechanisms to communicate between kernel modules in Linux Neil Thomas
@ 2018-02-08 14:26 ` Greg KH
2018-02-08 18:08 ` Neil Thomas
0 siblings, 1 reply; 8+ messages in thread
From: Greg KH @ 2018-02-08 14:26 UTC (permalink / raw)
To: kernelnewbies
On Thu, Feb 08, 2018 at 09:39:31AM +0530, Neil Thomas wrote:
> Hi,
>
> I want to share information between two kernel modules (Kernel version 4.0
> or above). What are the ways of communication between kernel modules in
> Linux.
What have you tried that did not work out?
> Please list out the available mechanisms to do this.
This feels like a homework question to me, are you sure you are not just
asking for us to do your work for you? :)
thanks,
greg k-h
^ permalink raw reply [flat|nested] 8+ messages in thread
* Query on mechanisms to communicate between kernel modules in Linux
2018-02-08 14:26 ` Greg KH
@ 2018-02-08 18:08 ` Neil Thomas
2018-02-08 19:20 ` valdis.kletnieks at vt.edu
0 siblings, 1 reply; 8+ messages in thread
From: Neil Thomas @ 2018-02-08 18:08 UTC (permalink / raw)
To: kernelnewbies
Hi,
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.
Thank you!
On Thu, Feb 8, 2018 at 7:56 PM, Greg KH <greg@kroah.com> wrote:
> On Thu, Feb 08, 2018 at 09:39:31AM +0530, Neil Thomas wrote:
> > Hi,
> >
> > I want to share information between two kernel modules (Kernel version
> 4.0
> > or above). What are the ways of communication between kernel modules in
> > Linux.
>
> What have you tried that did not work out?
>
> > Please list out the available mechanisms to do this.
>
> This feels like a homework question to me, are you sure you are not just
> asking for us to do your work for you? :)
>
> thanks,
>
> greg k-h
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20180208/efbc1d74/attachment.html>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Query on mechanisms to communicate between kernel modules in Linux
2018-02-08 18:08 ` Neil Thomas
@ 2018-02-08 19:20 ` valdis.kletnieks at vt.edu
2018-02-08 19:22 ` Neil Thomas
0 siblings, 1 reply; 8+ messages in thread
From: valdis.kletnieks at vt.edu @ 2018-02-08 19:20 UTC (permalink / raw)
To: kernelnewbies
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.
There's a perfectly good perf-based function trace facility that will provide
this info to userspace.
http://www.brendangregg.com/perf.html#StaticKernelTracing
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 486 bytes
Desc: not available
URL: <http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20180208/22633464/attachment.sig>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Query on mechanisms to communicate between kernel modules in Linux
2018-02-08 19:20 ` valdis.kletnieks at vt.edu
@ 2018-02-08 19:22 ` Neil Thomas
2018-02-10 8:38 ` Pintu Kumar
0 siblings, 1 reply; 8+ messages in thread
From: Neil Thomas @ 2018-02-08 19:22 UTC (permalink / raw)
To: kernelnewbies
Thanks, I will check it out.
On 09-Feb-2018 12:50 AM, <valdis.kletnieks@vt.edu> 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.
>
> There's a perfectly good perf-based function trace facility that will
> provide
> this info to userspace.
>
> http://www.brendangregg.com/perf.html#StaticKernelTracing
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20180209/8118d9bb/attachment-0001.html>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Query on mechanisms to communicate between kernel modules in Linux
2018-02-08 19:22 ` Neil Thomas
@ 2018-02-10 8:38 ` Pintu Kumar
2018-02-10 17:00 ` Neil Thomas
0 siblings, 1 reply; 8+ messages in thread
From: Pintu Kumar @ 2018-02-10 8:38 UTC (permalink / raw)
To: kernelnewbies
On Fri, Feb 9, 2018 at 12:52 AM, Neil Thomas <neilkt27@gmail.com> wrote:
> Thanks, I will check it out.
>
> On 09-Feb-2018 12:50 AM, <valdis.kletnieks@vt.edu> 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 at kernelnewbies.org
> https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Query on mechanisms to communicate between kernel modules in Linux
2018-02-10 8:38 ` Pintu Kumar
@ 2018-02-10 17:00 ` Neil Thomas
2018-02-12 0:25 ` Tobin C. Harding
0 siblings, 1 reply; 8+ messages in thread
From: Neil Thomas @ 2018-02-10 17:00 UTC (permalink / raw)
To: kernelnewbies
Thanks a lot. I will try out this.
On 10-Feb-2018 2:08 PM, "Pintu Kumar" <pintu.ping@gmail.com> wrote:
> On Fri, Feb 9, 2018 at 12:52 AM, Neil Thomas <neilkt27@gmail.com> wrote:
> > Thanks, I will check it out.
> >
> > On 09-Feb-2018 12:50 AM, <valdis.kletnieks@vt.edu> 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 at kernelnewbies.org
> > https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
> >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20180210/270cf6dc/attachment.html>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Query on mechanisms to communicate between kernel modules in Linux
2018-02-10 17:00 ` Neil Thomas
@ 2018-02-12 0:25 ` Tobin C. Harding
0 siblings, 0 replies; 8+ messages in thread
From: Tobin C. Harding @ 2018-02-12 0:25 UTC (permalink / raw)
To: kernelnewbies
On Sat, Feb 10, 2018 at 10:30:36PM +0530, Neil Thomas wrote:
> Thanks a lot. I will try out this.
Please don't top post. It upsets people.
Good luck,
Tobin.
> On 10-Feb-2018 2:08 PM, "Pintu Kumar" <pintu.ping@gmail.com> wrote:
>
> > On Fri, Feb 9, 2018 at 12:52 AM, Neil Thomas <neilkt27@gmail.com> wrote:
> > > Thanks, I will check it out.
> > >
> > > On 09-Feb-2018 12:50 AM, <valdis.kletnieks@vt.edu> 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 at kernelnewbies.org
> > > https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
> > >
> >
> _______________________________________________
> Kernelnewbies mailing list
> Kernelnewbies at kernelnewbies.org
> https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2018-02-12 0:25 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-02-08 4:09 Query on mechanisms to communicate between kernel modules in Linux Neil Thomas
2018-02-08 14:26 ` Greg KH
2018-02-08 18:08 ` Neil Thomas
2018-02-08 19:20 ` valdis.kletnieks at vt.edu
2018-02-08 19:22 ` Neil Thomas
2018-02-10 8:38 ` Pintu Kumar
2018-02-10 17:00 ` Neil Thomas
2018-02-12 0:25 ` Tobin C. Harding
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).