From: Doug Ledford <dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
To: Or Gerlitz <ogerlitz-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Amir Vadai <amirv-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>,
Tal Alon <talal-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>,
Matan Barak <matanb-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
Subject: Re: [PATCH for-next V3 0/8] Add completion timestamping support
Date: Fri, 12 Jun 2015 15:53:08 -0400 [thread overview]
Message-ID: <557B38A4.9080901@redhat.com> (raw)
In-Reply-To: <1434029727-6062-1-git-send-email-ogerlitz-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
[-- Attachment #1: Type: text/plain, Size: 3325 bytes --]
On 06/11/2015 09:35 AM, Or Gerlitz wrote:
> Hi Doug,
>
> This patchset adds the kernel control path for completion timestamping
> support by user-space verbs consumers.
>
> Timestamping is used by applications in order to know when a WQE was
> received/transmitted by the HW. The value is given is HCA hardware cycles,
> but could be easily converted as the hardware's core clock frequecny is
> available through extension of query device.
>
> Moreover, we add an ability to read the HCA's current clock. This could be
> useful on order to synchronize events to the wall clock.
>
> This functionality is achieved by adding/extending the following verbs:
>
> create_cq - create_cq is extended in order to allow passing creation flags
> to the CQ creation function. We change IB/core --> vendors API
> to be easily extendible by passing a struct which contains
> comp_vectors, cqe and the new flags parameter. In order to create
> CQ which supports timestamping, IB_CQ_FLAGS_TIMESTAMP_COMPLETION should be given.
>
> query_device - We extend query_device uverb further by giving the hardware's
> clock frequency and the timestamp mask (the number of timestamp
> bits which are supported). If timestamp isn't supported, 0 is returned.
>
> In order to read the timestamp in the WQE, the user needs to query the device
> for support, create an appropriate CQ (using the extanded uverb with
> IB_CQ_FLAGS_TIMESTAMP_COMPLETION) and poll the CQ with an extended poll_cq verb (currently,
> only implemented in user-space).
>
> In mlx4, allowing the user to read the core clock efficiently involves mapping
> this area of the hardware to user-space (being done by using a mmap command)
> and reading the clock from the correct offset of the page.
>
> This offset is returned in the vendor's specific data from mlx4's kernel driver
> to the mlx4's user-space driver. query_device is modified in order to support
> passing this vendor specific data. A user-space application could use a new
> verb in order to read the hardware's clock.
>
> Translating the hardware's clock into ms could be done by dividing this
> value by hca_core_clock (which is returned by the extended version of
> query_device uverb).
>
> The below V2 --> V3 changes address the review comments on the kernel bits.
>
> Jason had another comment calling for re-thinking / questioning the
> need for a dedicated uverbs_ex_cmd_mask in the IB device. This goes
> beyond the scope of this specific series.
>
> Matan and Or.
>
> Changes from V2:
> (1) Use KHZ for hca_core_clock
> (2) ib_create_cq gets const cq_attr
> (3 use {} initialization instead of memset
> (4) squashed last two mlx4 patches
>
> Changes from V1:
> (1) fixed lustre IB's code build
> (2) squashed mlx4 V1 9-11 patches into one
> (3) changed IB_CQ_FLAGS_TIMESTAMP --> IB_CQ_FLAGS_TIMESTAMP_COMPLETION
>
> Changes from V0:
> (1) Pass ib_cq_init_attr instead of cqe and comp_vector.
> (2) Fix unneeded indentation.
> (3) Change flags to u32.
> (4) Add const to create_cq's ib_cq_init_attr argument in vendor implementation.
I've pulled this series in for 4.2. However, I forgot to add the extra
reviewed-by tags before it was tagged, signed, and pushed to k.o. My
apologies for that.
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 884 bytes --]
prev parent reply other threads:[~2015-06-12 19:53 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-11 13:35 [PATCH for-next V3 0/8] Add completion timestamping support Or Gerlitz
[not found] ` <1434029727-6062-1-git-send-email-ogerlitz-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2015-06-11 13:35 ` [PATCH for-next V3 1/8] IB/core: Change provider's API of create_cq to be extendible Or Gerlitz
[not found] ` <1434029727-6062-2-git-send-email-ogerlitz-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2015-06-11 17:55 ` Jason Gunthorpe
[not found] ` <20150611175555.GB20142-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2015-06-12 3:06 ` Or Gerlitz
[not found] ` <CAJ3xEMgA0UorV3ERz_M7-H0Z4c6tmK2e_k84c6VExhzjQJ+9LQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-08-27 17:11 ` Christoph Lameter
2015-06-11 13:35 ` [PATCH for-next V3 2/8] IB/core: Change ib_create_cq to use struct ib_cq_init_attr Or Gerlitz
2015-06-11 13:35 ` [PATCH for-next V3 3/8] IB/core: Add CQ creation time-stamping flag Or Gerlitz
2015-06-11 13:35 ` [PATCH for-next V3 4/8] IB/core: Extend ib_uverbs_create_cq Or Gerlitz
2015-06-11 13:35 ` [PATCH for-next V3 5/8] IB/core: Add timestamp_mask and hca_core_clock to query_device Or Gerlitz
2015-06-11 13:35 ` [PATCH for-next V3 6/8] IB/core: Pass hardware specific data in query_device Or Gerlitz
2015-06-11 13:35 ` [PATCH for-next V3 7/8] IB/mlx4: Add mmap call to map the hardware clock Or Gerlitz
[not found] ` <1434029727-6062-8-git-send-email-ogerlitz-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2015-08-27 17:11 ` Christoph Lameter
2015-06-11 13:35 ` [PATCH for-next V3 8/8] IB/mlx4: Add support for CQ time-stamping Or Gerlitz
2015-06-11 17:53 ` [PATCH for-next V3 0/8] Add completion timestamping support Jason Gunthorpe
[not found] ` <20150611175307.GA20142-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2015-06-12 3:10 ` Or Gerlitz
2015-06-12 19:53 ` Doug Ledford [this message]
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=557B38A4.9080901@redhat.com \
--to=dledford-h+wxahxf7alqt0dzr+alfa@public.gmane.org \
--cc=amirv-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org \
--cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=matanb-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org \
--cc=ogerlitz-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org \
--cc=talal-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.