cgroups.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCHv1 0/6] rdma controller support
@ 2016-01-05 18:58 Parav Pandit
  2016-01-05 18:58 ` [PATCHv1 1/6] rdmacg: Added rdma cgroup header file Parav Pandit
                   ` (5 more replies)
  0 siblings, 6 replies; 39+ messages in thread
From: Parav Pandit @ 2016-01-05 18:58 UTC (permalink / raw)
  To: cgroups, linux-doc, linux-kernel, linux-rdma, tj, lizefan, hannes,
	dledford, liranl, sean.hefty, jgunthorpe, haggaie
  Cc: corbet, james.l.morris, serge, ogerlitz, matanb, raindel, akpm,
	linux-security-module, pandit.parav

This patchset adds support for RDMA cgroup by addressing review comments
of [1] by implementing published RFC [2].

Overview:
Currently user space applications can easily take away all the rdma
device specific resources such as AH, CQ, QP, MR etc. Due to which other
applications in other cgroup or kernel space ULPs may not even get chance
to allocate any rdma resources. This results into service unavailibility.

RDMA cgroup addresses this issue by allowing resource accounting,
limit enforcement on per cgroup, per rdma device basis.

Resources are not defined by the RDMA cgroup. Resources are defined
by RDMA/IB stack & optionally by HCA vendor device drivers.
This allows rdma cgroup to remain constant while RDMA/IB
stack can evolve without the need of rdma cgroup update. A new
resource can be easily added by the RDMA/IB stack without touching
rdma cgroup.

RDMA uverbs layer will enforce limits on well defined RDMA verb
resources without any HCA vendor device driver involvement.

RDMA uverbs layer will not do accounting of hw vendor specific resources.
Instead rdma cgroup provides set of APIs through which vendor specific 
drivers can define their own resources (upto 64) that can be accounted by
rdma cgroup.

Resource limit enforcement is hierarchical.

When process is migrated with active RDMA resources, rdma cgroup
continues to charge original cgroup.

Changes from v0:
(To address comments from Haggai, Doug, Liran, Tejun, Sean, Jason)
 * Redesigned to support per device per cgroup limit settings by bringing
   concept of resource pool.
 * Redesigned to let IB stack define the resources instead of rdma controller
   using resource template.
 * Redesigned to support hw vendor specific limits setting (optional to drivers).
 * Created new rdma controller instead of piggyback on device cgroup.
 * Fixed race conditions for multiple tasks sharing rdma resources.
 * Removed dependency on the task_struct.

[1] https://lkml.org/lkml/2015/9/7/476
[2] https://lkml.org/lkml/2015/10/28/144

This patchset is for Tejun's for-4.5 branch.
It is not attempted on Doug's rdma tree yet, which I will do once I receive
comments for this pathset.

Parav Pandit (6):
  rdmacg: Added rdma cgroup header file
  IB/core: Added members to support rdma cgroup
  rdmacg: implements rdma cgroup
  IB/core: rdmacg support infrastructure APIs
  IB/core: use rdma cgroup for resource accounting
  rdmacg: Added documentation for rdma controller.

 Documentation/cgroup-legacy/rdma.txt  |  129 ++++
 Documentation/cgroup.txt              |   79 +++
 drivers/infiniband/core/Makefile      |    1 +
 drivers/infiniband/core/cgroup.c      |   80 +++
 drivers/infiniband/core/core_priv.h   |    5 +
 drivers/infiniband/core/device.c      |    8 +
 drivers/infiniband/core/uverbs_cmd.c  |  244 ++++++-
 drivers/infiniband/core/uverbs_main.c |   30 +
 include/linux/cgroup_rdma.h           |   91 +++
 include/linux/cgroup_subsys.h         |    4 +
 include/rdma/ib_verbs.h               |   20 +
 init/Kconfig                          |   12 +
 kernel/Makefile                       |    1 +
 kernel/cgroup_rdma.c                  | 1220 +++++++++++++++++++++++++++++++++
 14 files changed, 1907 insertions(+), 17 deletions(-)
 create mode 100644 Documentation/cgroup-legacy/rdma.txt
 create mode 100644 drivers/infiniband/core/cgroup.c
 create mode 100644 include/linux/cgroup_rdma.h
 create mode 100644 kernel/cgroup_rdma.c

-- 
1.8.3.1

^ permalink raw reply	[flat|nested] 39+ messages in thread

