Re: kernel-threads

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

 



hi,
yes, i can't do IO,but never wait,
but instead i loop until upto i wont get packet, this
is as good as busy waiting is this a wrong way i'm
thinking?,or
second is to wait and put the thread to sleep,
even a 1 jiffies sleep is working,
this means delay  is when i get packet and when i
process it is 1ms,and worst 10ms in 2.4,but what for
some reason it has to immidiatly process the data as
soon as packet arrives.
i find several ways in google,from checking O_NONBLOCK
flag etc. but i wont understood those as thise are
just a code snippets and no explaination is given
thanks



--- Jan Hudec <bulb@ucw.cz> wrote:
> On Tue, May 18, 2004 at 11:38:28 -0700, prasanna
> wakhare wrote:
> > hi,
> > I'm using two kernel thread one continuously
> executes
> > sock_recvmsg and other sends it
> sontinuosly,ofcource
> > if i wont put the thread to the sleep the computer
> > will hang when loading the module containing
> kernel
> > thread,i  given MSG_DONTWAIT option in
> sock_recvmsg,
> > why i had to put the thread to sleep?
> 
> Do I understand you right, that you called the
> sock_recvmsg with
> MSG_DONTWAIT and it did lock up? Ok, now, that's
> expected behaviour.
> Consider what MSG_DONTWAIT means.
> 
> > i'm using 2.4.20-8 kernel is that because the
> kernel
> > is not preemptive?
> > so if i will execute those in 2.6
> > will it work?
> 
> No. 2.6 is only *optionaly* preemptive.
> 
> Your design is broken anyway. You can't do IO and
> never wait!
> 
> > 2.while unloading the same  module the kernel
> gives 
> > oopse saying "unable to handle virtual address at
> > c0xxxxx address" it will hang somewhere in
> > kernel_thread_helper in process.c 
> > i google search above but i did not get any
> threads
> > plz let me know the reason...
> 
> Kernel equivalent of "Segmentation fault".
> 
>
-------------------------------------------------------------------------------
> 						 Jan 'Bulb' Hudec <bulb@ucw.cz>
> 

> ATTACHMENT part 2 application/pgp-signature
name=signature.asc




	
		
__________________________________
Do you Yahoo!?
SBC Yahoo! - Internet access at a great low price.
http://promo.yahoo.com/sbc/

--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[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