public inbox for linux-rdma@vger.kernel.org
 help / color / mirror / Atom feed
From: "Pearson, Robert B" <rpearsonhpe@gmail.com>
To: Zhu Yanjun <zyjzyj2000@gmail.com>
Cc: Jason Gunthorpe <jgg@nvidia.com>,
	RDMA mailing list <linux-rdma@vger.kernel.org>,
	Bob Pearson <rpearson@hpe.com>
Subject: Re: [PATCH for-next v5 08/10] RDMA/rxe: Implement invalidate MW operations
Date: Thu, 29 Apr 2021 11:02:56 -0500	[thread overview]
Message-ID: <1e192a3f-a087-a72a-9415-2817b07f6db1@gmail.com> (raw)
In-Reply-To: <CAD=hENeMiYHLFPttYnm1oJhq+2pxXXUC_b_sQXXmENhewkgy+Q@mail.gmail.com>


On 4/29/2021 1:12 AM, Zhu Yanjun wrote:
> On Thu, Apr 29, 2021 at 11:32 AM Pearson, Robert B
> <rpearsonhpe@gmail.com> wrote:
>>
>> On 4/28/2021 10:20 PM, Zhu Yanjun wrote:
>>> On Thu, Apr 29, 2021 at 11:07 AM Pearson, Robert B
>>> <rpearsonhpe@gmail.com> wrote:
>>>> On 4/28/2021 7:54 PM, Zhu Yanjun wrote:
>>>>> Adding a prefix makes debug easy. This can help filter the functions.
>>>>> And a prefix can help us to verify the location of the function.
>>>>>
>>>>> Zhu Yanjun
>>>> For comparison here are all the subroutine names from a well known
>>>> driver file. As you can see, 100% of the non static subroutines *do*
>>>> have mlx5 in their name but the majority of the static ones *do not*,
>>>> and these are by definition not shared anywhere else but this file. This
>>>> is representative of the typical style in linux-rdma.
>>> With perf or ftrace debug tools, a lot of functions will pop out.
>>> A prefix can help the developer to locate the functions source code easily.
>>> And a prefix can help the developer filter the functions conveniently.
>>>
>>> This is why I recommend a prefix.
>>>
>>> Zhu Yanjun
>> Yes, I can tell. We're still debating this. Obviously the developers of
>> mr.c don't entirely agree and I don't either. There are places where it
>> makes sense but the code is ugly IMHO. I think you should let developers
> A prefix can make code easy to debug, then easy to maintain. This is
> not ugly code.^o^
> On the contrary, it is beautiful code. ^o^
>
>> write in the style they are most effective with, especially in the
>> context of a local static subroutine which have a very narrow scope.
> Even though the local static functions still possibly appear in kernel
> debug tools,
> it is necessary to add a prefix to make it easy to locate and filter.
> This can make maintenance
> easy.
>
> Zhu Yanjun
>
>> Bob

OK, I'll try.

Bob


  reply	other threads:[~2021-04-29 16:03 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-22 16:13 [PATCH for-next v4 00/10] RDMA/rxe: Implement memory windows Bob Pearson
2021-04-22 16:13 ` [PATCH for-next v5 01/10] RDMA/rxe: Add bind MW fields to rxe_send_wr Bob Pearson
2021-04-22 16:13 ` [PATCH for-next v5 02/10] RDMA/rxe: Return errors for add index and key Bob Pearson
2021-04-22 16:13 ` [PATCH for-next v5 03/10] RDMA/rxe: Enable MW object pool Bob Pearson
2021-04-22 16:13 ` [PATCH for-next v5 04/10] RDMA/rxe: Add ib_alloc_mw and ib_dealloc_mw verbs Bob Pearson
2021-04-22 16:13 ` [PATCH for-next v5 05/10] RDMA/rxe: Replace WR_REG_MASK by WR_LOCAL_OP_MASK Bob Pearson
2021-04-22 16:13 ` [PATCH for-next v5 06/10] RDMA/rxe: Move local ops to subroutine Bob Pearson
2021-04-25  4:34   ` Zhu Yanjun
2021-04-28 16:16     ` Pearson, Robert B
2021-04-22 16:13 ` [PATCH for-next v5 07/10] RDMA/rxe: Add support for bind MW work requests Bob Pearson
2021-04-25  4:29   ` Zhu Yanjun
2021-04-28 16:14     ` Pearson, Robert B
2021-04-22 16:13 ` [PATCH for-next v5 08/10] RDMA/rxe: Implement invalidate MW operations Bob Pearson
2021-04-25  4:27   ` Zhu Yanjun
2021-04-28 16:13     ` Pearson, Robert B
2021-04-29  0:54       ` Zhu Yanjun
2021-04-29  3:06         ` Pearson, Robert B
2021-04-29  3:20           ` Zhu Yanjun
2021-04-29  3:31             ` Pearson, Robert B
2021-04-29  6:12               ` Zhu Yanjun
2021-04-29 16:02                 ` Pearson, Robert B [this message]
2021-04-29  6:25               ` Zhu Yanjun
2021-04-22 16:13 ` [PATCH for-next v5 09/10] RDMA/rxe: Implement memory access through MWs Bob Pearson
2021-04-25  4:23   ` Zhu Yanjun
2021-04-22 16:13 ` [PATCH for-next v5 10/10] Subject: [PATCH for-next v4 10/10] RDMA/rxe: Disallow MR dereg and invalidate when bound Bob Pearson
2021-04-26  9:19   ` Zhu Yanjun

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=1e192a3f-a087-a72a-9415-2817b07f6db1@gmail.com \
    --to=rpearsonhpe@gmail.com \
    --cc=jgg@nvidia.com \
    --cc=linux-rdma@vger.kernel.org \
    --cc=rpearson@hpe.com \
    --cc=zyjzyj2000@gmail.com \
    /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