From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932716AbcGOLWw (ORCPT ); Fri, 15 Jul 2016 07:22:52 -0400 Received: from mga14.intel.com ([192.55.52.115]:36465 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932483AbcGOLWu (ORCPT ); Fri, 15 Jul 2016 07:22:50 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.28,368,1464678000"; d="asc'?scan'208";a="734671324" From: Felipe Balbi To: Greg Kroah-Hartman Cc: Bin Gao , Heikki Krogerus , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, Bin Gao , Chandra Sekhar Anagani Subject: Re: [PATCH 1/2] usb: typec: Add USB Power Delivery sink port support In-Reply-To: <20160715111141.GB23645@kroah.com> References: <20160715021405.GB128987@worksta> <87mvljgp9n.fsf@linux.intel.com> <20160715111141.GB23645@kroah.com> User-Agent: Notmuch/0.22+58~g3a45d29 (https://notmuchmail.org) Emacs/25.0.95.2 (x86_64-pc-linux-gnu) Date: Fri, 15 Jul 2016 14:21:48 +0300 Message-ID: <87k2gngn8z.fsf@linux.intel.com> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Hi, Greg Kroah-Hartman writes: > On Fri, Jul 15, 2016 at 01:38:12PM +0300, Felipe Balbi wrote: >>=20 >> Hi, >>=20 >> Bin Gao 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)"); >> > +} >>=20 >> 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: >>=20 >> n50chars_time =3D 50 / (115200 / 10) =3D 4.3ms >> n100chars_time =3D 100 / (115200 / 10) =3D 8.6ms >>=20 >> 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. > > printk() should be async, so it shouldn't be that big of a deal. I can actually see this causing problems ;-) With this pr_info(), sometimes tSenderReply times out and Source gives a HardReset. Without pr_info(), type-c analyzer tells me we reply in less than 1ms. > What is wrong is that this isn't using dev_info(). right, that too. =2D-=20 balbi --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJXiMdMAAoJEIaOsuA1yqRETNsQAJw7R7cDAdkhCpxGUE/cg1Hx 20vaQyl79erLAPZyEKM0xpzJTJJNBxGWUJIxV66ibeXwRZQRDb1A2gzgYEOjmd9N jDby5baUFVFCF5sUlTXnOHC6h8KvpiVJwkWP+VVcT00exJMuxLhIFjXMX7WFIBNH SNct/PCFbOk/U8wulmPuK0Veez/npO7I244viLcwhdd0J0LAmoKVdq2T2sgT34o1 xhYmjF2IZEOMRb5cor+k2s8JIUvi/DEl5khihGPEsDTGWu/YWANJtWu1AUzehxbo /lYYjGsyfmbxPFGPoNDRLU+3an3rMjUCfWj0QKDj6sMh++DN8l5cLmCiq3M+gKV6 j/jmRkk8LdCrzSo0rmJC5gxlGf4t4TjDmK1I0RBf9MYWWpvpFDSQWgSKAWajSsNI TTXCno7FrWI0S7tHJqDoR6nFsuJkhi+Uh2oaYsmDshNs72cUq6ZTDP5Fl1kMZ8G9 bCzg5dl4PBVqDpZcSd7mIZ4YXl6dzP/7m4xvbZKerhenaEx961m6QDkmZOMXcNt2 x8K2Bl+E7y8h2Jm697gXbnyvwMFZv5ZGEGNsQovJGrJJH36i+PURMcw5TPdao3ON 8KMfaLG3lEACB8etRUIKfAIlBhdGEqBMO3UNqyF/KcM0sbz4BWjt0+n8quWrChXo njNOPKJb/2EXXoAadrxu =kJOB -----END PGP SIGNATURE----- --=-=-=--