From: "Steve Wise" <swise-7bPotxP6k4+P2YhJcF5u+vpXobYPEAuW@public.gmane.org>
To: 'Yishai Hadas'
<yishaih-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
Cc: 'Yishai Hadas' <yishaih-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>,
dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org,
linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
matanb-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org,
majd-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org,
talal-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org,
jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org
Subject: RE: [PATCH V5 libibverbs 0/7] Completion timestamping
Date: Wed, 1 Jun 2016 11:18:31 -0500 [thread overview]
Message-ID: <008301d1bc21$3d26a320$b773e960$@opengridcomputing.com> (raw)
In-Reply-To: <bc75ca98-5d67-a86b-5c65-2bb94ccf6063-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
>
> On 6/1/2016 6:49 PM, Steve Wise wrote:
> >
> >
> > <snip>
> >
> >>
> >> The batching API is thread-safe (assuming the CQ wasn't created with
> >> SINGLE_THREADED attribute) and represents a series of completions the user
> >> would like to poll one after another. The vendor user space driver should
> >> guarantee this.
> >>
> >
> > Hey Yishai,
> >
> > Can you please explain how multiple threads can use this API concurrently?
I
> > don't understand how two threads can be in the middle of the next branch
> > concurrently? Is only one thread allowed in at a time for a
> > start/next/next/.../end branch?
>
> When a CQ is created with the new API the application states whether
> it's going to be used by a single thread or not. The vendor (e.g.
> libmlx5) based on that will hook its underlying functions for the
> start/next/end for this CQ.
>
> In case the CQ going to be used by multiple threads the vendor will take
> a lock as part of the start and release it as part of the end,
> preventing any other thread to run in the middle of this batch. This
> logic for multi-threaded application is similar to what happened today
> when ibv_poll_cq is called.
>
> As mentioned, the new API gives an option to enjoy from stating that the
> CQ will be used by one thread comparing current legacy API which has no
> idea and always use lock/unlock per ibv_poll_cq call.
>
> You can look in the libmlx5 implementation that I sent today and see the
> above behavior.
Thanks. This makes sense.
Steve.
--
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
next prev parent reply other threads:[~2016-06-01 16:18 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-01 13:05 [PATCH V5 libibverbs 0/7] Completion timestamping Yishai Hadas
[not found] ` <1464786340-7630-1-git-send-email-yishaih-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2016-06-01 13:05 ` [PATCH V5 libibverbs 1/7] Add support for extended creating CQ verb Yishai Hadas
2016-06-01 13:05 ` [PATCH V5 libibverbs 2/7] Add member functions to poll an extended CQ Yishai Hadas
2016-06-01 13:05 ` [PATCH V5 libibverbs 3/7] Add timestamp_mask and hca_core_clock to ibv_query_device_ex Yishai Hadas
2016-06-01 13:05 ` [PATCH V5 libibverbs 4/7] Add completion timestamp to poll_cq Yishai Hadas
2016-06-01 13:05 ` [PATCH V5 libibverbs 5/7] Create a single threaded CQ Yishai Hadas
2016-06-01 13:05 ` [PATCH V5 libibverbs 6/7] Add a verb that queries real time values from the HCA Yishai Hadas
2016-06-01 13:05 ` [PATCH V5 libibverbs 7/7] Add timestamp support in rc_pingpong Yishai Hadas
2016-06-01 15:49 ` [PATCH V5 libibverbs 0/7] Completion timestamping Steve Wise
2016-06-01 16:07 ` Yishai Hadas
[not found] ` <bc75ca98-5d67-a86b-5c65-2bb94ccf6063-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
2016-06-01 16:18 ` Steve Wise [this message]
2016-06-06 23:02 ` Doug Ledford
[not found] ` <1b0ea11b-3762-2335-28dd-eb3ac243104e-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2016-06-06 23:33 ` Jason Gunthorpe
[not found] ` <20160606233325.GA28769-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2016-06-07 2:20 ` Doug Ledford
[not found] ` <bd0b54e6-70ae-27b3-fe1e-8ee729e20479-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2016-06-07 11:26 ` Yishai Hadas
2016-06-08 19:14 ` Jason Gunthorpe
[not found] ` <20160608191412.GA27089-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2016-06-09 1:35 ` Doug Ledford
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='008301d1bc21$3d26a320$b773e960$@opengridcomputing.com' \
--to=swise-7bpotxp6k4+p2yhjcf5u+vpxobypeauw@public.gmane.org \
--cc=dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
--cc=jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org \
--cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=majd-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org \
--cc=matanb-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org \
--cc=talal-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org \
--cc=yishaih-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@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 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.