public inbox for linux-rdma@vger.kernel.org
 help / color / mirror / Atom feed
From: Jason Gunthorpe <jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
To: Matan Barak <matanb-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
Cc: Doug Ledford <dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
	linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Moni Shoua <monis-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>,
	Haggai Eran <haggaie-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
Subject: Re: [PATCH for-next V6 04/10] IB/core: Add rwsem to allow reading device list or client list
Date: Mon, 13 Jul 2015 11:29:00 -0600	[thread overview]
Message-ID: <20150713172900.GG23832@obsidianresearch.com> (raw)
In-Reply-To: <1435150766-6803-5-git-send-email-matanb-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>

On Wed, Jun 24, 2015 at 03:59:20PM +0300, Matan Barak wrote:
> From: Haggai Eran <haggaie-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
> 
> Currently the RDMA subsystem's device list and client list are
> protected by a single mutex. This prevents adding user-facing APIs
> that iterate these lists, since using them may cause a deadlock.
> The patch attempts to solve this problem by adding a read-write
> semaphore to protect the lists. Readers now don't need the mutex,
> and are safe just by read-locking the semaphore.
> 
> The ib_register_device, ib_register_client, ib_unregister_device, and
> ib_unregister_client functions are modified to lock the semaphore for
> write during their respective list modification. Also, in order to
> make sure client callbacks are called only between add() and remove()
> calls, the code is changed to only add items to the lists after the
> add() calls and remove from the lists before the remove() calls.
> 
> Signed-off-by: Haggai Eran <haggaie-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
> Signed-off-by: Matan Barak <matanb-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>

Looks OK

Reviewed-By: Jason Gunthorpe <jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>

Jason
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply	other threads:[~2015-07-13 17:29 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-24 12:59 [PATCH for-next V6 00/10] Move RoCE GID management to IB/Core Matan Barak
2015-06-24 12:59 ` [PATCH for-next V6 01/10] net/ipv6: Export addrconf_ifid_eui48 Matan Barak
2015-06-24 12:59 ` [PATCH for-next V6 03/10] net/bonding: Export bond_option_active_slave_get_rcu Matan Barak
     [not found] ` <1435150766-6803-1-git-send-email-matanb-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2015-06-24 12:59   ` [PATCH for-next V6 02/10] net: Add info for NETDEV_CHANGEUPPER event Matan Barak
2015-06-24 12:59   ` [PATCH for-next V6 04/10] IB/core: Add rwsem to allow reading device list or client list Matan Barak
     [not found]     ` <1435150766-6803-5-git-send-email-matanb-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2015-07-13 17:29       ` Jason Gunthorpe [this message]
2015-06-24 12:59   ` [PATCH for-next V6 05/10] IB/core: Add RoCE GID table management Matan Barak
     [not found]     ` <1435150766-6803-6-git-send-email-matanb-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2015-07-17 19:02       ` Jason Gunthorpe
     [not found]         ` <20150717190245.GA20632-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2015-07-21  8:42           ` Matan Barak
     [not found]             ` <CAAKD3BA2Qgw87uXiS-M9gO1-jXPfQncyWzscMuusMABPRRzA8w-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-07-23 19:05               ` Jason Gunthorpe
2015-06-24 12:59   ` [PATCH for-next V6 06/10] IB/core: Add RoCE table bonding support Matan Barak
2015-06-24 12:59   ` [PATCH for-next V6 07/10] net/mlx4: Postpone the registration of net_device Matan Barak
2015-06-24 12:59   ` [PATCH for-next V6 08/10] IB/mlx4: Implement ib_device callbacks Matan Barak
2015-06-24 12:59   ` [PATCH for-next V6 09/10] IB/mlx4: Replace mechanism for RoCE GID management Matan Barak
2015-06-24 12:59   ` [PATCH for-next V6 10/10] RDMA/ocrdma: Incorporate the moving of GID Table mgmt to IB/Core Matan Barak
2015-06-25  8:34   ` [PATCH for-next V6 00/10] Move RoCE GID management " Or Gerlitz
     [not found]     ` <CAJ3xEMjZgMPWA0jm3ReM4Cb1Q-Gz-vXh=XguSYUMAVD+qPA6Zg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-06-25 18:13       ` Jason Gunthorpe
     [not found]         ` <20150625181357.GG21033-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2015-06-29 14:07           ` Or Gerlitz

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=20150713172900.GG23832@obsidianresearch.com \
    --to=jgunthorpe-epgobjl8dl3ta4ec/59zmfatqe2ktcn/@public.gmane.org \
    --cc=dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=haggaie-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org \
    --cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=matanb-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org \
    --cc=monis-VPRAkNaXOzVWk0Htik3J/w@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox