All of lore.kernel.org
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: Mark Gross <mgross@linux.intel.com>
Cc: LKML <linux-kernel@vger.kernel.org>
Subject: Re: queue_work from interrupt Real time preemption2.6.11-rc2-RT-V0.7.37-03
Date: Mon, 14 Feb 2005 16:24:09 -0500	[thread overview]
Message-ID: <1108416249.8413.54.camel@localhost.localdomain> (raw)
In-Reply-To: <200502141240.14355.mgross@linux.intel.com>

On Mon, 2005-02-14 at 12:40 -0800, Mark Gross wrote:
> I'm working on a tweak to the preepmtive soft IRQ implementation using work 
> queues and I'm having problems with a BUG assert when trying to queue_work.
> 
> Souldn't I be able to call queue_work form ISR context?

Yes, but not with interrupts disabled.
> 
> --mgross 
> 
> ---------------------------
> | preempt count: 00000001 ]
> | 1-level deep critical section nesting:
> ----------------------------------------
> .. [<c0140f5d>] .... print_traces+0x1d/0x60
> .....[<c01042a3>] ..   ( <= dump_stack+0x23/0x30)
> 
> BUG: sleeping function called from invalid context IRQ 20(2039) at kernel/rt.c
> in_atomic():0 [00000000], irqs_disabled():1

Here you have interrupts disabled. Since you are tweaking the softirq I
don't know your code, but the kernel should not schedule after turning
off interrupts, and the spinlocks under the PREEMPT kernel, may now
sleep (unless they are raw_spin_locks).  Here we also see that
queue_work calls spin_lock_irqsave.  I'm suspecting that you turned off
interrupts somewhere.

-- Steve



  reply	other threads:[~2005-02-14 21:24 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-02-14 20:40 queue_work from interrupt Real time preemption2.6.11-rc2-RT-V0.7.37-03 Mark Gross
2005-02-14 21:24 ` Steven Rostedt [this message]
2005-02-14 22:29   ` Mark Gross
2005-02-15 10:41     ` Ingo Molnar
2005-02-15 18:06       ` Mark Gross
2005-02-16  5:16         ` Ingo Molnar
2005-02-16 16:11           ` David S. Miller
2005-02-16 17:59             ` George Anzinger
2005-02-16 22:55               ` Mark Gross
2005-02-16 18:02             ` Steven Rostedt
2005-02-17  7:57               ` Ingo Molnar
2005-02-17 15:13                 ` Steven Rostedt
2005-02-17  7:52             ` Ingo Molnar
2005-02-17 14:57               ` Steven Rostedt
2005-02-17 16:14                 ` Mark Gross
2005-03-29  8:57                   ` Ingo Molnar
2005-03-31 18:41                     ` Mark Gross
2005-04-01  5:55                       ` Ingo Molnar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1108416249.8413.54.camel@localhost.localdomain \
    --to=rostedt@goodmis.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mgross@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.