All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jason Gunthorpe <jgg@nvidia.com>
To: Bob Pearson <rpearsonhpe@gmail.com>
Cc: <zyjzyj2000@gmail.com>, <linux-rdma@vger.kernel.org>,
	Bob Pearson <rpearson@hpe.com>
Subject: Re: [PATCH for-next v5 10/12] rdma_rxe: Fix pool related bugs
Date: Fri, 18 Sep 2020 20:49:21 -0300	[thread overview]
Message-ID: <20200918234921.GI3699@nvidia.com> (raw)
In-Reply-To: <20200918211517.5295-11-rpearson@hpe.com>

On Fri, Sep 18, 2020 at 04:15:15PM -0500, Bob Pearson wrote:
> This patch does following:
>   - Replace the rwlock used for pool->pool_lock by a spinlock.
>     Rwlock is a multi-reader single writer lock but there are
>     cases where a multi-writer lock is required, especially where
>     multiple objects can be created at the same time.

Not sure what a multi-write lock is, sounds scary

>   - Be more careful about type checking in pool APIs.
>     Originally each object used in rxe had a pool_entry struct as
>     the first member of it's struct. Since then about half have
>     it first and the other half have it later in the struct. The
>     pool APIs used void * as a hack to avoid type checking. This
>     patch changes the APIs so the pool_entry struct is position
>     independent. When used a parameter a macro is used to convert
>     the object pointer to the entry pointer. The offset of the entry
>     is stored for each pool and used to convert the entry address to
>     the object address.
>   - Provide locked and unlocked versions of the APIs.
>     The current code uses a lock in each API to allow atomic
>     updates to the pools. But some uses fail to work because they
>     combined multiple pool operations and expect them to be
>     atomic. As an example doing a lookup to see if a matching object
>     exists for a multicast group followed by a create of a new group
>     if it does not. By letting the caller take the pool lock and then
>     combine unlocked operations this problem is fixed.
>   - Replace calls to pool APIs with the typesafe versions.
>   - Replaced a few calls to pr_warn with pr_err_once.

This probably needs to be split up

Jason

  reply	other threads:[~2020-09-18 23:49 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-18 21:15 [PATCH for-next v5 00/12] rdma_rxe: API extensions Bob Pearson
2020-09-18 21:15 ` [PATCH for-next v5 01/12] rdma_rxe: Separat MEM into MR and MW objects Bob Pearson
2020-09-18 21:15 ` [PATCH for-next v5 02/12] rdma_rxe: Enable " Bob Pearson
2020-09-18 21:15 ` [PATCH for-next v5 03/12] rdma_rxe: Let pools support both keys and indices Bob Pearson
2020-09-18 21:15 ` [PATCH for-next v5 04/12] rdma_rxe: Add alloc_mw and dealloc_mw verbs Bob Pearson
2020-09-18 21:15 ` [PATCH for-next v5 05/12] rdma_rxe: Add bind_mw and invalidate_mw verbs Bob Pearson
2020-09-18 21:15 ` [PATCH for-next v5 06/12] rdma_rxe: Add memory access through MWs Bob Pearson
2020-09-19  3:52   ` kernel test robot
2020-09-19  3:52     ` kernel test robot
2020-09-18 21:15 ` [PATCH for-next v5 07/12] rdma_rxe: Add support for ibv_query_device_ex Bob Pearson
2020-09-18 23:40   ` Jason Gunthorpe
2020-09-18 21:15 ` [PATCH for-next v5 08/12] rdma_rxe: Add support for extended CQ operations Bob Pearson
2020-09-18 21:15 ` [PATCH for-next v5 09/12] rdma_rxe: Add support for extended QP operations Bob Pearson
2020-09-18 23:40   ` Jason Gunthorpe
2020-09-18 21:15 ` [PATCH for-next v5 10/12] rdma_rxe: Fix pool related bugs Bob Pearson
2020-09-18 23:49   ` Jason Gunthorpe [this message]
2020-09-18 21:15 ` [PATCH for-next v5 11/12] rdma_rxe: Fix mcast group allocation bug Bob Pearson
2020-09-18 21:15 ` [PATCH for-next v5 12/12] rdma_rxe: Fix bugs in the multicast receive path Bob Pearson
2020-09-18 23:51 ` [PATCH for-next v5 00/12] rdma_rxe: API extensions Jason Gunthorpe
2020-09-19  8:44   ` Zhu Yanjun
2020-09-19  8:46     ` Zhu Yanjun
2020-09-20 21:13       ` Bob Pearson
2020-09-21 14:10         ` Jason Gunthorpe

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=20200918234921.GI3699@nvidia.com \
    --to=jgg@nvidia.com \
    --cc=linux-rdma@vger.kernel.org \
    --cc=rpearson@hpe.com \
    --cc=rpearsonhpe@gmail.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 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.