Thread (6 messages) 6 messages, 3 authors, 2012-05-04

Problem of workqueue

From: rohan puri <hidden>
Date: 2012-05-04 05:42:21

On Fri, May 4, 2012 at 10:55 AM, ??? [off-list ref] wrote:
Hi rohan,

I google fanotify and find it's a notification mechanism. My
understanding is that fanotify can know fd being open, close, read,
write, but transfer data between user space and kernel is out of its
ability. If I'm wrong please tell me.

The only reason I choose netlink to send data to user space is to
notify user space process there is  data, and avoid user space process
do some polling job to check if there is data in kernel. Does fanotify
or other method can do such thing?

Thanks a lot!

2012/5/4 rohan puri [off-list ref]:
quoted
Hi,
To send data from kernel space and user-space see kernel's notification
mechanism like fanotify which works on by creating an anonymous fd in the
user-space process's context which then might perform normal read() and
write() call to receive and send data to kernel.

- Rohan
To notify itself requires some data transfer. You can easily implement your
own mechanism similar to fanotify which would contain you_fops (file
operations) from which you could transfer data. Yes, user process needs to
do polling to check whether data is available on the fd or not.

- Rohan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20120504/b0c18180/attachment.html 
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help