This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: return probe not executed on SMP system


Hien Nguyen <hien@us.ibm.com> wrote on 2005-11-04 13:03:28:

> Guang Lei Li wrote:
> 
> >I applied your patch, and I also raise the maxaction from 1 to 10, then
> >it worked really well, all return probed are caught.
> > 
> >
> Do you mean maxactive? maxactive is not default to 1.

Thanks for your answer.

Yes, I mean maxactive, not maxaction.

I grep the systemTap source code, and found in line 2590 of tapsets.cxx:

 o->newline() << probe_name << ".maxactive = 1;";

So systemTap set the maxactive to 1. Am I right?

> 
> >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
> >        }
> > 
> >
> 
> By default maxactive is set to a value as in the #ifdef   #endif clause 
> above
> 
> >Is it appropriate to just delete "if (rp->maxactive <= 0)", to change 
the 
> >above block as:
> > 
> >
> No, you should not make that change. When register a return probe, user 
> has an option to change maxactive.
> We need to implement the systemtap's interface to make that change in 
> the future.
> 
for systemTap, the kretprobe would never change the maxactive because 
systemTap
has already set maxactive to 1.

We could implement a systemTap's interface to do this. But why not let 
kretprobe
automatically detects and sets the real value of maxactive?

> Hien.
> 
> 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]