Re: Using Poll/Select In Kernel Modules

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

 



sorry from my part -- i wasnt clear while asking my question.
 
'm trying to write a module which shares its load information wit other kernel modules running on different linux systems with different IP address. So this is the case of two kernel modules running on 2 different linux machines. To establish communication between 2 machines --- i thought of using kernel sockets.
 
so -- when using kernel sockets , i dont want to block waiting for an asynchronous incoming packet. in user level --- v can make use of poll/select to do this. how to do this in kernel level ??!!!
 
abt linux notifiers --- i dont know much abt it. ll xplore n try to figure it out if it can help my cause. are their any gud docs related to it available ??!!
 
n sorry for not replying my prev mail to the entire list --
 
 
On 10/15/05, Hemant Mohapatra <hemant.mohapatra@xxxxxxxxx> wrote:
i wanted to establish communications between different kernel modules (
> infact kernel 'streams' modules ). So i thought of using kernel sockets for
> time being. In doing so --- 'm creating a thread to wait on a particular
> port. But i dont want this to be blocking and eating up resources. so i
> thought of using something similar to poll/select in user-land.

Please  reply to the whole list in future; that way someone else who
might know the answers to your question can respond.

> ' Is there any way in kernel space to wait for any file/socket descriptor to
> change instead of blocking continuously ??? '

Tell us what exactly you are trying to do; why use a socket, why not
something like shared memory to communicate between modules? Or kernel
notifiers (IIRC: linux/notifier.h). Also, using fd's in kernel is not
recommended. Use file structures. You could create a user-land app
that ioctl()'s into module_1; module_1 requests user_app to access
module_2 and it does so through another ioctl().

./h
--
Operating Systems and Computer Architecture Research  - University of Cincinnati
http://www.ececs.uc.edu/~mohapth



--
kinGkonGkoli
Bangalore.

[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