Thread (39 messages) 39 messages, 2 authors, 2016-01-07

Re: [PATCHv1 3/6] rdmacg: implements rdma cgroup

From: Parav Pandit <hidden>
Date: 2016-01-07 20:39:28
Also in: linux-rdma, lkml

On Fri, Jan 8, 2016 at 1:58 AM, Tejun Heo [off-list ref] wrote:
Hello, Parav.

On Fri, Jan 08, 2016 at 01:55:09AM +0530, Parav Pandit wrote:
...
quoted
Above functionality is achieved, by maintaining the map this tgid and
associated original cgroup at try_charge(), uncharge() time.
Hmmm, what happens after the following?

1. A process allocates some rdma resources and get registered on the
   hash table.

2. The process gets migrated to a different cgroup.

3. The process allocates more rdma resources.

Which cgroup would the resources from #3 be attributed to?
Since the pid/tgid of the process doesn't change in step_3, it
allocates from original cgroup of step_1.

However in next patch V2, as described below, since IB resource will
store rdma_cg pointer,
in step_3, new resource will be allocated from new cgroup.
old resource will be freed from older cgroup.
This is what you are expecting, right?

quoted
In alternate method,
Its simple to store the pointer of rdma_cgroup structure in the IB
resource structure and hold on reference count to rdma_cgroup.
so that when its freed, uncharge_resource can accept rdma_cgroup
structure pointer.
That'd be a lot more in line with how other controllers behave.
Thanks.

--
tejun
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help