linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Fab Tillier" <ftillier@infiniconsys.com>
To: "'Bodo Eggert <harvested.in.lkml@posting.7eggert.dyndns.org>'" 
	<7eggert@gmx.de>, "Andy Isaacson" <adi@hexapodia.org>,
	"Timur Tabi" <timur.tabi@ammasso.com>,
	"Troy Benjegerdes" <hozer@hozed.org>,
	"Bernhard Fischer" <blist@aon.at>,
	"Arjan van de Ven" <arjan@infradead.org>,
	<linux-kernel@vger.kernel.org>, <openib-general@openib.org>
Subject: RE: [openib-general] Re: [PATCH][RFC][0/4] InfiniBand userspace verbsimplementation
Date: Fri, 22 Apr 2005 10:01:55 -0700	[thread overview]
Message-ID: <000101c5475c$fe3c5fa0$8d5aa8c0@infiniconsys.com> (raw)
In-Reply-To: <E1DOxv9-0000pc-Pe@be1.7eggert.dyndns.org>

> From: Bodo Eggert <harvested.in.lkml@posting.7eggert.dyndns.org>
> Sent: Friday, April 22, 2005 6:10 AM
> 
> All userspace hardware drivers with DMA will require pinned pages (and
> some of them will require continuous memory). Since this memory may be
> scheduled to be accessed by DMA, reclaiming those pages may (aka. will)
> result in "random" memory corruption unless done by the driver itself.

Any reclaim must involve the driver.  That doesn't mean that it must involve
the application.  That said this isn't trivial to implement.

> 
> You can't even set a time limit, the driver may have allocated all DMA
> memory to queued transfers, and some media needs to get plugged in by
> the lazy robot. As soon as the robot arrives - boom. (For the same reason,
> this memory MUST NOT be freed if the application terminates abnormally,
> e.g. killed by OOM).

InfiniBand provides support for deregistering memory that might be
referenced at some future time by an RDMA operation.  The only side effect
this has is that the QP on both sides of the connection transition to an
error state.

Upon abnormal termination, all registrations must be undone and the memory
unpinned.  This must be synchronized with the hardware so that there are no
races.  The IB deregistration semantics provide such synchronization.  I'd
venture that any HW design that does not do this is broken.

Requiring the memory to never be freed upon abnormal termination equates to
a serious memory leak, in that physical memory is leaked, not virtual.

- Fab


  reply	other threads:[~2005-04-22 17:01 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <3VAeQ-1To-7@gated-at.bofh.it>
     [not found] ` <3VNYt-4M4-15@gated-at.bofh.it>
2005-04-22 13:10   ` [openib-general] Re: [PATCH][RFC][0/4] InfiniBand userspace verbs implementation Bodo Eggert <harvested.in.lkml@posting.7eggert.dyndns.org>
2005-04-22 17:01     ` Fab Tillier [this message]
2005-04-22 22:01       ` [openib-general] Re: [PATCH][RFC][0/4] InfiniBand userspace verbsimplementation Bodo Eggert
2005-04-25 22:35 [PATCH][RFC][0/4] InfiniBand userspace verbs implementation Andrew Morton
2005-04-25 22:51 ` [openib-general] Re: [PATCH][RFC][0/4] InfiniBand userspace verbsimplementation Bob Woodruff
2005-04-25 23:13   ` Timur Tabi
2005-04-25 23:17     ` Andrew Morton
2005-04-25 23:29     ` Bob Woodruff

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='000101c5475c$fe3c5fa0$8d5aa8c0@infiniconsys.com' \
    --to=ftillier@infiniconsys.com \
    --cc=7eggert@gmx.de \
    --cc=adi@hexapodia.org \
    --cc=arjan@infradead.org \
    --cc=blist@aon.at \
    --cc=hozer@hozed.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=openib-general@openib.org \
    --cc=timur.tabi@ammasso.com \
    /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).