linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Felipe Balbi <balbi@kernel.org>
To: "Du\, Changbin" <changbin.du@intel.com>
Cc: "gregkh\@linuxfoundation.org" <gregkh@linuxfoundation.org>,
	"linux-usb\@vger.kernel.org" <linux-usb@vger.kernel.org>,
	"linux-kernel\@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
Date: Thu, 14 Apr 2016 14:41:41 +0300	[thread overview]
Message-ID: <87k2k0ju2y.fsf@intel.com> (raw)
In-Reply-To: <0C18FE92A7765D4EB9EE5D38D86A563A05D09572@shsmsx102.ccr.corp.intel.com>

[-- Attachment #1: Type: text/plain, Size: 1983 bytes --]


Hi,

"Du, Changbin" <changbin.du@intel.com> writes:
>> > 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. :)

yeah, okay. We can definitely add "current state" of almost anything,
but if you need history, then debugfs is not the best interface and I'd
point you to tracepoints ;-)

I'll think about how I can add TRB state, seems like we'd need to dump
the entire endpoint ring, and that's 256 TRBs per endpoint :-p Then we
also need to know endpoint's dequeue and enqueue pointer. Oh well, let
me get this first setup of files out of the way, then we can add more
later much more easily.

-- 
balbi

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 818 bytes --]

  reply	other threads:[~2016-04-14 11:43 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-06  8:27 [PATCH] usb: dwc3: add debugfs node to dump FIFO/Queue available space changbin.du
2016-04-06  9:25 ` Greg KH
2016-04-06 11:38   ` Du, Changbin
2016-04-06 12:24     ` Felipe Balbi
2016-04-06 15:44   ` [PATCH v2 0/3] Improvement, fix and new entry for dwc3 debugfs changbin.du
2016-04-07  5:05     ` Felipe Balbi
2016-04-07  5:21       ` Du, Changbin
2016-04-07  5:22         ` Felipe Balbi
2016-04-08  9:34       ` [PATCH v3 0/2] Add a new debugfs entry to dump FIFO/Queue available space changbin.du
2016-04-08  9:34       ` [PATCH v3 1/2] usb: dwc3: make dwc3_debugfs_init return value be void changbin.du
2016-04-11  8:14         ` Felipe Balbi
2016-04-11 11:19           ` Du, Changbin
2016-04-11 11:23             ` Felipe Balbi
2016-04-12 11:10               ` [PATCH v4 0/2] Add a new debugfs entry to dump FIFO/Queue available space changbin.du
2016-04-12 11:10               ` [PATCH v4 1/2] usb: dwc3: make dwc3_debugfs_init return value be void changbin.du
2016-04-12 11:10               ` [PATCH v4 2/2] usb: dwc3: add debugfs node to dump FIFO/Queue available space changbin.du
2016-04-12 12:58                 ` Sergei Shtylyov
2016-04-14  3:27                   ` Du, Changbin
2016-04-14  8:02                 ` Felipe Balbi
2016-04-14 11:15                   ` Du, Changbin
2016-04-14 11:18                     ` Felipe Balbi
2016-04-14 11:37                       ` Du, Changbin
2016-04-14 11:41                         ` Felipe Balbi [this message]
2016-04-14 11:58                           ` Du, Changbin
2016-04-08  9:34       ` [PATCH v3 " changbin.du
2016-04-06 15:44   ` [PATCH v2 1/3] usb: dwc3: make dwc3_debugfs_init return value be void changbin.du
2016-04-06 15:44   ` [PATCH v2 2/3] usb: dwc3: free dwc->regset on dwc3_debugfs_exit changbin.du
2016-04-06 21:08     ` Greg KH
2016-04-07  5:05     ` Felipe Balbi
2016-04-06 15:44   ` [PATCH v2 3/3] usb: dwc3: add debugfs node to dump FIFO/Queue available space changbin.du

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87k2k0ju2y.fsf@intel.com \
    --to=balbi@kernel.org \
    --cc=changbin.du@intel.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).