From: john cooper <john.cooper@timesys.com>
To: Oleg Nesterov <oleg@tv-sign.ru>
Cc: Trond Myklebust <trond.myklebust@fys.uio.no>,
linux-kernel@vger.kernel.org, Ingo Molnar <mingo@elte.hu>,
Olaf Kirch <okir@suse.de>, john cooper <john.cooper@timesys.com>
Subject: Re: RT and Cascade interrupts
Date: Wed, 01 Jun 2005 14:05:18 -0400 [thread overview]
Message-ID: <429DF8DE.7060008@timesys.com> (raw)
In-Reply-To: <429DC4A8.BFF69FB3@tv-sign.ru>
Oleg Nesterov wrote:
> This all is very unlikely of course, but it would be nice to verify
> that kernel/timer.c is not the source of the problem.
The problem I am seeing is on a single CPU system.
> John, if it is easy to reproduce the problem, could you please retest
> with this patch?
I've done so and the second assert is generated
when running the test. So here we have a case
of RPC_TASK_HAS_TIMER set but the associated
timer->base == NULL. It would seem this could
easily be the scenario of executing in:
__run_timers()
timer->base = NULL;
rpc_run_timer()
task->tk_timeout_fn(task)
/* ksoftirqd preempted */
:
/* RPC client */
rpc_execute()
rpc_delete_timer()
del_timer() returns 0
BUG_ON(test_bit(RPC_TASK_HAS_TIMER,
&task->tk_runstate));
:
/* rpc_run_timer() resumes */
clear_bit(RPC_TASK_HAS_TIMER,
&task->tk_runstate);
I don't see how this would imply a kernel/timer.c
problem. It also appears this wouldn't be causing
the timer cascade corruption I've seen as the
end result is deleting an already dequeued timer
which is safe here.
BTW, if preemption is explicitly disabled in rpc_run_timer()
the BUG_ON assert is not generated nor (as reported
earlier) does the cascade corruption occur. I'm still
investigating.
-john
> --- 2.6.12-rc5/net/sunrpc/sched.c~ Wed Jun 1 17:49:57 2005
> +++ 2.6.12-rc5/net/sunrpc/sched.c Wed Jun 1 18:00:31 2005
> @@ -137,8 +137,12 @@ rpc_delete_timer(struct rpc_task *task)
> {
> if (RPC_IS_QUEUED(task))
> return;
> - if (test_and_clear_bit(RPC_TASK_HAS_TIMER, &task->tk_runstate)) {
> - del_singleshot_timer_sync(&task->tk_timer);
> + if (test_bit(RPC_TASK_HAS_TIMER, &task->tk_runstate)) {
> + if (del_singleshot_timer_sync(&task->tk_timer)) {
> + BUG_ON(!test_bit(RPC_TASK_HAS_TIMER, &task->tk_runstate));
> + clear_bit(RPC_TASK_HAS_TIMER, &task->tk_runstate);
> + } else
> + BUG_ON(test_bit(RPC_TASK_HAS_TIMER, &task->tk_runstate));
> dprintk("RPC: %4d deleting timer\n", task->tk_pid);
> }
> }
>
--
john.cooper@timesys.com
next prev parent reply other threads:[~2005-06-01 18:13 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-05-27 16:47 RT and Cascade interrupts Oleg Nesterov
2005-05-27 23:37 ` john cooper
2005-05-28 8:52 ` Oleg Nesterov
2005-05-28 14:02 ` john cooper
2005-05-28 16:34 ` Oleg Nesterov
2005-05-28 17:48 ` john cooper
2005-05-28 20:35 ` Trond Myklebust
2005-05-29 3:12 ` john cooper
2005-05-29 7:40 ` Trond Myklebust
2005-05-30 21:32 ` john cooper
2005-05-31 23:09 ` john cooper
2005-06-01 14:22 ` Oleg Nesterov
2005-06-01 18:05 ` john cooper [this message]
2005-06-01 18:31 ` Trond Myklebust
2005-06-01 19:20 ` john cooper
2005-06-01 19:46 ` Trond Myklebust
2005-06-01 20:21 ` Trond Myklebust
2005-06-01 20:59 ` john cooper
2005-06-01 22:51 ` Trond Myklebust
2005-06-01 23:09 ` Trond Myklebust
2005-06-02 3:31 ` john cooper
2005-06-02 4:26 ` Trond Myklebust
2005-06-09 23:17 ` George Anzinger
2005-06-09 23:52 ` john cooper
2005-05-29 11:31 ` Oleg Nesterov
2005-05-29 13:58 ` Trond Myklebust
2005-05-30 14:50 ` Ingo Molnar
2005-05-28 22:17 ` Trond Myklebust
-- strict thread matches above, loose matches on Subject: below --
2005-05-12 14:43 Daniel Walker
2005-05-13 7:44 ` Ingo Molnar
2005-05-13 13:12 ` john cooper
2005-05-24 16:32 ` john cooper
2005-05-27 7:25 ` Ingo Molnar
2005-05-27 13:53 ` john cooper
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=429DF8DE.7060008@timesys.com \
--to=john.cooper@timesys.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=okir@suse.de \
--cc=oleg@tv-sign.ru \
--cc=trond.myklebust@fys.uio.no \
/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