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: Wed, 28 Apr 2021 22:31:59 -0500	[thread overview]
Message-ID: <e1a4821b-dc2d-3adf-536e-62970048bcf1@gmail.com> (raw)
In-Reply-To: <CAD=hENcr_LuhgdSdXLcZSi97AyBof51xntDGyTKutmv5be_iXQ@mail.gmail.com>


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 
write in the style they are most effective with, especially in the 
context of a local static subroutine which have a very narrow scope.

Bob

>
>> Bob
>>
>> static    TYPE add_keys()
>> static    TYPE alloc_cacheable_mr()
>> static    TYPE alloc_cache_mr()
>> static    TYPE assign_mkey_variant()
>> static    TYPE __cache_work_func()
>> static    TYPE cache_work_func()
>> static    TYPE can_use_umr_rereg_access()
>> static    TYPE can_use_umr_rereg_pas()
>> static    TYPE clean_keys()
>> static    TYPE create_cache_mr()
>> static    TYPE create_mkey_callback()
>> static    TYPE create_real_mr()
>> static    TYPE create_user_odp_mr()
>> static    TYPE delayed_cache_work_func()
>> static    TYPE delay_time_func()
>> static    TYPE destroy_mkey()
>> static    TYPE get_cache_mr()
>> static    TYPE get_octo_len()
>> static    TYPE limit_read()
>> static    TYPE limit_write()
>> static    TYPE mlx5_alloc_integrity_descs()
>> static    TYPE mlx5_alloc_mem_reg_descs()
>> static    TYPE _mlx5_alloc_mkey_descs()
>> static    TYPE mlx5_alloc_priv_descs()
>> static    TYPE mlx5_alloc_sg_gaps_descs()
>> static    TYPE mlx5_free_priv_descs()
>> static    TYPE __mlx5_ib_alloc_mr()
>> static    TYPE mlx5_ib_alloc_pi_mr()
>> static    TYPE *mlx5_ib_alloc_xlt()
>> static    TYPE mlx5_ib_create_mkey()
>> static    TYPE mlx5_ib_create_mkey_cb()
>> static    TYPE *mlx5_ib_create_xlt_wr()
>> static    TYPE mlx5_ib_dmabuf_invalidate_cb()
>> static    TYPE mlx5_ib_free_xlt()
>> static    TYPE mlx5_ib_get_dm_mr()
>> static    TYPE mlx5_ib_init_umr_context()
>> static    TYPE mlx5_ib_map_klm_mr_sg_pi()
>> static    TYPE mlx5_ib_map_mtt_mr_sg_pi()
>> static    TYPE mlx5_ib_map_pa_mr_sg_pi()
>> static    TYPE mlx5_ib_post_send_wait()
>> static    TYPE mlx5_ib_sg_to_klms()
>> static    TYPE mlx5_ib_umr_done()
>> static    TYPE mlx5_ib_unmap_free_xlt()
>> static    TYPE mlx5_mr_cache_debugfs_cleanup()
>> static    TYPE mlx5_mr_cache_debugfs_init()
>> static    TYPE mlx5_mr_cache_free()
>> static    TYPE mlx5_set_page()
>> static    TYPE mlx5_set_page_pi()
>> static    TYPE mlx5_set_umr_free_mkey()
>> static    TYPE mlx5_umem_dmabuf_default_pgsz()
>> static    TYPE mr_cache_ent_from_order()
>> static    TYPE mr_cache_max_order()
>> static    TYPE queue_adjust_cache_locked()
>> static    TYPE reg_create()
>> static    TYPE remove_cache_mr_locked()
>> static    TYPE resize_available_mrs()
>> static    TYPE revoke_mr()
>> static    TYPE set_mkc_access_pd_addr_fields()
>> static    TYPE set_mr_fields()
>> static    TYPE size_read()
>> static    TYPE size_write()
>> static    TYPE someone_adding()
>> static    TYPE umr_can_use_indirect_mkey()
>> static    TYPE umr_rereg_pas()
>> static    TYPE umr_rereg_pd_access()
>> static    TYPE xlt_wr_final_send_flags()
>>       TYPE mlx5_ib_advise_mr()
>>       TYPE mlx5_ib_alloc_mr()
>>       TYPE mlx5_ib_alloc_mr_integrity()
>>       TYPE mlx5_ib_alloc_mw()
>>       TYPE mlx5_ib_check_mr_status()
>>       TYPE mlx5_ib_dealloc_mw()
>>       TYPE mlx5_ib_dereg_mr()
>>       TYPE mlx5_ib_get_dma_mr()
>>       TYPE mlx5_ib_map_mr_sg()
>>       TYPE mlx5_ib_map_mr_sg_pi()
>>       TYPE mlx5_ib_reg_dm_mr()
>>       TYPE mlx5_ib_reg_user_mr()
>>       TYPE mlx5_ib_reg_user_mr_dmabuf()
>>       TYPE mlx5_ib_rereg_user_mr()
>>       TYPE mlx5_ib_update_mr_pas()
>>       TYPE mlx5_ib_update_xlt()
>>       TYPE mlx5_mr_cache_cleanup()
>>       TYPE mlx5_mr_cache_init()
>>

  reply	other threads:[~2021-04-29  3:32 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 [this message]
2021-04-29  6:12               ` Zhu Yanjun
2021-04-29 16:02                 ` Pearson, Robert B
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=e1a4821b-dc2d-3adf-536e-62970048bcf1@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