public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
* [SYSTEMTAP/PATCH 0/4] RT aware systemtap patch set
@ 2014-09-09  7:08 Santosh Shukla
  2014-09-09  7:08 ` [SYSTEMTAP/PATCH 2/4] rt : replace read write lock with rcu Santosh Shukla
                   ` (4 more replies)
  0 siblings, 5 replies; 13+ messages in thread
From: Santosh Shukla @ 2014-09-09  7:08 UTC (permalink / raw)
  To: systemtap; +Cc: sshukla

Hi,

I wanted to run systemtap on -rt kernel version 3.14.12-rt9 and noticed bunch of preemptible
bug_on.This is initial effort to make systemtap rt-aware. Tested on 3.14.12-rt
kernel.  Patchset based on stap upstream link [1], build on commit-id [2].
Patchset can work on master branch with little tweak in patch set.

I have also tested this patch set in 3.10.40-rt38 kernel noticed few preemptible
bug_on but those were coming from kernel and no improvement observed in
systemtap side.

Change summary -
- Replaced read lock with rcu_read_lock such that read_lock_irqsave lock substituion is
  rcu_read_lock + local_irq_save and for read_unlock_irqsave lock substitution is 
  local_irq_restore followed bu rcu_read_unlock.

- Replaced write_lock_irqsave/restore with raw_spinlock_irqsave/restore for -rt kernel.
  And for non-rt kernel those raw_ lock should get replaced by normal spin_lock.

- Replaced hlist api to rcu type api.

Test script used for testing :
/usr/local/stap/bin/stap -v testsuite/systemtap.examples/network/netdev.stp
/usr/local/stap/bin/stap -v testsuite/systemtap.examples/network/tcpdumplike.stp

Few other test example script used :
cat ../test-indent.stp
probe kernel.function("*@net/socket.c").call
{
	          printf ("%s -> %s\n", thread_indent(1), probefunc())
}
probe kernel.function("*@net/socket.c").return
{
	          printf ("%s <- %s\n", thread_indent(-1), probefunc())
}


Like know feedback, comment on patch set. also Does it make sense to maintain
systemtap -rt version in upstream.. do we care?

[1] git://sourceware.org/git/systemtap.git
[2] git checkout 8f0fcd995f7f650a2ee0a94539f90c99e6d19e1d

Santosh Shukla (4):
  rt : replace __stp_tf_task_work_list_lock to raw_
  rt : replace read write lock with rcu
  rt : stp_utrace.c : replace utrace->lock with raw_lock
  rt : replace utrace_struct lock to raw lock

 runtime/linux/addr-map.c        |   16 ++++---
 runtime/linux/runtime.h         |    2 +-
 runtime/linux/task_finder2.c    |   14 +++---
 runtime/linux/task_finder_map.c |   38 ++++++++-------
 runtime/stp_utrace.c            |  100 +++++++++++++++++++--------------------
 runtime/task_finder_vma.c       |   43 +++++++++--------
 6 files changed, 112 insertions(+), 101 deletions(-)

-- 
1.7.9.5

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2014-09-15 16:51 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-09-09  7:08 [SYSTEMTAP/PATCH 0/4] RT aware systemtap patch set Santosh Shukla
2014-09-09  7:08 ` [SYSTEMTAP/PATCH 2/4] rt : replace read write lock with rcu Santosh Shukla
2014-09-09  7:08 ` [SYSTEMTAP/PATCH 1/4] rt : replace __stp_tf_task_work_list_lock to raw_ Santosh Shukla
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: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

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).