From: Robert Love <rml@tech9.net>
To: dan carpenter <error27@email.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: calling schedule() from interupt context
Date: 22 Nov 2002 04:14:06 -0500 [thread overview]
Message-ID: <1037956446.1254.3890.camel@phantasy> (raw)
In-Reply-To: <20021122085441.2127.qmail@email.com>
On Fri, 2002-11-22 at 03:54, dan carpenter wrote:
(Next time trim your CC list: none of those poor guys needed this
email..)
> In drivers/net/tokenring/3c359.c xl_interrupt() calls schedule().
> The path from xl_interupt to schedule is:
> xl_rx ==> netif_rx ==>
> kfree_skb ==> __kfree_skb ==>
> secpath_put ==> __secpath_destroy ==>
> xfrm_state_put ==> __xfrm_state_destroy ==> xfrm_put_type ==>
> module_put ==> put_cpu ==> preempt_schedule ==> schedule
Are you actually seeing this code path or is this just what your script
is showing you?
preempt_schedule() will not call schedule() if the preempt_count is
non-zero. Inside an interrupt handler, it is always at least one. So
nothing will drop it to zero, and we will never preempt.
> The third thing I was wondering is: xl_interupt is holding a
> spin_lock(&xl_priv->xl_lock). I know that you're not supposed to call shedule()
> while holding a spin lock, but is it ok to call preempt_schedule()?
Same as above. preempt_schedule() only calls schedule when
preempt_count is zero. It is not if you hold a lock, and it is not
inside an interrupt handler.
Robert Love
next prev parent reply other threads:[~2002-11-22 9:07 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-11-22 8:54 calling schedule() from interupt context dan carpenter
2002-11-22 9:09 ` David S. Miller
2002-11-22 9:16 ` Robert Love
2002-11-24 21:42 ` Rusty Russell
2002-11-24 22:41 ` Robert Love
2002-11-22 9:14 ` Robert Love [this message]
-- strict thread matches above, loose matches on Subject: below --
2002-11-22 16:04 dan carpenter
2002-11-22 16:11 ` Robert Love
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=1037956446.1254.3890.camel@phantasy \
--to=rml@tech9.net \
--cc=error27@email.com \
--cc=linux-kernel@vger.kernel.org \
/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.