From: Guang Lei Li <liguangl@cn.ibm.com>
To: Hien Nguyen <hien@us.ibm.com>
Cc: systemtap@sources.redhat.com
Subject: Re: return probe not executed on SMP system
Date: Fri, 04 Nov 2005 02:11:00 -0000 [thread overview]
Message-ID: <OF18981512.2A2075F9-ON482570AF.000985DF-482570AF.000C01AB@cn.ibm.com> (raw)
In-Reply-To: <436AB51D.9040307@us.ibm.com>
Hien Nguyen <hien@us.ibm.com> wrote on 2005-11-04 09:10:53:
> Hi,
> After looking deep into this issue I found out the problem is in the
> stpd. The sptd unloads the systemtap module a little too early before
> the return probes have a chance to fire their handlers.
>
> If you have the systemtap src tree try this tempory_fix.patch. I will
> file a bugzilla tomorrow.
>
> Hien.
>
I applied your patch, and I also raise the maxaction from 1 to 10, then
it worked really well, all return probed are caught.
But the default setting of maxaction to 1 is too low for a multi-processor
system. It will cause a lot of misses of kretprobe(I counter it on Power5
system for a while, about 2000 kprobes are caught, but only about 400
kretprobe was caught, so about 1600 kretprobes are missed)
I read the "kernel/kprobes.c", and found:
/* Pre-allocate memory for max kretprobe instances */
if (rp->maxactive <= 0) {
#ifdef CONFIG_PREEMPT
rp->maxactive = max(10, 2 * NR_CPUS);
#else
rp->maxactive = NR_CPUS;
#endif
}
Is it appropriate to just delete "if (rp->maxactive <= 0)", to change the
above block as:
#ifdef CONFIG_PREEMPT
rp->maxactive = max(10, 2 * NR_CPUS);
#else
rp->maxactive = NR_CPUS;
#endif
so that kretprobe will never miss on a multi-processor system?
Thanks for your help.
next prev parent reply other threads:[~2005-11-04 2:11 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-11-03 14:01 Guang Lei Li
2005-11-03 16:58 ` Hien Nguyen
2005-11-04 1:11 ` Hien Nguyen
2005-11-04 2:11 ` Guang Lei Li [this message]
2005-11-04 5:03 ` Hien Nguyen
2005-11-04 5:34 ` Guang Lei Li
2005-11-04 6:06 ` Hien Nguyen
2005-11-04 6:15 ` Hien Nguyen
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=OF18981512.2A2075F9-ON482570AF.000985DF-482570AF.000C01AB@cn.ibm.com \
--to=liguangl@cn.ibm.com \
--cc=hien@us.ibm.com \
--cc=systemtap@sources.redhat.com \
/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).