All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jason Gunthorpe <jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
To: Devesh Sharma <devesh.sharma-dY08KVG/lbpWk0Htik3J/w@public.gmane.org>
Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [RESEND rdma-core v4 4/8] libbnxt_re: Add support for posting and polling
Date: Fri, 21 Apr 2017 13:22:55 -0600	[thread overview]
Message-ID: <20170421192255.GA12079@obsidianresearch.com> (raw)
In-Reply-To: <1492801032-17587-5-git-send-email-devesh.sharma-dY08KVG/lbpWk0Htik3J/w@public.gmane.org>

On Fri, Apr 21, 2017 at 02:57:08PM -0400, Devesh Sharma wrote:

> +static void bnxt_re_ring_db(struct bnxt_re_dpi *dpi,
> +			    struct bnxt_re_db_hdr *hdr)
> +{
> +	__le64 *dbval;
> +
> +	pthread_spin_lock(&dpi->db_lock);
> +	dbval = (__le64 *)&hdr->indx;
> +	udma_to_device_barrier();
> +	iowrite64(dpi->dbpage, dbval);
> +	pthread_spin_unlock(&dpi->db_lock);
> +}

What are you expecting this db_lock to do?

Is 'dbpage' UC or WC memory?

If this is UC memory then writing 64 bit values concurrently from
multiple threads is OK and this lock does nothing.

If this is WC memory then you need to use mmio_wc_spinlock /
mmio_wc_spinunlock instead, or the lock doesn't work right.

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-21 19:22 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-21 18:57 [RESEND rdma-core v4 0/8] Broadcom User Space RoCE Driver Devesh Sharma
     [not found] ` <1492801032-17587-1-git-send-email-devesh.sharma-dY08KVG/lbpWk0Htik3J/w@public.gmane.org>
2017-04-21 18:57   ` [RESEND rdma-core v4 1/8] libbnxt_re: introduce bnxtre user space RDMA provider Devesh Sharma
2017-04-21 18:57   ` [RESEND rdma-core v4 2/8] libbnxt_re: Add support for user memory regions Devesh Sharma
2017-04-21 18:57   ` [RESEND rdma-core v4 3/8] libbnxt_re: Add support for CQ and QP management Devesh Sharma
2017-04-21 18:57   ` [RESEND rdma-core v4 4/8] libbnxt_re: Add support for posting and polling Devesh Sharma
     [not found]     ` <1492801032-17587-5-git-send-email-devesh.sharma-dY08KVG/lbpWk0Htik3J/w@public.gmane.org>
2017-04-21 19:22       ` Jason Gunthorpe [this message]
     [not found]         ` <20170421192255.GA12079-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2017-04-24 15:59           ` Devesh Sharma
     [not found]             ` <CANjDDBiG_0C1DTYKgwCPuUzs34yb1b-iBpxRpU=XXZnm-JcOfw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-04-24 16:34               ` Jason Gunthorpe
     [not found]                 ` <20170424163416.GA23048-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2017-04-24 18:23                   ` Devesh Sharma
2017-04-21 18:57   ` [RESEND rdma-core v4 5/8] libbnxt_re: Allow apps to poll for flushed completions Devesh Sharma
2017-04-21 18:57   ` [RESEND rdma-core v4 6/8] libbnxt_re: Enable UD control path and wqe posting Devesh Sharma
2017-04-21 18:57   ` [RESEND rdma-core v4 7/8] libbnxt_re: Enable polling for UD completions Devesh Sharma
2017-04-21 18:57   ` [RESEND rdma-core v4 8/8] libbnxt_re: Add support for atomic operations Devesh Sharma
     [not found]     ` <1492801032-17587-9-git-send-email-devesh.sharma-dY08KVG/lbpWk0Htik3J/w@public.gmane.org>
2017-04-22 10:33       ` Leon Romanovsky
     [not found]         ` <20170422103309.GX14088-U/DQcQFIOTAAJjI8aNfphQ@public.gmane.org>
2017-04-24 14:43           ` Devesh Sharma

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=20170421192255.GA12079@obsidianresearch.com \
    --to=jgunthorpe-epgobjl8dl3ta4ec/59zmfatqe2ktcn/@public.gmane.org \
    --cc=devesh.sharma-dY08KVG/lbpWk0Htik3J/w@public.gmane.org \
    --cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@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.