LKML Archive on
help / color / mirror / Atom feed
From: Hoang-Nam Nguyen <>
To: Roland Dreier <>,,,,,
Subject: [PATCH/RFC 2.6.21 0/5] ehca: remove use of do_mmap() from kernel space
Date: Thu, 11 Jan 2007 20:07:33 +0100	[thread overview]
Message-ID: <> (raw)

Hello Roland and Christoph H.!
Here is a set of patches for ehca, whose main purpose is to remove unproper use of
do_mmap() in ehca kernel space as suggested by Christoph H. Other "small" changes
* Remove "dead" prototype declarations (those without code implementation)

Now detail on mmap() rework:
- For eHCA hardware register block we use remap_pfn_range() as previously.
- For queue pages we call pattern vm_insert_page() to register each allocated
kernel page.
- For each mmap-ed resource (hardware register block, send/recv and completion
queue) we introduce a use counter that is incremented and decremented by
the call-backs open()/close(). Destroying a completion queue or queue pair
will succeed only if all associated counters are zero. That means those resources
must be mmap-ed and munmap-ed properly in user space.
The actual calls of mmap64() and munmap() are done then in ehca user space lib,
ie. libehca, for which I will send a separate patch for another review (by ofed


 ehca_classes.h |   29 +-----
 ehca_cq.c      |   65 +++-----------
 ehca_iverbs.h  |   10 --
 ehca_main.c    |    6 -
 ehca_qp.c      |   78 +++--------------
 ehca_uverbs.c  |  253 ++++++++++++++++++---------------------------------------
 6 files changed, 121 insertions(+), 320 deletions(-)

                 reply	other threads:[~2007-01-11 19:11 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \ \ \ \ \ \
    --subject='Re: [PATCH/RFC 2.6.21 0/5] ehca: remove use of do_mmap() from kernel space' \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

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).