LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Sudeep Dutt <sudeep.dutt@intel.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Arnd Bergmann <arnd@arndb.de>, Jonathan Corbet <corbet@lwn.net>,
	linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org,
	Dave Jiang <dave.jiang@intel.com>,
	Nikhil Rao <nikhil.rao@intel.com>,
	Ashutosh Dixit <ashutosh.dixit@intel.com>,
	Sudeep Dutt <sudeep.dutt@intel.com>
Subject: [PATCH char-misc-next v4 00/13] misc: mic: SCIF driver
Date: Mon, 30 Mar 2015 18:36:14 -0700	[thread overview]
Message-ID: <cover.1427763968.git.sudeep.dutt@intel.com> (raw)

ChangeLog:
=========

v3 => v4:
a) Delete unused IOCTL definitions and IOCTL interface fixes as per
feedback from Greg Kroah-Hartman
b) Couple of tiny bug fixes since v3

v2 => v3 @ https://lkml.org/lkml/2015/1/26/849
a) Formatting fixes for SCIF header file documentation, data type fixes
   for SCIF IOCTL interface and added SCIF user space documentation in
   scif_overview.txt as per feedback from Greg Kroah-Hartman

v1 => v2 @ https://lkml.org/lkml/2015/1/12/1029
a) Use kernel-doc formatting for SCIF header file documentation, enhance
   SCIF ring buffer documentation and formatting cleanup in patch 4 as
   per feedback from Greg Kroah-Hartman
b) SCIF bug fixes and cleanups since initial post

v1: Initial post @ https://lkml.org/lkml/2014/12/10/546

Description:
============

The Symmetric Communication Interface (SCIF (pronounced as skiff)) is a low
level communications API across PCIe currently implemented for MIC. Currently
SCIF provides inter-node communication within a single host platform, where a
node is a MIC Coprocessor or Xeon based host. SCIF abstracts the details of
communicating over the PCIe bus while providing an API that is symmetric
across all the nodes in the PCIe network. An important design objective for SCIF
is to deliver the maximum possible performance given the communication
abilities of the hardware. SCIF has been used to implement an offload compiler
runtime and OFED support for MPI implementations for MIC coprocessors.

==== SCIF API Components ====
The SCIF API has the following parts:
1. Connection establishment using a client server model
2. Byte stream messaging intended for short messages
3. Node enumeration to determine online nodes
4. Poll semantics for detection of incoming connections and messages
5. Memory registration to pin down pages
6. Remote memory mapping for low latency CPU accesses via mmap
7. Remote DMA (RDMA) for high bandwidth DMA transfers
8. Fence APIs for RDMA synchronization

SCIF exposes the notion of a connection which can be used by peer processes on
nodes in a SCIF PCIe "network" to share memory "windows" and to communicate. A
process in a SCIF node initiates a SCIF connection to a peer process on a
different node via a SCIF "endpoint". SCIF endpoints support messaging APIs
which are similar to connection oriented socket APIs. Connected SCIF endpoints
can also register local memory which is followed by data transfer using either
DMA, CPU copies or remote memory mapping via mmap. SCIF supports both user and
kernel mode clients which are functionally equivalent.

==== SCIF Performance for MIC ====
DMA bandwidth comparison between the TCP (over ethernet over PCIe) stack versus
SCIF shows the performance advantages of SCIF for HPC applications and runtimes.

             Comparison of TCP and SCIF based BW

  Throughput (GB/sec)
    8 +                                             PCIe Bandwidth ******
      +                                                        TCP ######
    7 +    **************************************             SCIF %%%%%%
      |                       %%%%%%%%%%%%%%%%%%%
    6 +                   %%%%
      |                 %%
      |               %%%
    5 +              %%
      |            %%
    4 +           %%
      |          %%
    3 +         %%
      |        %
    2 +      %%
      |     %%
      |    %
    1 +
      +    ######################################
    0 +++---+++--+--+-+--+--+-++-+--+-++-+--+-++-+-
      1       10     100      1000   10000   100000
                   Transfer Size (KBytes)

SCIF allows memory sharing via mmap(..) between processes on different PCIe
nodes and thus provides bare-metal PCIe latency. The round trip SCIF mmap
latency from the host to an x100 MIC for an 8 byte message is 0.44 usecs.

For more information on SCIF please refer to the Linux Con 2013 slides titled
"Intel® MIC x100 Coprocessor Driver - on the Frontiers of Linux & HPC" at
http://events.linuxfoundation.org/sites/events/files/slides/LinuxConMicDriver.pdf
The talk can also be viewed at https://www.youtube.com/watch?v=dylbmmQs4W0

This initial patch series introduces the SCIF API and implements the SCIF
connection, messaging and node enumeration APIs. SCIF poll, mmap, RDMA and
fence APIs will be submitted in a future patch series once the initial base
patches are accepted upstream.

This patch series is divided into 13 patches as follows:
1) SCIF header file documenting the API along with the IOCTL interface

