From: Steven Rostedt <rostedt@goodmis.org>
To: Ingo Molnar <mingo@elte.hu>
Cc: LKML <linux-kernel@vger.kernel.org>
Subject: Re: [RFC] logdev debugging memory device for tough to debug areas
Date: Tue, 29 Mar 2005 07:12:03 -0500 [thread overview]
Message-ID: <1112098323.3691.65.camel@localhost.localdomain> (raw)
In-Reply-To: <20050329115656.GA15708@elte.hu>
On Tue, 2005-03-29 at 13:56 +0200, Ingo Molnar wrote:
> > To have a task take back the ownership, I had the stealer call
> > task_blocks_on_lock on the task that it stole it from. To get this to
> > work, when a task is given the pending ownership, it doesn't NULL the
> > blocked_on at that point (although the waiter->task is set to NULL).
> > But this gives the race condition in pi_setprio where it checks for
> > p->blocked_on still exists. Reason is that I don't want the waking up
> > of a process to call any more locks. To solve this, I had to (and this
> > is what I don't like right now) add another flag for the process
> > called PF_BLOCKED. So that this can tell the pi_setprio when to stop.
> > This flag is set in task_blocks_on_lock and cleared in pick_new_owner
> > where the setting of blocked_on to NULL use to be.
>
> which locks are affected? I'd prefer the simplest solution. If there's
> more overhead with deadlock detection (which is a debugging feature),
> that doesnt matter much.
I've already covered the deadlock detection problems, and that didn't
add anymore overhead. That was just what kept breaking every time I
changed something ;-)
The overhead is caused by the pi_setprio knowing when to stop following
the chain of blocked processes. Since it can't check for p->blocked_on
== NULL anymore. I first had it check that or p->flags & PF_PENDOWNER,
but since the process waking up can happen at anytime without grabbing
any lock, this flag can be cleared as well as the blocked_on at the time
of this test. So I added another flag to p->flags to tell when the
process is locked and not pending ownership. I don't know yet if this
works, I have to run to an appointment now and I'll find out when I get
back.
Oh, and I disabled the deadlock check on the stolen case. So when a
pending owner goes back to blocked, right now it doesn't check the
deadlock, since the code uses current as the test, and that no longer
applies. So for now I have a test in task_blocks_on_lock to see if task
== current otherwise, don't check for deadlocks.
-- Steve
prev parent reply other threads:[~2005-03-29 12:15 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-02-22 0:39 [RFC] logdev debugging memory device for tough to debug areas Steven Rostedt
2005-03-29 9:07 ` Ingo Molnar
2005-03-29 11:53 ` Steven Rostedt
2005-03-29 11:56 ` Ingo Molnar
2005-03-29 12:12 ` Steven Rostedt [this message]
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=1112098323.3691.65.camel@localhost.localdomain \
--to=rostedt@goodmis.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
/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