Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754183AbcDNLh0 (ORCPT ); Thu, 14 Apr 2016 07:37:26 -0400 Received: from mga14.intel.com ([192.55.52.115]:25651 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753381AbcDNLhY convert rfc822-to-8bit (ORCPT ); Thu, 14 Apr 2016 07:37:24 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.24,484,1455004800"; d="scan'208";a="932315303" From: "Du, Changbin" To: Felipe Balbi CC: "gregkh@linuxfoundation.org" , "linux-usb@vger.kernel.org" , "linux-kernel@vger.kernel.org" Subject: RE: [PATCH v4 2/2] usb: dwc3: add debugfs node to dump FIFO/Queue available space Thread-Topic: [PATCH v4 2/2] usb: dwc3: add debugfs node to dump FIFO/Queue available space Thread-Index: AQHRlK13d4fDYt/zWE+iRtI9QMtm1J+ImJAAgAC0uAD//4IPgIAAh4yw Date: Thu, 14 Apr 2016 11:37:21 +0000 Message-ID: <0C18FE92A7765D4EB9EE5D38D86A563A05D09572@shsmsx102.ccr.corp.intel.com> References: <1460459419-9487-1-git-send-email-changbin.du@intel.com> <1460459419-9487-3-git-send-email-changbin.du@intel.com> <87shyok47z.fsf@intel.com> <0C18FE92A7765D4EB9EE5D38D86A563A05D09504@shsmsx102.ccr.corp.intel.com> <87mvowjv58.fsf@intel.com> In-Reply-To: <87mvowjv58.fsf@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ctpclassification: CTP_IC x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiOGYzN2QzMjAtOWI4ZC00ZTU2LWEyZmMtYzdmY2UwOWMzYzQ2IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE1LjkuNi42IiwiVHJ1c3RlZExhYmVsSGFzaCI6IlJHTVYxZU51dURQQmszbXVDbWxDTThLQStFN3dKOUxYZUsybFp5cWl5dWs9In0= x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1371 Lines: 38 > > At last, comparing with the FIFO/Queue info, I think software transfer > > Requests list, TRBs info, EVENTs history are much more useful for > debugging > > the driver. If you can also add these info to each EP folder, that is awesome! > > :) > > I'll think about adding these but for the lifetime of requests and trbs > and events, etc, we have tracepoints for that. I usually do the > following when debugging: > > # mount -t debugfs none /sys/kernel/debug > # cd /sys/kernel/debug/tracing > # echo 2048 > buffer_size_kb > # echo 1 > events/dwc3/enable > > (do something to break it) > > # cp trace /mnt/sdcard # or something like that > > then read the file. You can make it as large or as small as you like > (given some constraints, of course ;-) but I've had no issues allocating > 128MiB in the past. > > -- > Balbi Thanks for the sharing, this is a good approach to capture dynamic behaviors. But a dump of current state has below advantages: 1. a quick view for the pending transfers. Then we can quickly checking the transfer status. 2. no side-effect. This is important in some case. We usually encounter some transfer issues but very hard to reproduce it. But we cannot enable trace all the time since performance concern. Then I thought it was so great if I can have a look for the trb status. :) Best Regards, Du, Changbin