Re: [PATCHv9 1/3] rdmacg: Added rdma cgroup controller

2016-03-06 Thread Haggai Eran
On 05/03/2016 19:20, Parav Pandit wrote: >> > 3 is fine but resource [un]charging is not hot path? > charge/uncharge is hot path from cgroup perspective. Most of the resources the RDMA cgroup handles are only allocated at the beginning of the application. The RDMA subsystem allows direct user-spac

Re: [PATCHv9 1/3] rdmacg: Added rdma cgroup controller

2016-03-03 Thread Haggai Eran
On 03/03/2016 05:18, Parav Pandit wrote: > On Thu, Mar 3, 2016 at 1:28 AM, Parav Pandit wrote: >> On Wed, Mar 2, 2016 at 11:09 PM, Tejun Heo wrote: >>> Nothing seems to prevent @cg from going away if this races with >>> @current being migrated to a different cgroup. Have you run this with >>> lo

Re: [PATCHv9 1/3] rdmacg: Added rdma cgroup controller

2016-03-02 Thread Haggai Eran
On 03/03/2016 04:49, Parav Pandit wrote: > Hi Tejun, Haggai, > > On Thu, Mar 3, 2016 at 1:28 AM, Parav Pandit wrote: + rpool->refcnt--; + if (rpool->refcnt == 0 && rpool->num_max_cnt == pool_info->table_len) { >>> >>> If the caller charges 2 and then uncharges 1 two times,

Re: [PATCHv9 2/3] IB/core: added support to use rdma cgroup controller

2016-03-02 Thread Haggai Eran
: Parav Pandit Looks good to me. Thanks. Reviewed-by: Haggai Eran -- To unsubscribe from this list: send the line "unsubscribe linux-doc" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCHv7 3/3] rdmacg: Added documentation for rdmacg

2016-03-01 Thread Haggai Eran
On 28/02/2016 16:13, Parav Pandit wrote: > Added documentation for v1 and v2 version describing high > level design and usage examples on using rdma controller. > > Signed-off-by: Parav Pandit Reviewed-by: Haggai Eran -- To unsubscribe from this list: send the line "unsubscr

Re: [PATCHv7 2/3] IB/core: added support to use rdma cgroup controller

2016-03-01 Thread Haggai Eran
On 01/03/2016 11:22, Parav Pandit wrote: > On Tue, Mar 1, 2016 at 2:42 PM, Haggai Eran wrote: >> On 28/02/2016 16:13, Parav Pandit wrote: >>> diff --git a/drivers/infiniband/core/device.c >>> b/drivers/infiniband/core/device.c >>> index 00da80e..54ea8ce 1006

Re: [PATCHv7 2/3] IB/core: added support to use rdma cgroup controller

2016-03-01 Thread Haggai Eran
On 28/02/2016 16:13, Parav Pandit wrote: > diff --git a/drivers/infiniband/core/device.c > b/drivers/infiniband/core/device.c > index 00da80e..54ea8ce 100644 > --- a/drivers/infiniband/core/device.c > +++ b/drivers/infiniband/core/device.c > @@ -343,28 +343,38 @@ int ib_register_device(struct ib_d

Re: [PATCHv7 2/3] IB/core: added support to use rdma cgroup controller

2016-03-01 Thread Haggai Eran
On 28/02/2016 16:13, Parav Pandit wrote: > +void ib_rdmacg_query_limit(struct ib_device *device, int *limits, int > max_count) > +{ > + rdmacg_query_limit(&device->cg_device, limits); > +} > +EXPORT_SYMBOL(ib_rdmacg_query_limit); You can remove the max_count parameter here as well. -- To unsu

Re: [PATCHv7 1/3] rdmacg: Added rdma cgroup controller

2016-03-01 Thread Haggai Eran
up creation and device registration > time. > > Signed-off-by: Parav Pandit Reviewed-by: Haggai Eran -- To unsubscribe from this list: send the line "unsubscribe linux-doc" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCHv6 3/3] rdmacg: Added documentation for rdmacg

2016-02-28 Thread Haggai Eran
On 24/02/2016 17:21, Parav Pandit wrote: > On Wed, Feb 24, 2016 at 7:56 PM, Haggai Eran wrote: >> On 20/02/2016 13:00, Parav Pandit wrote: >>> Added documentation for v1 and v2 version describing high >>> level design and usage examples on using rdma controller. &

Re: [PATCHv6 1/3] rdmacg: Added rdma cgroup controller

2016-02-25 Thread Haggai Eran
On 25/02/2016 16:26, Parav Pandit wrote: >> Can we call kfree() with spin_lock held? All these years I tend to >> avoid doing so. > Also it doesn't look correct to hold the lock while freeing the memory > which is totally unrelated to the lock. > With that I think current code appears ok with excep

Re: [PATCHv6 1/3] rdmacg: Added rdma cgroup controller

2016-02-25 Thread Haggai Eran
On 25/02/2016 15:34, Parav Pandit wrote: > On Thu, Feb 25, 2016 at 5:33 PM, Haggai Eran wrote: >>>>> +retry: >>>>> + spin_lock(&cg->rpool_list_lock); >>>>> + rpool = find_cg_rpool_locked(cg, device); >>>>> +

Re: [PATCHv6 1/3] rdmacg: Added rdma cgroup controller

2016-02-25 Thread Haggai Eran
On 24/02/2016 18:16, Parav Pandit wrote: >>> + struct rdmacg_resource_pool *rpool; >>> + struct rdmacg_pool_info *pool_info = &device->pool_info; >>> + >>> + spin_lock(&cg->rpool_list_lock); >>> + rpool = find_cg_rpool_locked(cg, device); >> Is it possible for rpool to be NULL? >> >

Re: [PATCHv6 1/3] rdmacg: Added rdma cgroup controller

2016-02-24 Thread Haggai Eran
Hi, Overall I the patch looks good to me. I have a few comments below. On 20/02/2016 13:00, Parav Pandit wrote: > 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 co

Re: [PATCHv6 3/3] rdmacg: Added documentation for rdmacg

2016-02-24 Thread Haggai Eran
On 20/02/2016 13:00, Parav Pandit wrote: > Added documentation for v1 and v2 version describing high > level design and usage examples on using rdma controller. > > Signed-off-by: Parav Pandit I think you might want to mention that resource limits are reflected in the results returned from ib_uv

Re: [PATCHv6 2/3] IB/core: added support to use rdma cgroup controller

2016-02-24 Thread Haggai Eran
On 20/02/2016 13:00, Parav Pandit wrote: > +/** > + * ib_device_unregister_rdmacg - unregister with rdma cgroup. > + * @device: device to unregister. > + * > + * Unregister with the rdma cgroup. Should be called after > + * all the resources are deallocated, and after a stage when any > + * other r

Re: [PATCHv3 1/3] rdmacg: Added rdma cgroup controller.

2016-02-10 Thread Haggai Eran
On 01/02/2016 20:59, Parav Pandit wrote: > On Tue, Feb 2, 2016 at 12:10 AM, Tejun Heo wrote: >> So, I'm really not gonna go for individual drivers defining resources >> on their own. That's a trainwreck waiting to happen. There needs to >> be a lot more scrutiny than that. >> > Not every low lev