All of lore.kernel.org
 help / color / mirror / Atom feed
From: Oleg Nesterov <oleg@tv-sign.ru>
To: linux-kernel@vger.kernel.org
Cc: Robert Love <rml@tech9.net>
Subject: Re: Q: preemptible kernel and interrupts consistency.
Date: Fri, 12 Jul 2002 01:19:09 +0400	[thread overview]
Message-ID: <3D2DF64D.838BD6D6@tv-sign.ru> (raw)
In-Reply-To: 1026420107.1178.279.camel@sinai

Hello.

Robert Love wrote:
> However, the only places that set need_resched like that are the
> scheduler and they do so also under lock so we are safe.

Safe? Look, if process does not hold any spinlock and interrupts
disabled, then any distant implicit call to resched_task() silently
enables irqs. At least, this must be documented.

> Also, in your example, being in an interrupt handler bumps the
> preempt_count so even the scenario you give will not cause a
> preemption.  If we did not bump the unlock, then your example would give
> a lot of "scheduling in interrupt" BUGs so we would know it ;-)

No, I meant process context in both scenarios! Note also, that it
happens even in UP case.

> All that said, there is a bug: the send_reschedule IPI can set
> need_resched on another CPU.  If the other CPU happens to have
> interrupts disabled, we can in fact preempt.

I can't see, how this can happen. Can you explain?
But it seems unrelated...

Oleg.

  reply	other threads:[~2002-07-11 21:13 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-07-11 20:33 Q: preemptible kernel and interrupts consistency Oleg Nesterov
2002-07-11 20:41 ` Robert Love
2002-07-11 21:19   ` Oleg Nesterov [this message]
2002-07-11 21:28     ` Robert Love
2002-07-11 22:07       ` Oleg Nesterov

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=3D2DF64D.838BD6D6@tv-sign.ru \
    --to=oleg@tv-sign.ru \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rml@tech9.net \
    /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.