end of thread, other threads:[~2016-01-07 21:10 UTC | newest]

Thread overview: 39+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-01-05 18:58 [PATCHv1 0/6] rdma controller support Parav Pandit
2016-01-05 18:58 ` [PATCHv1 1/6] rdmacg: Added rdma cgroup header file Parav Pandit
2016-01-05 18:58 ` [PATCHv1 2/6] IB/core: Added members to support rdma cgroup Parav Pandit
     [not found]   ` <1452020286-9508-3-git-send-email-pandit.parav-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2016-01-05 21:56     ` Tejun Heo
2016-01-06 23:16       ` Parav Pandit
2016-01-07 15:07         ` Tejun Heo
     [not found]           ` <20160107150756.GD29797-qYNAdHglDFBN0TnZuCh8vA@public.gmane.org>
2016-01-07 19:40             ` Parav Pandit
2016-01-05 18:58 ` [PATCHv1 4/6] IB/core: rdmacg support infrastructure APIs Parav Pandit
2016-01-05 18:58 ` [PATCHv1 5/6] IB/core: use rdma cgroup for resource accounting Parav Pandit
2016-01-05 18:58 ` [PATCHv1 6/6] rdmacg: Added documentation for rdma controller Parav Pandit
     [not found]   ` <1452020286-9508-7-git-send-email-pandit.parav-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2016-01-05 21:53     ` Tejun Heo
     [not found]       ` <20160105215309.GG5995-qYNAdHglDFBN0TnZuCh8vA@public.gmane.org>
2016-01-06 22:44         ` Parav Pandit
2016-01-06 22:57           ` Tejun Heo
     [not found]             ` <20160106225714.GI3660-piEFEHQLUPpN0TnZuCh8vA@public.gmane.org>
2016-01-06 23:52               ` Parav Pandit
     [not found]                 ` <CAG53R5XKpP6YAe8buRrgG=m4_dQK5MjkWtcA7CN-74AJ1SUUyQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-01-07 15:42                   ` Tejun Heo
     [not found]                     ` <20160107154218.GF29797-qYNAdHglDFBN0TnZuCh8vA@public.gmane.org>
2016-01-07 19:43                       ` Parav Pandit
     [not found] ` <1452020286-9508-1-git-send-email-pandit.parav-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2016-01-05 18:58   ` [PATCHv1 3/6] rdmacg: implements rdma cgroup Parav Pandit
2016-01-05 22:01     ` Tejun Heo
     [not found]       ` <20160105220128.GJ5995-qYNAdHglDFBN0TnZuCh8vA@public.gmane.org>
2016-01-06 23:33         ` Parav Pandit
2016-01-07 15:29           ` Tejun Heo
2016-01-07 20:25             ` Parav Pandit
2016-01-07 20:28               ` Tejun Heo
2016-01-07 20:39                 ` Parav Pandit
     [not found]                   ` <CAG53R5UuCNwCKWAuub=n3FkJR6Z5oyF6cVPeW=5nk-JrURY=jw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-01-07 20:41                     ` Tejun Heo
2016-01-05 21:56   ` [PATCHv1 0/6] rdma controller support Tejun Heo
     [not found]     ` <20160105215623.GH5995-qYNAdHglDFBN0TnZuCh8vA@public.gmane.org>
2016-01-06 23:13       ` Parav Pandit
     [not found]         ` <CAG53R5XQaUz=vJCEqLwGt93CC1YMnVQ=k4DuRU0nspcb_-+_6g-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-01-07 15:07           ` Tejun Heo
     [not found]             ` <20160107150718.GC29797-qYNAdHglDFBN0TnZuCh8vA@public.gmane.org>
2016-01-07 20:01               ` Parav Pandit
2016-01-07 20:06                 ` Tejun Heo
2016-01-07 20:32                   ` Parav Pandit
2016-01-07 20:34                     ` Tejun Heo
2016-01-07 20:46                       ` Parav Pandit
2016-01-07 20:49                         ` Tejun Heo
2016-01-07 20:50                           ` Tejun Heo
2016-01-07 21:01                             ` Parav Pandit
2016-01-07 21:07                               ` Tejun Heo
2016-01-07 21:10                                 ` Parav Pandit
2016-01-07 21:04                           ` Parav Pandit
2016-01-07 21:08                             ` Tejun Heo

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