From: Santosh Shukla <sshukla@mvista.com>
To: dsmith@redhat.com, jistone@redhat.com
Cc: systemtap@sourceware.org, Santosh Shukla <sshukla@mvista.com>
Subject: [SYSTEMTAP/PATCH v2 5/6] stp: rt: replace utrace_struct lock to stp style raw lock
Date: Tue, 16 Sep 2014 12:50:00 -0000 [thread overview]
Message-ID: <1410871795-12539-6-git-send-email-sshukla@mvista.com> (raw)
In-Reply-To: <1410871795-12539-1-git-send-email-sshukla@mvista.com>
Patch fixes below bug_on for -rt mode kernel:
[ 3375.430085] [<ffffffff815de469>] __schedule+0x5a9/0x700
[ 3375.430090] [<ffffffff815da3a4>] dump_stack+0x19/0x1b
[ 3375.430094] [<ffffffff815de5ea>] schedule+0x2a/0x90
[ 3375.430098] [<ffffffff815d49d7>] __schedule_bug+0xa0/0xae
[ 3375.430102] [<ffffffff815df525>] rt_spin_lock_slowlock+0xe5/0x2e0
[ 3375.430107] [<ffffffff815de469>] __schedule+0x5a9/0x700
[ 3375.430110] [<ffffffff815df935>] rt_spin_lock+0x25/0x30
[ 3375.430116] [<ffffffff815de5ea>] schedule+0x2a/0x90
[ 3375.430125] [<ffffffffa2f5ed5e>] task_utrace_struct+0x1e/0x40 [stap_eb141ade124ccb17a233482e6996651f_15664]
[ 3375.430131] [<ffffffff815df525>] rt_spin_lock_slowlock+0xe5/0x2e0
[ 3375.430138] [<ffffffffa2f6204b>] utrace_report_syscall_exit+0x4b/0x110 [stap_eb141ade124ccb17a233482e6996651f_15664]
[ 3375.430143] [<ffffffff815df935>] rt_spin_lock+0x25/0x30
[ 3375.430148] [<ffffffff810ea646>] ? __audit_syscall_exit+0x1f6/0x2a0
[ 3375.430156] [<ffffffffa2f5ed5e>] task_utrace_struct+0x1e/0x40 [stap_eb141ade124ccb17a233482e6996651f_15664]
[ 3375.430161] [<ffffffff81021d56>] syscall_trace_leave+0xd6/0xf0
[ 3375.430168] [<ffffffffa2f6204b>] utrace_report_syscall_exit+0x4b/0x110 [stap_eb141ade124ccb17a233482e6996651f_15664]
[ 3375.430173] [<ffffffff815e7af0>] int_check_syscall_exit_work+0x34/0x3d
[ 3375.430178] [<ffffffff810ea646>] ? __audit_syscall_exit+0x1f6/0x2a0
[ 3375.430184] [<ffffffff81021d56>] syscall_trace_leave+0xd6/0xf0
[ 3375.430191] [<ffffffff815e7af0>] int_check_syscall_exit_work+0x34/0x3d
Signed-off-by: Santosh Shukla <sshukla@mvista.com>
---
runtime/stp_utrace.c | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/runtime/stp_utrace.c b/runtime/stp_utrace.c
index e5d6d55..c69dec1 100644
--- a/runtime/stp_utrace.c
+++ b/runtime/stp_utrace.c
@@ -85,7 +85,7 @@ struct utrace {
static struct hlist_head task_utrace_table[TASK_UTRACE_TABLE_SIZE];
//DEFINE_MUTEX(task_utrace_mutex); /* Protects task_utrace_table */
-static DEFINE_SPINLOCK(task_utrace_lock); /* Protects task_utrace_table */
+static STP_DEFINE_SPINLOCK(task_utrace_lock); /* Protects task_utrace_table */
static struct kmem_cache *utrace_cachep;
static struct kmem_cache *utrace_engine_cachep;
@@ -468,7 +468,7 @@ static void utrace_shutdown(void)
#ifdef STP_TF_DEBUG
printk(KERN_ERR "%s:%d - freeing task-specific\n", __FUNCTION__, __LINE__);
#endif
- spin_lock(&task_utrace_lock);
+ stp_spin_lock(&task_utrace_lock);
for (i = 0; i < TASK_UTRACE_TABLE_SIZE; i++) {
head = &task_utrace_table[i];
stap_hlist_for_each_entry_safe(utrace, node, node2, head,
@@ -477,7 +477,7 @@ static void utrace_shutdown(void)
utrace_cleanup(utrace);
}
}
- spin_unlock(&task_utrace_lock);
+ stp_spin_unlock(&task_utrace_lock);
#ifdef STP_TF_DEBUG
printk(KERN_ERR "%s:%d - done\n", __FUNCTION__, __LINE__);
#endif
@@ -524,7 +524,7 @@ static bool utrace_task_alloc(struct task_struct *task)
stp_init_task_work(&utrace->work, &utrace_resume);
stp_init_task_work(&utrace->report_work, &utrace_report_work);
- spin_lock(&task_utrace_lock);
+ stp_spin_lock(&task_utrace_lock);
u = __task_utrace_struct(task);
if (u == NULL) {
hlist_add_head(&utrace->hlist,
@@ -533,7 +533,7 @@ static bool utrace_task_alloc(struct task_struct *task)
else {
kmem_cache_free(utrace_cachep, utrace);
}
- spin_unlock(&task_utrace_lock);
+ stp_spin_unlock(&task_utrace_lock);
return true;
}
@@ -552,9 +552,9 @@ static void utrace_free(struct utrace *utrace)
/* Remove this utrace from the mapping list of tasks to
* struct utrace. */
- spin_lock(&task_utrace_lock);
+ stp_spin_lock(&task_utrace_lock);
hlist_del(&utrace->hlist);
- spin_unlock(&task_utrace_lock);
+ stp_spin_unlock(&task_utrace_lock);
/* Free the utrace struct. */
stp_spin_lock(&utrace->lock);
@@ -595,9 +595,9 @@ static struct utrace *task_utrace_struct(struct task_struct *task)
{
struct utrace *utrace;
- spin_lock(&task_utrace_lock);
+ stp_spin_lock(&task_utrace_lock);
utrace = __task_utrace_struct(task);
- spin_unlock(&task_utrace_lock);
+ stp_spin_unlock(&task_utrace_lock);
return utrace;
}
--
1.8.3.1
next prev parent reply other threads:[~2014-09-16 12:50 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-16 12:50 [SYSTEMTAP/PATCH v2 0/6] RT aware systemtap patch set Santosh Shukla
2014-09-16 12:50 ` [SYSTEMTAP/PATCH v2 2/6] stp: rt: replace __stp_tf_map_lock rd/wr lock with stp style raw lock Santosh Shukla
2014-09-16 12:50 ` [SYSTEMTAP/PATCH v2 1/6] stp: rt: locking helper api Santosh Shukla
2014-09-16 12:50 ` [SYSTEMTAP/PATCH v2 6/6] stp: rt: replace __stp_tf_task_work_list_lock to stp raw Santosh Shukla
2014-09-16 12:50 ` [SYSTEMTAP/PATCH v2 3/6] stp: rt: replace __stp_tf_vma_lock rd/wr lock with stp style of raw lock Santosh Shukla
2014-09-16 12:50 ` Santosh Shukla [this message]
2014-09-16 12:57 ` [SYSTEMTAP/PATCH v2 4/6] stp: rt: replace utrace->lock with stp style " Santosh Shukla
2014-09-16 14:41 ` [SYSTEMTAP/PATCH v2 0/6] RT aware systemtap patch set Frank Ch. Eigler
2014-09-16 17:48 ` Santosh Shukla
2014-09-17 8:34 ` Santosh Shukla
2014-09-17 9:56 ` Santosh Shukla
2014-09-19 12:53 ` Santosh Shukla
2014-09-19 14:46 ` David Smith
2014-09-19 17:42 ` Santosh Shukla
2014-09-20 13:12 ` Santosh Shukla
2014-09-22 13:50 ` David Smith
2014-09-22 16:11 ` 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=1410871795-12539-6-git-send-email-sshukla@mvista.com \
--to=sshukla@mvista.com \
--cc=dsmith@redhat.com \
--cc=jistone@redhat.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).