[ofw] RE: patch: [ipoib] Add code to track the adapters (fordebuggingonly)
Leonid Keller
leonid at mellanox.co.il
Mon Oct 26 04:31:17 PDT 2009
> > Tzachi Dar wrote on Thu, 8 Oct 2009 at 04:29:58:
> >
> > > This code is being used for easier debugging. It allows one
> > to connect to a live system with a local kernel debugger and see the
> > adapters state.
I've come across the same problem - to decrease the time of getting to
the necessary info while debugging the live system.
I'd like to solve it in a bit more general way.
Namely, add to all drivers of interest a global structure g_stat, which
contains pointers to all information, important for debugging.
One can add more fields to these structures on need, but all info will
be still kept in one place.
The attached patch adds two such structures to ipoib and ibbus.
It comes to replace the patch, suggested by Tzachi.
An example of a real problem: MLX4 driver is stuck on unload.
It can happen when IBAL is stuck on resource reclamation.
The reclamation is being done in one of system threads, IBAL starts on
its start up.
So you'd like to look into this thread.
Bu where it is ?
You can find it by printing ALL the threads of System process and
looking for ibbus in their stack traces.
It can take minutes.
After this patch you can do that in 3 seconds this way:
1. open Watch Window in WinDbg and add ibbus!g_stat.
2. open
ibbus!g_stat->Drv->Gp_async_obj_mgr->Thread_pool->P_thread[0]->Osd->P_th
read
This field contains the address of the thread, you wanted.
> -----Original Message-----
> From: ofw-bounces at lists.openfabrics.org
> [mailto:ofw-bounces at lists.openfabrics.org] On Behalf Of Tzachi Dar
> Sent: Thursday, October 15, 2009 2:45 PM
> To: Tzachi Dar; Fab Tillier; ofw at lists.openfabrics.org
> Subject: [ofw] RE: patch: [ipoib] Add code to track the
> adapters (fordebuggingonly)
>
> I have made some experiments with the g_ipoib.adapter_list
> and came to conclusion that it's use is not that convenient.
> Although the list has all the information, reaching it is far
> from trivial and needs some casting.
>
> The solution that I have suggested makes life much easier
> since the debugger can show the information immediately.
>
> So, if there are no other objections I would like to continue
> with this checkin.
>
> Thanks
> Tzachi
>
> > -----Original Message-----
> > From: Tzachi Dar
> > Sent: Friday, October 09, 2009 1:24 AM
> > To: Fab Tillier; ofw at lists.openfabrics.org
> > Subject: RE: patch: [ipoib] Add code to track the adapters (for
> > debuggingonly)
> >
> > I was not aware of this global variable. I'll play with it a little
> > and see how it goes.
> >
> > Thanks
> > Tzachi
> >
> > -----Original Message-----
> > From: Fab Tillier [mailto:ftillier at microsoft.com]
> > Sent: Thursday, October 08, 2009 4:05 PM
> > To: Tzachi Dar; ofw at lists.openfabrics.org
> > Subject: RE: patch: [ipoib] Add code to track the adapters (for
> > debuggingonly)
> >
> > Hi Tzachi,
> >
> > Tzachi Dar wrote on Thu, 8 Oct 2009 at 04:29:58:
> >
> > > This code is being used for easier debugging. It allows one
> > to connect
> > > to a live system with a local kernel debugger and see the
> > adapters state.
> >
> > There's already a global adapter list, g_ipoib.adapter_list.
> > Why not use that? I've used it before with a local KD session with
> > great success (though it only currently tracks active adapters.)
> >
> > It would be simple to add the adapters to the list always,
> and filter
> > inactive ones during IBAT IOCTLs.
> >
> > -Fab
> >
> >
> >
> _______________________________________________
> ofw mailing list
> ofw at lists.openfabrics.org
> http://lists.openfabrics.org/cgi-bin/mailman/listinfo/ofw
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: g_stat.patch
Type: application/octet-stream
Size: 17300 bytes
Desc: g_stat.patch
URL: <http://lists.openfabrics.org/pipermail/ofw/attachments/20091026/d17636c7/attachment.obj>
More information about the ofw
mailing list