From: george anzinger <george@mvista.com>
To: "linux-kernel@vger.redhat.com" <linux-kernel@vger.kernel.org>,
Andrew Morton <andrewm@uow.edu.au>
Subject: Lock ordering, inquiring minds want to know.
Date: Thu, 07 Dec 2000 15:07:18 -0800 [thread overview]
Message-ID: <3A301826.B483D19D@mvista.com> (raw)
In looking over sched.c I find:
spin_lock_irq(&runqueue_lock);
read_lock(&tasklist_lock);
This seems to me to be the wrong order of things. The read lock
unavailable (some one holds a write lock) for relatively long periods of
time, for example, wait holds it in a while loop. On the other hand the
runqueue_lock, being a "irq" lock will always be held for short periods
of time. It would seem better to wait for the runqueue lock while
holding the read_lock with the interrupts on than to wait for the
read_lock with interrupts off. As near as I can tell this is the only
place in the system that both of these locks are held (of course, all
cases of two locks being held at the same time, both locker must use the
same order). So...
What am I missing here?
George
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/
next reply other threads:[~2000-12-07 23:39 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-12-07 23:07 george anzinger [this message]
2000-12-08 1:53 ` Lock ordering, inquiring minds want to know Mike Kravetz
2000-12-08 21:53 ` george anzinger
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=3A301826.B483D19D@mvista.com \
--to=george@mvista.com \
--cc=andrewm@uow.edu.au \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox