On Sun, 2005-28-08 at 01:19 -0700, Ben Greear wrote: > Here's an updated patch (git working better now, thanks!): > > http://www.candelatech.com/oss/rfcnt.patch > > I started a list of constants #defined in netdevice.h. These > will be used for all stack variable references and other places > where I cannot determine the address of the reference to the > netdevice. (Someone versed in particular modules may be able to > get rid of some of the constants if desired.)
I thought you could get a dead fish sent to you for doing things like these? ;-> Some comments: - I think it would be nice if the feature would work only if someone turned some debug selection in kconfig. i.e zero overhead otherwise. - That i dont have to modify the header file every time i want to use the feature from some other (new) code would be nice. Clearly dynamic registration for these numbers at init would help (Dave was saying the same in his email); however, another approach could be to declare a single number as "unknown" that could be used by all and another range of IDs that could be used by newer code (sort of like the 10.0.0.0 address range). - Would it be nice also to see which processor the ref came from? - Hey, why stop at dev refcounts? ;-> There are a lot of other references that would be nice to have this feature on for debuging ;-> And why stop at refcounts at all - go all the way to locks too. I once had to chase a tricky SMP lock contention (classical deadlock problem) and wrote similar code for locks. It helped nail it. - It would be nice to have features like "dump everyone who is holding a ref count to eth0" kind of operation. cheers, jamal - To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html