From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13325 invoked by alias); 9 Sep 2014 07:08:47 -0000 Mailing-List: contact systemtap-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: systemtap-owner@sourceware.org Received: (qmail 13223 invoked by uid 89); 9 Sep 2014 07:08:46 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-pd0-f173.google.com Received: from mail-pd0-f173.google.com (HELO mail-pd0-f173.google.com) (209.85.192.173) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Tue, 09 Sep 2014 07:08:45 +0000 Received: by mail-pd0-f173.google.com with SMTP id ft15so6419623pdb.32 for ; Tue, 09 Sep 2014 00:08:43 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=JMu72LnZBZwmHoALSFn4pfS8hiSWX/Q60Yz+6ob9ztc=; b=KW4M5qQNdz8ZE3KKSv/XecxEtcEzhnyehQQ+sA80uEkmt0LIFRkn4P57yg+YzYkJbZ XPyZUMLwM2ICKpwH0oAW0l2vcpbz3NFuwHstKI0KXB4D4dRRP01oeYoF8Fs3Zbue5Q4k crsElVvxizR8ur0fLJkFwYD2iFn3svk/jLhsI4NkwKnYFa6Kp0x9N1kJhkyvF4wRgnHS iIB0iwOmHPnrAbrNydRaUA44Pj3mFgtf8BvfUSomf/Uts52Lv4ZahO2VxjF7xH179UUc VVfPLMzfv5NCkpqQXUg4N0HUX5sn6JnIYTkXFxjszyD2L+477qNtKPxRnGF+LGMEwceF mvww== X-Gm-Message-State: ALoCoQm4tH/sQyH6rrdWTY2v8CewruZVJguyXnZpXtb98BuqO7AZTVTa7F48pKoAQ/94/5/8jkmd X-Received: by 10.66.65.133 with SMTP id x5mr53025943pas.26.1410246523680; Tue, 09 Sep 2014 00:08:43 -0700 (PDT) Received: from santosh-Latitude-E5530-non-vPro.10.0.0.5 ([111.93.218.67]) by mx.google.com with ESMTPSA id gi14sm1220187pbd.10.2014.09.09.00.08.40 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 09 Sep 2014 00:08:43 -0700 (PDT) From: Santosh Shukla 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 Message-Id: <1410246499-6938-2-git-send-email-sshukla@mvista.com> In-Reply-To: <1410246499-6938-1-git-send-email-sshukla@mvista.com> References: <1410246499-6938-1-git-send-email-sshukla@mvista.com> X-SW-Source: 2014-q3/txt/msg00239.txt.bz2 Fixes this bug_on for -rt case : [ 2184.284672] [] dump_stack+0x4e/0x7a [ 2184.284679] [] __schedule_bug+0x9f/0xad [ 2184.284686] [] __schedule+0x627/0x6a0 [ 2184.284694] [] ? task_blocks_on_rt_mutex+0x19b/0x220 [ 2184.284699] [] schedule+0x30/0xa0 [ 2184.284707] [] rt_spin_lock_slowlock+0xbd/0x1f0 [ 2184.284714] [] rt_spin_lock+0x25/0x30 [ 2184.284727] [] __stp_tf_alloc_task_work+0x43/0x90 [stap_63e05c06fe2b0c2d17f8d8e096a4ee8a__1700] [ 2184.284737] [] __stp_utrace_task_finder_target_syscall_exit+0xdb/0x350 [stap_63e05c06fe2b0c2d17f8d8e096a4ee8a__1700] [ 2184.284747] [] utrace_report_syscall_exit+0xc5/0x110 [stap_63e05c06fe2b0c2d17f8d8e096a4ee8a__1700] [ 2184.284753] [] syscall_trace_leave+0x100/0x130 [ 2184.284758] [] int_check_syscall_exit_work+0x34/0x3d Signed-off-by: Santosh Shukla --- 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