2) SCIF ring buffer is a single producer, single consumer byte stream ring
   buffer optimized for avoiding reads across the PCIe bus. The ring buffer is
   used to implement a receive queue for SCIF driver messaging between nodes and
   for byte stream messaging between SCIF endpoints. Each SCIF node has a
   receive queue for every other SCIF node, and each connected endpoint has a
   receive queue for messages from its peer. This pair of receive queues is
   referred to as a SCIF queue pair.

3) SCIF hardware bus which abstracts the low level hardware details so that the
   same SCIF driver can work without any changes on the host or the card as long
   as the hardware bus operations are implemented.

4) SCIF peer bus is used to register and unregister SCIF peer devices internally
   by the SCIF driver to signify the addition and removal of peer nodes
   respectively from the SCIF network. This simplifies remote node handling
   within SCIF and will also be used to support device probe/remove for SCIF
   client drivers (e.g. netdev over SCIF)

5) Common MIC header file changes to enable SCIF

6) SCIF module initialization, DMA/remote memory mapping APIs and debugfs hooks.

7) SCIF node queue pair setup sets up the kernel mode private node
   queue pairs between all the nodes to enable internal control
   message communication.

8) SCIF character device file operations and kernel APIs for opening and
   closing a user and kernel mode SCIF endpoint. This patch also enables
   binding to a SCIF port and listening for incoming SCIF connections.

9) SCIF connection APIs which establish a SCIF connection between
   a pair of user or kernel mode endpoints.

10) SCIF messaging APIs which allow sending messages between the SCIF endpoints
    via a byte stream based ring buffer which has been optimized to avoid reads
    across PCIe. The node enumeration API enables a user to query for the number
    of online nodes.

11) MIC host driver specific changes to enable SCIF

12) MIC card driver specific changes to enable SCIF

13) Add support for loading/unloading SCIF driver

Nikhil Rao (1):
  misc: mic: SCIF connections APIs i.e. accept and connect

Sudeep Dutt (12):
  misc: mic: SCIF header file and IOCTL interface
  misc: mic: SCIF ring buffer infrastructure
  misc: mic: SCIF Hardware Bus
  misc: mic: SCIF Peer Bus
  misc: mic: Common MIC header file changes in preparation for SCIF
  misc: mic: SCIF module initialization
  misc: mic: SCIF node queue pair setup management
  misc: mic: SCIF open close bind and listen APIs
  misc: mic: SCIF messaging and node enumeration APIs
  misc: mic: MIC host driver specific changes to enable SCIF
  misc: mic: MIC card driver specific changes to enable SCIF
  misc: mic: add support for loading/unloading SCIF driver

 Documentation/mic/mic_overview.txt    |   28 +-
 Documentation/mic/scif_overview.txt   |   98 +++
 drivers/misc/mic/Kconfig              |   40 +-
 drivers/misc/mic/Makefile             |    3 +-
 drivers/misc/mic/bus/Makefile         |    1 +
 drivers/misc/mic/scif/Makefile        |   15 +
 include/uapi/linux/Kbuild             |    1 +
 drivers/misc/mic/bus/scif_bus.h       |  129 ++++
 drivers/misc/mic/card/mic_device.h    |   11 +-
 drivers/misc/mic/card/mic_x100.h      |    1 +
 drivers/misc/mic/common/mic_dev.h     |    3 +
 drivers/misc/mic/host/mic_device.h    |   11 +-
 drivers/misc/mic/host/mic_intr.h      |    3 +-
 drivers/misc/mic/host/mic_smpt.h      |    1 +
 drivers/misc/mic/scif/scif_epd.h      |  160 ++++
 drivers/misc/mic/scif/scif_main.h     |  254 +++++++
 drivers/misc/mic/scif/scif_map.h      |  113 +++
 drivers/misc/mic/scif/scif_nodeqp.h   |  183 +++++
 drivers/misc/mic/scif/scif_peer_bus.h |   65 ++
 drivers/misc/mic/scif/scif_rb.h       |  100 +++
 include/linux/scif.h                  |  993 +++++++++++++++++++++++++
 include/uapi/linux/mic_common.h       |   12 +
 include/uapi/linux/scif_ioctl.h       |  130 ++++
 drivers/misc/mic/bus/scif_bus.c       |  210 ++++++
 drivers/misc/mic/card/mic_device.c    |  132 +++-
 drivers/misc/mic/card/mic_x100.c      |   61 +-
 drivers/misc/mic/host/mic_boot.c      |  264 ++++++-
 drivers/misc/mic/host/mic_debugfs.c   |   13 +
 drivers/misc/mic/host/mic_main.c      |    6 +
 drivers/misc/mic/host/mic_smpt.c      |    7 +-
 drivers/misc/mic/host/mic_virtio.c    |    6 +-
 drivers/misc/mic/host/mic_x100.c      |    3 +-
 drivers/misc/mic/scif/scif_api.c      | 1276 ++++++++++++++++++++++++++++++++
 drivers/misc/mic/scif/scif_debugfs.c  |   85 +++
 drivers/misc/mic/scif/scif_epd.c      |  353 +++++++++
 drivers/misc/mic/scif/scif_fd.c       |  303 ++++++++
 drivers/misc/mic/scif/scif_main.c     |  392 ++++++++++
 drivers/misc/mic/scif/scif_nm.c       |  237 ++++++
 drivers/misc/mic/scif/scif_nodeqp.c   | 1312 +++++++++++++++++++++++++++++++++
 drivers/misc/mic/scif/scif_peer_bus.c |  124 ++++
 drivers/misc/mic/scif/scif_ports.c    |  124 ++++
 drivers/misc/mic/scif/scif_rb.c       |  248 +++++++
 Documentation/mic/mpssd/mpss          |   24 +-
 43 files changed, 7479 insertions(+), 56 deletions(-)
 create mode 100644 Documentation/mic/scif_overview.txt
 create mode 100644 drivers/misc/mic/scif/Makefile
 create mode 100644 drivers/misc/mic/bus/scif_bus.h
 create mode 100644 drivers/misc/mic/scif/scif_epd.h
 create mode 100644 drivers/misc/mic/scif/scif_main.h
 create mode 100644 drivers/misc/mic/scif/scif_map.h
 create mode 100644 drivers/misc/mic/scif/scif_nodeqp.h
 create mode 100644 drivers/misc/mic/scif/scif_peer_bus.h
 create mode 100644 drivers/misc/mic/scif/scif_rb.h
 create mode 100644 include/linux/scif.h
 create mode 100644 include/uapi/linux/scif_ioctl.h
 create mode 100644 drivers/misc/mic/bus/scif_bus.c
 create mode 100644 drivers/misc/mic/scif/scif_api.c
 create mode 100644 drivers/misc/mic/scif/scif_debugfs.c
 create mode 100644 drivers/misc/mic/scif/scif_epd.c
 create mode 100644 drivers/misc/mic/scif/scif_fd.c
 create mode 100644 drivers/misc/mic/scif/scif_main.c
 create mode 100644 drivers/misc/mic/scif/scif_nm.c
 create mode 100644 drivers/misc/mic/scif/scif_nodeqp.c
 create mode 100644 drivers/misc/mic/scif/scif_peer_bus.c
 create mode 100644 drivers/misc/mic/scif/scif_ports.c
 create mode 100644 drivers/misc/mic/scif/scif_rb.c

