linux-rdma.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jason Gunthorpe <jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
To: Matan Barak <matanb-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
Cc: "Hefty,
	Sean" <sean.hefty-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>,
	Matan Barak <matanb-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>,
	Doug Ledford <dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
	"linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	Liran Liss <liranl-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>,
	Leon Romanovsky <leonro-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>,
	Majd Dibbiny <majd-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>,
	Tal Alon <talal-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>,
	Yishai Hadas <yishaih-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>,
	"Weiny, Ira" <ira.weiny-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>,
	Haggai Eran <haggaie-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>,
	Christoph Lameter <cl-vYTEC60ixJUAvxtiuMwx3w@public.gmane.org>
Subject: Re: [PATCH V3 for-next 4/7] IB/core: Change idr objects to use the new schema
Date: Thu, 6 Apr 2017 10:57:22 -0600	[thread overview]
Message-ID: <20170406165722.GE7657@obsidianresearch.com> (raw)
In-Reply-To: <CAAKD3BCy_JD1cu=3ZHSbrXBHmeTj-M7pJ6nM=rRXFVMi6Szvwg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>

On Thu, Apr 06, 2017 at 05:13:52PM +0300, Matan Barak wrote:
> On Thu, Apr 6, 2017 at 12:05 AM, Hefty, Sean <sean.hefty-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org> wrote:
> > Mostly questions.
> >
> >> @@ -1628,7 +1148,7 @@ ssize_t ib_uverbs_resize_cq(struct
> >> ib_uverbs_file *file,
> >>                  (unsigned long) cmd.response + sizeof resp,
> >>                  in_len - sizeof cmd, out_len - sizeof resp);
> >>
> >> -     cq = idr_read_cq(cmd.cq_handle, file->ucontext, 0);
> >> +     cq = uobj_get_obj_read(cq, cmd.cq_handle, file->ucontext);
> >
> > (I noticed rereg_mr used a write lock.)
> > Is a read lock sufficient here?
> >
> 
> I guess we don't want to allow two concurrent resize_cq, so write
> lock should be better here. However, I don't want to change logic in
> these patches. I think such a patch is better of being separate with
> a proper commit message.  We don't step on these bugs, as there's no
> lock at the verbs layer. So usually, device drivers provide the
> locking their themselves.

It makes sense to split the patch, but the 'write lock' nee
'exclusive' seems like the wrong approach, we need an actual mutex
just like for multicast.

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:[~2017-04-06 16:57 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-04 10:31 [PATCH V3 for-next 0/7] Change IDR usage and locking in uverbs Matan Barak
     [not found] ` <1491301907-32290-1-git-send-email-matanb-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2017-04-04 10:31   ` [PATCH V3 for-next 1/7] IB/core: Refactor idr to be per uverbs_file Matan Barak
     [not found]     ` <1491301907-32290-2-git-send-email-matanb-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2017-04-04 17:33       ` Hefty, Sean
     [not found]         ` <1828884A29C6694DAF28B7E6B8A82373AB10F3F4-P5GAC/sN6hkd3b2yrw5b5LfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2017-04-05 10:56           ` Matan Barak
2017-04-04 10:31   ` [PATCH V3 for-next 2/7] IB/core: Add support for idr types Matan Barak
     [not found]     ` <1491301907-32290-3-git-send-email-matanb-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2017-04-05  0:43       ` Hefty, Sean
     [not found]         ` <1828884A29C6694DAF28B7E6B8A82373AB10F5A5-P5GAC/sN6hkd3b2yrw5b5LfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2017-04-05 10:55           ` Matan Barak
     [not found]             ` <CAAKD3BD=dM8B+bnGu_DTR220wWeo2ce2Sgoy1WwBpUYs6XHoQA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-04-05 15:50               ` Jason Gunthorpe
2017-04-05 17:33               ` Doug Ledford
     [not found]                 ` <1491413639.2923.0.camel-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2017-04-05 17:49                   ` Leon Romanovsky
     [not found]                     ` <20170405174943.GI20443-U/DQcQFIOTAAJjI8aNfphQ@public.gmane.org>
2017-04-05 18:51                       ` Doug Ledford
2017-04-04 10:31   ` [PATCH V3 for-next 3/7] IB/core: Add idr based standard types Matan Barak
     [not found]     ` <1491301907-32290-4-git-send-email-matanb-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2017-04-05 17:05       ` Hefty, Sean
     [not found]         ` <1828884A29C6694DAF28B7E6B8A82373AB10F97B-P5GAC/sN6hkd3b2yrw5b5LfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2017-04-06 14:14           ` Matan Barak
2017-04-04 10:31   ` [PATCH V3 for-next 4/7] IB/core: Change idr objects to use the new schema Matan Barak
     [not found]     ` <1491301907-32290-5-git-send-email-matanb-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2017-04-05 21:05       ` Hefty, Sean
     [not found]         ` <1828884A29C6694DAF28B7E6B8A82373AB10FAD8-P5GAC/sN6hkd3b2yrw5b5LfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2017-04-05 21:59           ` Hefty, Sean
2017-04-06 14:13           ` Matan Barak
     [not found]             ` <CAAKD3BCy_JD1cu=3ZHSbrXBHmeTj-M7pJ6nM=rRXFVMi6Szvwg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-04-06 16:57               ` Jason Gunthorpe [this message]
     [not found]                 ` <20170406165722.GE7657-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2017-04-09 15:16                   ` Matan Barak
2017-04-04 10:31   ` [PATCH V3 for-next 5/7] IB/core: Add lock to multicast handlers Matan Barak
2017-04-04 10:31   ` [PATCH V3 for-next 6/7] IB/core: Add support for fd objects Matan Barak
2017-04-04 10:31   ` [PATCH V3 for-next 7/7] IB/core: Change completion channel to use the reworked objects schema Matan Barak
     [not found]     ` <1491301907-32290-8-git-send-email-matanb-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2017-04-05 23:30       ` Hefty, Sean
     [not found]         ` <1828884A29C6694DAF28B7E6B8A82373AB10FBBF-P5GAC/sN6hkd3b2yrw5b5LfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2017-04-06 14:14           ` Matan Barak

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=20170406165722.GE7657@obsidianresearch.com \
    --to=jgunthorpe-epgobjl8dl3ta4ec/59zmfatqe2ktcn/@public.gmane.org \
    --cc=cl-vYTEC60ixJUAvxtiuMwx3w@public.gmane.org \
    --cc=dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=haggaie-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org \
    --cc=ira.weiny-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
    --cc=leonro-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org \
    --cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=liranl-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org \
    --cc=majd-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org \
    --cc=matanb-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org \
    --cc=matanb-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org \
    --cc=sean.hefty-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
    --cc=talal-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org \
    --cc=yishaih-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;
as well as URLs for NNTP newsgroup(s).