Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1338962
| From | Leon Romanovsky <leon@leon.nu> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCHv6 1/3] rdmacg: Added rdma cgroup controller |
| Date | 2016-02-21 20:20 +0100 |
| Message-ID | <r4GiT-12G-21@gated-at.bofh.it> (permalink) |
| References | <r4dAe-4cj-23@gated-at.bofh.it> <r4dAf-4cj-31@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Sat, Feb 20, 2016 at 04:30:04PM +0530, Parav Pandit wrote:
> Added rdma cgroup controller that does accounting, limit enforcement
> on rdma/IB verbs and hw resources.
>
> Added rdma cgroup header file which defines its APIs to perform
> charing/uncharing functionality and device registration which will
> participate in controller functions of accounting and limit
> enforcements. It also define rdmacg_device structure to bind IB stack
> and RDMA cgroup controller.
>
> RDMA resources are tracked using resource pool. Resource pool is per
> device, per cgroup entity which allows setting up accounting limits
> on per device basis.
>
> Resources are not defined by the RDMA cgroup, instead they are defined
> by the external module IB stack. This allows extending IB stack
> without changing kernel, as IB stack is going through changes
> and enhancements.
>
> Resource pool is created/destroyed dynamically whenever
> charging/uncharging occurs respectively and whenever user
> configuration is done. Its a tradeoff of memory vs little more code
> space that creates resource pool whenever necessary,
> instead of creating them during cgroup creation and device registration
> time.
>
> Signed-off-by: Parav Pandit <pandit.parav@gmail.com>
> ---
> include/linux/cgroup_rdma.h | 53 +++
> include/linux/cgroup_subsys.h | 4 +
> init/Kconfig | 10 +
> kernel/Makefile | 1 +
> kernel/cgroup_rdma.c | 753 ++++++++++++++++++++++++++++++++++++++++++
> 5 files changed, 821 insertions(+)
> create mode 100644 include/linux/cgroup_rdma.h
> create mode 100644 kernel/cgroup_rdma.c
>
> diff --git a/include/linux/cgroup_rdma.h b/include/linux/cgroup_rdma.h
> new file mode 100644
> index 0000000..b370733
> --- /dev/null
> +++ b/include/linux/cgroup_rdma.h
> @@ -0,0 +1,53 @@
> +#ifndef _CGROUP_RDMA_H
> +#define _CGROUP_RDMA_H
> +
> +#include <linux/cgroup.h>
> +
> +struct rdma_cgroup {
> +#ifdef CONFIG_CGROUP_RDMA
> + struct cgroup_subsys_state css;
> +
> + spinlock_t rpool_list_lock; /* protects resource pool list */
> + struct list_head rpool_head; /* head to keep track of all resource
> + * pools that belongs to this cgroup.
> + */
> +#endif
> +};
> +
> +#ifdef CONFIG_CGROUP_RDMA
I'm sure that you already asked about that, but why do you need ifdef
embedded in struct rdma_cgroup and right after that the same one?
Can you place this ifdef before declaring struct rdma_cgroup?
> +
> +struct rdmacg_device;
> +
Thanks
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCHv6 0/3] rdmacg: IB/core: rdma controller support Parav Pandit <pandit.parav@gmail.com> - 2016-02-20 12:10 +0100
[PATCHv6 2/3] IB/core: added support to use rdma cgroup controller Parav Pandit <pandit.parav@gmail.com> - 2016-02-20 12:10 +0100
[PATCHv6 3/3] rdmacg: Added documentation for rdmacg Parav Pandit <pandit.parav@gmail.com> - 2016-02-20 12:10 +0100
[PATCHv6 1/3] rdmacg: Added rdma cgroup controller Parav Pandit <pandit.parav@gmail.com> - 2016-02-20 12:10 +0100
Re: [PATCHv6 1/3] rdmacg: Added rdma cgroup controller Leon Romanovsky <leon@leon.nu> - 2016-02-21 18:50 +0100
Re: [PATCHv6 1/3] rdmacg: Added rdma cgroup controller Parav Pandit <pandit.parav@gmail.com> - 2016-02-21 19:00 +0100
Re: [PATCHv6 1/3] rdmacg: Added rdma cgroup controller Leon Romanovsky <leon@leon.nu> - 2016-02-21 19:00 +0100
Re: [PATCHv6 1/3] rdmacg: Added rdma cgroup controller Parav Pandit <pandit.parav@gmail.com> - 2016-02-21 19:30 +0100
Re: [PATCHv6 1/3] rdmacg: Added rdma cgroup controller Parav Pandit <pandit.parav@gmail.com> - 2016-02-21 19:40 +0100
Re: [PATCHv6 1/3] rdmacg: Added rdma cgroup controller Leon Romanovsky <leon@leon.nu> - 2016-02-21 20:20 +0100
Re: [PATCHv6 0/3] rdmacg: IB/core: rdma controller support Parav Pandit <pandit.parav@gmail.com> - 2016-02-22 06:00 +0100
csiph-web