Re: [PATCH] Try 2: Export URB statistics for powertop.
Marcel Holtmann <[email protected]>
| Newsgroups | gmane.linux.usb.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi Sarah, > The new version of this patch includes correct initialization and URB > counter increment in usb_hcd_submit_urb(), which is less likely to run > in interrupt context. > > powertop currently tracks interrupts generated by uhci and ehci, > but it has no way of telling which USB device to blame USB bus activity on. > This patch exports the number of URBs that complete for a given device. > Cat the file 'urbnum' in /sys/bus/usb/devices/.../ > > Signed-off-by: Sarah Sharp <[email protected]> > Signed-off-by: Sarah Sharp <[email protected]> > Signed-off-by: Sarah Sharp <[email protected]> > Signed-off-by: Sarah Sharp <[email protected]> these are a little bit too much signed offs here ;) > +static DEVICE_ATTR(urbnum, S_IRUGO, show_urbnum, NULL); <snip> > + > + atomic_t urb_cnt; /* number of URBs completed for the whole device */ Why did you call the variable urb_cnt and then export it as urbnum? I think the name should be the same. So either it is a number or it is a counter. Regards Marcel ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ [email protected] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel