Re: Sleeping With Interrupts Disabled.

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

 



> Hi Gopu,
> Logically this only means inside schedule() the
> interrupts are enabled again.
> I Have'n't check the schedule() code but it must
> contains sti or local_irq_enable(). But you check and
> replies back to list the reason.

You are right.
Seems like schedule assumes that it is being
called with interrupts enabled.

The following is one line in schedule which 
would enable interrupts back.
spin_unlock_irq(&runqueue_lock);

Thanks for the *

> Prasanna
> --- Gopu Bhaskar < wrote:
> >
> > > On Thu, 2005-03-17 at 00:30 -0500, Gopu Bhaskar
> > wrote:
> > > > Is it OK to sleep when interrupts are disabled ?
> > > > The following is the implementation of
> > interruptible_sleep_on in 2.6.10
> > > > Here we see that interrupts are disabled before
> > schedule is called and
> > > > enabled back only when the control comes back. I
> > wanted to know > > the reason for doing this. And also whether
> > sleeping with > > interrupts disabled
> > > > has any negetive impact.
> > > > > you should never use any of these functions.
> > THey're there for legacy
> > > reasons but they are known broken and severely
> > deprecated.
> > > Sorry for persisting on this, even though you said
> > that this function is
> > broken. I was just curious why the call to schedule
> > is made with interrupts
> > disabled. AFAIK schedule is called from time to time
> > by utilizing the timer
> > interrupt(update_process_times). If the timer
> > interrupt itself doesnt come
> >  then how can the task be scheduled back ? --
> ___________________________________________________________
> > Sign-up for Ads Free at Mail.com
> > http://promo.mail.com/adsfreejump.htm
> >
> >
> > --
> > Kernelnewbies: Help each other learn about the Linux
> > kernel.
> > Archive:      http://mail.nl.linux.org/kernelnewbies/
> > FAQ:           http://kernelnewbies.org/faq/
> >
> >
> 
> 
> 		
> __________________________________
> Do you Yahoo!?
> Yahoo! Small Business - Try our new resources site!
> http://smallbusiness.yahoo.com/resources/
http://www.geocities.com/gopubhaskar/index.htm
-- 
___________________________________________________________
Sign-up for Ads Free at Mail.com
http://promo.mail.com/adsfreejump.htm


--
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