-- 
1.8.2.1


             reply	other threads:[~2015-03-31  1:37 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-31  1:36 Sudeep Dutt [this message]
2015-03-31  1:36 ` [PATCH char-misc-next v4 01/13] misc: mic: SCIF header file and IOCTL interface Sudeep Dutt
2015-03-31  1:36 ` [PATCH char-misc-next v4 02/13] misc: mic: SCIF ring buffer infrastructure Sudeep Dutt
2015-03-31  1:36 ` [PATCH char-misc-next v4 03/13] misc: mic: SCIF Hardware Bus Sudeep Dutt
2015-03-31  8:36   ` Paul Bolle
2015-03-31  1:36 ` [PATCH char-misc-next v4 04/13] misc: mic: SCIF Peer Bus Sudeep Dutt
2015-03-31  1:36 ` [PATCH char-misc-next v4 05/13] misc: mic: Common MIC header file changes in preparation for SCIF Sudeep Dutt
2015-03-31  1:36 ` [PATCH char-misc-next v4 06/13] misc: mic: SCIF module initialization Sudeep Dutt
2015-03-31  1:36 ` [PATCH char-misc-next v4 07/13] misc: mic: SCIF node queue pair setup management Sudeep Dutt
2015-03-31  1:36 ` [PATCH char-misc-next v4 08/13] misc: mic: SCIF open close bind and listen APIs Sudeep Dutt
2015-03-31  8:39   ` Paul Bolle
2015-03-31 21:13     ` Sudeep Dutt
2015-03-31  1:36 ` [PATCH char-misc-next v4 09/13] misc: mic: SCIF connections APIs i.e. accept and connect Sudeep Dutt
2015-03-31  1:36 ` [PATCH char-misc-next v4 10/13] misc: mic: SCIF messaging and node enumeration APIs Sudeep Dutt
2015-03-31  1:36 ` [PATCH char-misc-next v4 11/13] misc: mic: MIC host driver specific changes to enable SCIF Sudeep Dutt
2015-03-31  8:42   ` Paul Bolle
2015-03-31  1:36 ` [PATCH char-misc-next v4 12/13] misc: mic: MIC card " Sudeep Dutt
2015-03-31  1:36 ` [PATCH char-misc-next v4 13/13] misc: mic: add support for loading/unloading SCIF driver Sudeep Dutt
2015-04-28 20:45 ` [PATCH char-misc-next v4 00/13] misc: mic: " Sudeep Dutt
2015-04-29 11:27   ` Greg Kroah-Hartman
2015-04-29 12:42     ` Sudeep Dutt

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=cover.1427763968.git.sudeep.dutt@intel.com \
    --to=sudeep.dutt@intel.com \
    --cc=arnd@arndb.de \
    --cc=ashutosh.dixit@intel.com \
    --cc=corbet@lwn.net \
    --cc=dave.jiang@intel.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nikhil.rao@intel.com \
    --subject='Re: [PATCH char-misc-next v4 00/13] misc: mic: SCIF driver' \
    /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

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