Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1444167
| From | Felipe Balbi <felipe.balbi@linux.intel.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 1/2] usb: typec: Add USB Power Delivery sink port support |
| Date | 2016-07-15 12:40 +0200 |
| Message-ID | <rV8Hg-5Li-39@gated-at.bofh.it> (permalink) |
| References | <rV0Tn-ZV-7@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
[Multipart message — attachments visible in raw view] - view raw
Hi,
Bin Gao <bin.gao@linux.intel.com> writes:
> +static void print_message(int port, bool is_cmsg, u8 msg, bool recv)
> +{
> + pr_info("sink port %d: %s message %s %s\n", port,
> + is_cmsg ? "Control" : "Data",
> + msg_to_string(is_cmsg, msg),
> + recv ? "received" : "sent(wait GOODCRC)");
> +}
this is problematic. By default, we're all using 115200 8N1 baud
rate. This message alone prints anywhere from 50 to 100 characters (I
didn't really count properly, these are rough numbers), and that takes:
n50chars_time = 50 / (115200 / 10) = 4.3ms
n100chars_time = 100 / (115200 / 10) = 8.6ms
Considering you have 30ms to reply with Power Request after GoodCRC, and
considering you're printing several of these messages, they become
really expensive and eat up valuable time from tSenderReply.
This should really be a pr_debug() or, better yet, a tracepoint.
--
balbi
Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread
Re: [PATCH 1/2] usb: typec: Add USB Power Delivery sink port support Felipe Balbi <felipe.balbi@linux.intel.com> - 2016-07-15 12:40 +0200
Re: [PATCH 1/2] usb: typec: Add USB Power Delivery sink port support Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-07-15 13:20 +0200
Re: [PATCH 1/2] usb: typec: Add USB Power Delivery sink port support Felipe Balbi <felipe.balbi@linux.intel.com> - 2016-07-15 13:30 +0200
Re: [PATCH 1/2] usb: typec: Add USB Power Delivery sink port support Bin Gao <bin.gao@linux.intel.com> - 2016-07-16 00:40 +0200
Re: [PATCH 1/2] usb: typec: Add USB Power Delivery sink port support Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-07-16 02:00 +0200
Re: [PATCH 1/2] usb: typec: Add USB Power Delivery sink port support Bin Gao <bin.gao@linux.intel.com> - 2016-07-19 07:30 +0200
Re: [PATCH 1/2] usb: typec: Add USB Power Delivery sink port support Felipe Balbi <felipe.balbi@linux.intel.com> - 2016-07-19 10:40 +0200
csiph-web