All of lore.kernel.org
 help / color / mirror / Atom feed
From: Doug Ledford <dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
To: Leon Romanovsky <leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
	linux-rdma <linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: VERBOSE flags
Date: Sun, 18 Sep 2016 16:35:37 -0400	[thread overview]
Message-ID: <0a26585a-2e54-1c24-d212-0e2469afb8d8@redhat.com> (raw)
In-Reply-To: <CALq1K=+0S-YnXQo5Hvc3bdOBNuEpowdSMYJThdmHqMNwOu8z1Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>


[-- Attachment #1.1: Type: text/plain, Size: 2552 bytes --]

On 9/14/2016 2:37 AM, Leon Romanovsky wrote:
> On Wed, Sep 14, 2016 at 9:17 AM, Doug Ledford <dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> wrote:
>> On 9/14/2016 1:27 AM, Leon Romanovsky wrote:
>>> Hi Doug,
>>>
>>> Can you please respond to my questions to this patch [1]?
>>>
>>> Thanks
>>>
>>> [1] https://patchwork.kernel.org/patch/9302591/
>>>
>>
>> I don't appear to still have that email.  But I know what I came up with
>> at the time.
>>
>> The debug information was in the mlx5 entry point for post_send.  That
>> means you can create a sysfs entry that allows you to enable or disable
>> the debugging, and then make two different mlx5 post_send entry points.
>> When debugging is enabled, you simply change the entry point for
>> mlx5_post_send to mlx5_post_send_debug, where mlx5_post_send_debug is
>> essentially nothing but mlx5_post_send; dump_wqe.  The unconditional
>> branch will be highly optimized by the CPU, so no real loss on it.  And
>> when not in debug mode, there is zero penalty.  In short, make use of
>> the entry pointers to make this configurable but also zero penalty on
>> the hot path in the non-debug case.
> 
> I did it in similar way to Intel's HFI driver and had in mind future
> consolidation of all
> these verbose flags for whole subsystem.
> 
> I proposed topic (debuggability) in mini-summit to talk about it.

OK, but if the hfi1 driver does this similar to what you were doing,
then I think we should change it too.

Essentially, given that all IB devices have a set of function pointers
that are registered and stored on a per device basis, there is no reason
that the core code can't be modified to present
/sys/class/infiniband/debug/<list of specific entry points we wish to
have possible debug functions for> and if the user wants to debug a
specific entry point, they set it to 1 when it's normally 0.  Then
drivers can optionally register debug versions of their entry points,
and in the core if the user tries to enable debug on an entry point, and
the driver registered a debug variant for that entry point, we start
using it.  Then we can drop the CONFIG_*_DEBUG options out of all of the
drivers.  That would be my preference.  I don't want any compile time
options because you never will be running a debug kernel when you need
it.  Per device, run time selectable so that you get 0 overhead in the
normal case is what I would like to see.

-- 
Doug Ledford <dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
    GPG Key ID: 0E572FDD


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 884 bytes --]

       reply	other threads:[~2016-09-18 20:35 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CALq1K=KfU+N87pyfjfSd=G-thpyR0mjzuuxQ8eTuqrc2Mb+yZQ@mail.gmail.com>
     [not found] ` <77cd1f09-fa39-6f75-6c01-c7ef18909f30@redhat.com>
     [not found]   ` <CALq1K=+0S-YnXQo5Hvc3bdOBNuEpowdSMYJThdmHqMNwOu8z1Q@mail.gmail.com>
     [not found]     ` <CALq1K=+0S-YnXQo5Hvc3bdOBNuEpowdSMYJThdmHqMNwOu8z1Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-09-18 20:35       ` Doug Ledford [this message]
     [not found]         ` <0a26585a-2e54-1c24-d212-0e2469afb8d8-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2016-09-19  6:15           ` VERBOSE flags Leon Romanovsky
     [not found]             ` <20160919061558.GG3273-2ukJVAZIZ/Y@public.gmane.org>
2016-09-19 12:29               ` Dalessandro, Dennis
     [not found]                 ` <1474288178.6520.12.camel-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2016-09-19 13:25                   ` Leon Romanovsky
     [not found]                     ` <20160919132518.GH3273-2ukJVAZIZ/Y@public.gmane.org>
2016-09-19 13:34                       ` Dalessandro, Dennis
     [not found]                         ` <1474292075.6520.28.camel-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2016-09-20 10:56                           ` Leon Romanovsky
     [not found]                             ` <20160920105642.GI26673-2ukJVAZIZ/Y@public.gmane.org>
2016-09-20 12:11                               ` Dalessandro, Dennis
     [not found]                                 ` <1474373496.12415.28.camel-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2016-09-20 12:30                                   ` Leon Romanovsky
2016-09-19 16:03               ` Doug Ledford
     [not found]                 ` <02761057-02de-d3d1-13d9-ca64e4ee9556-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2016-09-20 10:42                   ` Leon Romanovsky

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=0a26585a-2e54-1c24-d212-0e2469afb8d8@redhat.com \
    --to=dledford-h+wxahxf7alqt0dzr+alfa@public.gmane.org \
    --cc=leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
    --cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.