public inbox for linux-rdma@vger.kernel.org
 help / color / mirror / Atom feed
From: Isaac Huang <he.huang-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
To: Animesh K Trivedi1 <ZRLATR-Xeyd2O9EBijQT0dZR+AlfA@public.gmane.org>
Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Bernard Metzler <BMT-OA+xvbQnYDHMbYB6QlFGEg@public.gmane.org>
Subject: Re: (R)DMA in userspace
Date: Wed, 10 Oct 2012 01:36:08 -0600	[thread overview]
Message-ID: <20121010073608.GA1342@intel.com> (raw)
In-Reply-To: <OF84B00CFA.7F1CDA02-ONC1257A94.00545627-C1257A94.0055881A-Xeyd2O9EBijQT0dZR+AlfA@public.gmane.org>

I looked at a similar problem a while back, and it seemed that none of
the IB HW drivers implemented the sync_single_for_[cpu|device] DMA
operations. Maybe I missed some code, but if it's true, then the
dma_sync_* functions would be no-ops on IB devices. Probably cache
coherence was guaranteed somewhere else?

It seemed that PCIe root complex could manage cache coherence for PCIe
requests, e.g. by reading directly from host CPU cache.

Thanks,
Isaac

On Thu, Oct 11, 2012 at 05:34:06PM +0200, Animesh K Trivedi1 wrote:
> 
> Hi all,
> 
> It is a curiosity question rather a bug/issue report.
> 
> Linux DMA subsystem wants streaming DMA buffers to be synchronized before
> accessing them. This is
> achieved by calling dma_sync_*  family of functions. And, I see that these
> functions are used in kernel clients
> (e.g. xprtrdma, and iSER). This is all fine.
> 
> During memory memory registration, userspace buffers also go through same
> API calls (dma_map_sg_attrs(...)).
> What I am confused about why no such synchronization primitives are
> required in userspace before accessing
> an RDMA data buffer just after when an incoming write/recv (DMA on it) is
> finished? Who guarantees data
> freshness?
> 
> Thanks,
> --
> Animesh
> 
> --
> 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
--
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:[~2012-10-10  7:36 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-11 15:34 (R)DMA in userspace Animesh K Trivedi1
     [not found] ` <OF84B00CFA.7F1CDA02-ONC1257A94.00545627-C1257A94.0055881A-Xeyd2O9EBijQT0dZR+AlfA@public.gmane.org>
2012-10-10  7:36   ` Isaac Huang [this message]
2012-10-11 20:44   ` Roland Dreier
     [not found]     ` <CAL1RGDUOMz7Qf8bX7hZpJgARGepLQRwY25f6Q1utYBZ0taMs9A-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-10-11 21:04       ` Or Gerlitz
     [not found]         ` <CAJZOPZJiEj7rMjF1ouukCPAGCXaNBhHoG1-YuDfEikvM-LLrXg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-10-12  8:54           ` Animesh K Trivedi1
2012-10-12 23:10           ` Jason Gunthorpe
2012-10-12  9:12       ` Yann Droneaud
     [not found]         ` <1350033163.2291.22.camel-sQn2kEGNn0pFevvuwOF9vF6hYfS7NtTn@public.gmane.org>
2012-10-12 14:55           ` Yann Droneaud

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=20121010073608.GA1342@intel.com \
    --to=he.huang-ral2jqcrhueavxtiumwx3w@public.gmane.org \
    --cc=BMT-OA+xvbQnYDHMbYB6QlFGEg@public.gmane.org \
    --cc=ZRLATR-Xeyd2O9EBijQT0dZR+AlfA@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox