All of lore.kernel.org
 help / color / mirror / Atom feed
From: j.neuschaefer@gmx.net (Jonathan Neuschäfer)
To: kernelnewbies@lists.kernelnewbies.org
Subject: When is to preempt safe?
Date: Fri, 7 Oct 2011 18:44:17 +0200	[thread overview]
Message-ID: <20111007164417.GB1475@debian.debian> (raw)
In-Reply-To: <CAOXENUj1DAGQ9-=N9VvU-ik9KDaTNHwWqEsDP6RPj=nrBpogQw@mail.gmail.com>

On Fri, Oct 07, 2011 at 07:27:12PM +0800, Parmenides wrote:
> 2. Another statement from Love is that "the kernel can preempt a task
> running in the kernel so long as it does not hold a lock". Why is it
> not safe while kernel code holding lock?

If you preempt while a lock is being held, another task could try to
acquire the same lock, causing a deadlock.

HTH,
	Jonathan Neusch?fer

  parent reply	other threads:[~2011-10-07 16:44 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-07 11:27 When is to preempt safe? Parmenides
2011-10-07 16:32 ` Chetan Nanda
2011-10-08 16:19   ` Parmenides
2011-10-08 17:09     ` Daniel Baluta
2011-10-08 17:32       ` Dave Hylands
2011-10-09 11:52       ` Parmenides
2011-10-09 13:52         ` michi1 at michaelblizek.twilightparadox.com
2011-10-09  6:42     ` Michael Blizek
2011-10-07 16:44 ` Jonathan Neuschäfer [this message]
2011-10-07 19:39 ` Michael Blizek
2011-10-08 16:24   ` Parmenides
2011-10-09  6:29     ` Michael Blizek
2011-10-09  6:53       ` Dave Hylands
2011-10-09 13:44         ` michi1 at michaelblizek.twilightparadox.com

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=20111007164417.GB1475@debian.debian \
    --to=j.neuschaefer@gmx.net \
    --cc=kernelnewbies@lists.kernelnewbies.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.