[ltt-dev] (forw) [chris.meyers.fsu at gmail.com: Re: ltt channel thread safe?]

Fu Juntang(David) juntang.fu at windriver.com
Sun Aug 15 22:45:17 EDT 2010


Hi,Mathieu:
  
> It all looks fine so far. Note that the Linux scheduler can decide to
> schedule your 2 threads on the same CPU. How do you detect that there is
> a "problem": is it that events you are writing from a specific thread
> are missing or that you expect events on CPU 1 and don't have any ?
> 
I can monitor which cpu core my threads are running on by the function:
  sched_getcpu()
.
the events are missing in other core.

thanks


On Fri, 2010-08-13 at 08:24 -0400, Mathieu Desnoyers wrote:
> * Fu Juntang(David) (juntang.fu at windriver.com) wrote:
> > Hi,Mathieu:
> >   Please see my answer inline:
> > 
> > On Thu, 2010-08-12 at 09:40 -0400, Mathieu Desnoyers wrote:
> > > * Fu Juntang(David) (juntang.fu at windriver.com) wrote:
> > > > Hi,Mathieu:
> > > >   I have found another UST bug in this multi-thread functions:
> > > >   in my SMP host(2 cpu cores),I have found that UST can only collect one
> > > >  thread trace logs running one core(CPU_1),but can not collect the 
> > > >  other thread trace logs running another core(CPU_0),is this a known
> > > > bug?
> > > >   if you need my debug logs, I can attach it to you. 
> > > 
> [...]
> > > Can you try putting a printf in 
> > > 
> > > ust/libust/buffer.c: get_n_cpus() to see how many CPUs the library
> > > detects ?
> > > 
> > yes,sure, the output says that it detects 2 cpus
> > 
> > > What does your usttrace directory looks like ? (the subdir containing
> > > the ust and metadata files... with ls -al)
> > > 
> > total 24
> > drwxr-xr-x 2 david david 4096 2010-08-13 15:30 .
> > drwxr-xr-x 3 david david 4096 2010-08-13 15:30 ..
> > -rw------- 1 david david 4096 2010-08-13 15:30 metadata_0
> > -rw------- 1 david david 4096 2010-08-13 15:30 metadata_1
> > -rw------- 1 david david 4096 2010-08-13 15:30 ust_0
> > -rw------- 1 david david 4096 2010-08-13 15:30 ust_1
> > 
> 
> It all looks fine so far. Note that the Linux scheduler can decide to
> schedule your 2 threads on the same CPU. How do you detect that there is
> a "problem": is it that events you are writing from a specific thread
> are missing or that you expect events on CPU 1 and don't have any ?
> 
> The latter case could be normal.
> 
> Thanks,
> 
> Mathieu
> 





More information about the lttng-dev mailing list