RE: wake_up_interruptible in ISR

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

 



> -----Original Message-----
> From: Jeff Haran
> Sent: Tuesday, May 26, 2015 10:36 AM
> To: 'Chan Kim'; 'kernelnewbies@xxxxxxxxxxxxxxxxx'
> Subject: RE: wake_up_interruptible in ISR
> 
> > -----Original Message-----
> > From: Jeff Haran
> > Sent: Tuesday, May 26, 2015 10:31 AM
> > To: 'Chan Kim'; kernelnewbies@xxxxxxxxxxxxxxxxx
> > Subject: RE: wake_up_interruptible in ISR
> >
> > > -----Original Message-----
> > > From: kernelnewbies-bounces@xxxxxxxxxxxxxxxxx
> > [mailto:kernelnewbies-
> > > bounces@xxxxxxxxxxxxxxxxx] On Behalf Of Chan Kim
> > > Sent: Monday, May 25, 2015 10:23 PM
> > > To: kernelnewbies@xxxxxxxxxxxxxxxxx
> > > Subject: wake_up_interruptible in ISR
> > >
> > >
> > >
> > > Hello,
> > >
> > > I see in the source (linux ver 3.3) that wake_up_interruptible
> > > function doesn't sleep
> >
> 
> Please ignore the below. I confused it with wake_event_interruptible().

Make that wait_event_interruptible(). I think I should just go back to bed.

Jeff Haran

> 
> No enough coffee yet this morning. Sorry for the confusion.
> 
> Jeff Haran
> 
> > Not sure how you came to that conclusion, but calling that function
> > definitely can result in an attempt to do a context switch. That's
> > what the "scheduling while atomic" is telling you.
> > To my knowledge it is only safe to call this from process context.
> >
> > No ISRs, no bottom halves.
> >
> > Could be it's that "_interruptible" in the name that is misleading
> > you. That means the wait can be interrupted and the call can return if
> > the process doing the waiting is delivered a signal. It's got nothing to do
> with "interrupts"
> > per se.
> >
> > Jeff Haran
> >
> > > so I used in it an ISR but I'm getting 'BUG:scheduling while atomic'
> > > message. (I'm not sure it's coming from this) I'm looking for the
> > > exact cause but Is there any caveat when using
> > > wake_up_interruptible() in
> > an ISR?
> > > (I found some drivers use it in ISR, some use it in work_struct)
> > >
> > > I also read in
> > > http://www.slideshare.net/rampalliraj/tasklet-vs-work-
> > > queues?from_action=save  that tasklet is not allowed to sleep but work
> is.
> > > (because  tasklet is not in process context, but in bottom-half) I
> > > don't know if I have to move my wake_up_interruptible function to
> > > tasklet or
> > > work(queue) or even it matters to the current problem.
> > >
> > > Any tip will be appreciated.
> > > Regards,
> > >
> > > Chan
> > > _______________________________________________
> > > Kernelnewbies mailing list
> > > Kernelnewbies@xxxxxxxxxxxxxxxxx
> > > http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies




[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