From: kanoj@google.engr.sgi.com (Kanoj Sarcar)
To: riel@nl.linux.org
Cc: "Stephen C. Tweedie" <sct@redhat.com>,
linux-mm@kvack.org, linux-kernel@vger.rutgers.edu,
torvalds@transmeta.com
Subject: Re: [patch] 2.3.99-pre6-3 VM fixed
Date: Thu, 27 Apr 2000 13:20:24 -0700 (PDT) [thread overview]
Message-ID: <200004272020.NAA00247@google.engr.sgi.com> (raw)
In-Reply-To: <Pine.LNX.4.21.0004271647461.3919-100000@duckman.conectiva> from "Rik van Riel" at Apr 27, 2000 04:56:11 PM
>
> This suggests a locking issue. Is there any place in the kernel
> where we take a write lock on tasklist_lock and do a lock_kernel()
> afterwards?
>
> Alternatively, the mm->lock, kernel_lock and/or tasklist_lock could
> be in play all three... Could the changes to ptrace.c be involved
> here?
>
I really need to learn the locking rules for the kernel. As far as
I can see, lock_kernel is a spinning monitor, so any intr code should
be able to grab lock_kernel. Hence, code that is bracketed with a
read_lock(tasklist_lock) .... read_unlock(tasklist_lock) can take an
intr and be trying to get lock_kernel.
Coming to your question, the above does not seem to be the case
for write lock on tasklist_lock, since the irq level is raised.
[kanoj@entity linux]$ gid tasklist_lock | grep -v unlock | grep write | grep -v ar
ch
include/linux/sched.h:844: write_lock_irq(&tasklist_lock);
kernel/exit.c:365: write_lock_irq(&tasklist_lock);
kernel/exit.c:394: write_lock_irq(&tasklist_lock);
kernel/exit.c:515: write_lock_irq(&tasklist_lock);
kernel/fork.c:741: write_lock_irq(&tasklist_lock);
And I don't _think_ that any of this code takes the kernel_lock either
in the straightline execution path.
Kanoj
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux.eu.org/Linux-MM/
next prev parent reply other threads:[~2000-04-27 20:20 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-04-26 13:36 [patch] 2.3.99-pre6-3 VM fixed Rik van Riel
2000-04-27 16:28 ` Stephen C. Tweedie
2000-04-27 19:56 ` Rik van Riel
2000-04-27 20:20 ` Kanoj Sarcar [this message]
2000-04-27 21:24 ` Linus Torvalds
2000-04-28 15:50 ` Linus Torvalds
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=200004272020.NAA00247@google.engr.sgi.com \
--to=kanoj@google.engr.sgi.com \
--cc=linux-kernel@vger.rutgers.edu \
--cc=linux-mm@kvack.org \
--cc=riel@nl.linux.org \
--cc=sct@redhat.com \
--cc=torvalds@transmeta.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.