From: Santosh Shukla <sshukla@mvista.com>
To: systemtap@sourceware.org
Cc: sshukla@mvista.com
Subject: [SYSTEMTAP/PATCH 1/4] rt : replace __stp_tf_task_work_list_lock to raw_
Date: Tue, 09 Sep 2014 07:08:00 -0000 [thread overview]
Message-ID: <1410246499-6938-2-git-send-email-sshukla@mvista.com> (raw)
In-Reply-To: <1410246499-6938-1-git-send-email-sshukla@mvista.com>
Fixes this bug_on for -rt case :
[ 2184.284672] [<ffffffff81602329>] dump_stack+0x4e/0x7a
[ 2184.284679] [<ffffffff815fcaed>] __schedule_bug+0x9f/0xad
[ 2184.284686] [<ffffffff816057f7>] __schedule+0x627/0x6a0
[ 2184.284694] [<ffffffff810be5fb>] ? task_blocks_on_rt_mutex+0x19b/0x220
[ 2184.284699] [<ffffffff816058a0>] schedule+0x30/0xa0
[ 2184.284707] [<ffffffff8160727d>] rt_spin_lock_slowlock+0xbd/0x1f0
[ 2184.284714] [<ffffffff81607e25>] rt_spin_lock+0x25/0x30
[ 2184.284727] [<ffffffffa08ae573>] __stp_tf_alloc_task_work+0x43/0x90 [stap_63e05c06fe2b0c2d17f8d8e096a4ee8a__1700]
[ 2184.284737] [<ffffffffa08aff8b>] __stp_utrace_task_finder_target_syscall_exit+0xdb/0x350 [stap_63e05c06fe2b0c2d17f8d8e096a4ee8a__1700]
[ 2184.284747] [<ffffffffa08a91d5>] utrace_report_syscall_exit+0xc5/0x110 [stap_63e05c06fe2b0c2d17f8d8e096a4ee8a__1700]
[ 2184.284753] [<ffffffff81023ce0>] syscall_trace_leave+0x100/0x130
[ 2184.284758] [<ffffffff8161090b>] int_check_syscall_exit_work+0x34/0x3d
Signed-off-by: Santosh Shukla <sshukla@mvista.com>
---
runtime/linux/task_finder2.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/runtime/linux/task_finder2.c b/runtime/linux/task_finder2.c
index e88543a..afe8835 100644
--- a/runtime/linux/task_finder2.c
+++ b/runtime/linux/task_finder2.c
@@ -95,7 +95,7 @@ struct stap_task_finder_target {
};
static LIST_HEAD(__stp_tf_task_work_list);
-static DEFINE_SPINLOCK(__stp_tf_task_work_list_lock);
+static DEFINE_RAW_SPINLOCK(__stp_tf_task_work_list_lock);
struct __stp_tf_task_work {
struct list_head list;
struct task_struct *task;
@@ -132,9 +132,9 @@ __stp_tf_alloc_task_work(void *data)
// list for easier lookup, but as short as the list should be
// (and as short lived as these items are) the extra overhead
// probably isn't worth the effort.
- spin_lock_irqsave(&__stp_tf_task_work_list_lock, flags);
+ raw_spin_lock_irqsave(&__stp_tf_task_work_list_lock, flags);
list_add(&tf_work->list, &__stp_tf_task_work_list);
- spin_unlock_irqrestore(&__stp_tf_task_work_list_lock, flags);
+ raw_spin_unlock_irqrestore(&__stp_tf_task_work_list_lock, flags);
return &tf_work->work;
}
@@ -150,14 +150,14 @@ static void __stp_tf_free_task_work(struct task_work *work)
tf_work = container_of(work, struct __stp_tf_task_work, work);
// Remove the item from the list.
- spin_lock_irqsave(&__stp_tf_task_work_list_lock, flags);
+ raw_spin_lock_irqsave(&__stp_tf_task_work_list_lock, flags);
list_for_each_entry(node, &__stp_tf_task_work_list, list) {
if (tf_work == node) {
list_del(&tf_work->list);
break;
}
}
- spin_unlock_irqrestore(&__stp_tf_task_work_list_lock, flags);
+ raw_spin_unlock_irqrestore(&__stp_tf_task_work_list_lock, flags);
// Actually free the data.
_stp_kfree(tf_work);
@@ -173,14 +173,14 @@ static void __stp_tf_cancel_task_work(void)
unsigned long flags;
// Cancel all remaining requests.
- spin_lock_irqsave(&__stp_tf_task_work_list_lock, flags);
+ raw_spin_lock_irqsave(&__stp_tf_task_work_list_lock, flags);
list_for_each_entry_safe(node, tmp, &__stp_tf_task_work_list, list) {
// Remove the item from the list, cancel it, then free it.
list_del(&node->list);
stp_task_work_cancel(node->task, node->work.func);
_stp_kfree(node);
}
- spin_unlock_irqrestore(&__stp_tf_task_work_list_lock, flags);
+ raw_spin_unlock_irqrestore(&__stp_tf_task_work_list_lock, flags);
}
static u32
--
1.7.9.5
next prev parent reply other threads:[~2014-09-09 7:08 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-09 7:08 [SYSTEMTAP/PATCH 0/4] RT aware systemtap patch set Santosh Shukla
2014-09-09 7:08 ` Santosh Shukla [this message]
2014-09-09 7:08 ` [SYSTEMTAP/PATCH 3/4] rt : stp_utrace.c : replace utrace->lock with raw_lock Santosh Shukla
2014-09-09 7:08 ` [SYSTEMTAP/PATCH 2/4] rt : replace read write lock with rcu Santosh Shukla
2014-09-09 7:09 ` [SYSTEMTAP/PATCH 4/4] rt : replace utrace_struct lock to raw lock Santosh Shukla
2014-09-15 10:17 ` [SYSTEMTAP/PATCH 0/4] RT aware systemtap patch set Santosh Shukla
2014-09-15 14:13 ` David Smith
2014-09-15 15:41 ` Santosh Shukla
2014-09-15 16:22 ` Josh Stone
2014-09-15 16:35 ` Santosh Shukla
2014-09-15 16:45 ` Josh Stone
2014-09-15 16:48 ` Santosh Shukla
2014-09-15 16:51 ` Santosh Shukla
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=1410246499-6938-2-git-send-email-sshukla@mvista.com \
--to=sshukla@mvista.com \
--cc=systemtap@sourceware.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).