In message <[EMAIL PROTECTED]> you write: > In fact, going down the path of reference counting urbs, sk_buffs etc > seems to me like a big mistake. It is never ending. For example, in > the speedtouch driver I use a tasklet. Thus there is a callback into > the module by the tasklet. The tasklet code does not use try_module_get! > But that's OK: the tasklet callback does not sleep and I kill the tasklet > during shutdown. There must be an endless number of similar > examples.
Absolutely. Optimizing reference counts in these cases is kind of important 8) The skbuff case which Greg referred to is the netfilter connection tracking case, where we insert a destroy function in the skb. This could go off any time later, and we don't keep a linked list of all the skbs that we can conveniently iterate through and destroy. The current code keeps an internal counter, and doesn't use the module refcounts at all. On module_exit, it spins until that count hits zero. Bad, huh? Hope that clarifies, Rusty. -- Anyone who quotes me in their sig is an idiot. -- Rusty Russell. ------------------------------------------------------- This SF.net email is sponsored by: SlickEdit Inc. Develop an edge. The most comprehensive and flexible code editor you can use. Code faster. C/C++, C#, Java, HTML, XML, many more. FREE 30-Day Trial. www.slickedit.com/sourceforge _______________________________________________ [EMAIL PROTECTED] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
