Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1348710
| From | Parav Pandit <pandit.parav@gmail.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCHv9 1/3] rdmacg: Added rdma cgroup controller |
| Date | 2016-03-03 03:50 +0100 |
| Message-ID | <r8ruV-ms-5@gated-at.bofh.it> (permalink) |
| References | <r7XQd-4Tj-3@gated-at.bofh.it> <r7XQd-4Tj-1@gated-at.bofh.it> <r8j4l-2TR-1@gated-at.bofh.it> <r8l6a-4lm-19@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Hi Tejun, Haggai,
On Thu, Mar 3, 2016 at 1:28 AM, Parav Pandit <pandit.parav@gmail.com> 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, the refcnt
>> underflows? Why not just track how many usages are zero?
>>
> This is certainly must fix bug. Changed refcnt to usage_sum and changed to do
> usage_sum -= num during uncharging
> and
> usage_sum += num during charing.
This is not sufficient as css_get() and put are done only once per
call, which leads to similar problem as of refcnt.
As I think more, I realised that this particular test is missing that
resulted in this related bug, I realize that we don't have use case to
have "num" field from the IB stack side.
For bulk free IB stack will have to keep track of different or same
rdmacg returned values to call uncharge() with right number of
resources, all of that complexity just doesn't make sense and not
required.
So as first step to further simplify this, I am removing "num" input
field from charge and uncharge API.
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCHv9 1/3] rdmacg: Added rdma cgroup controller Parav Pandit <pandit.parav@gmail.com> - 2016-03-01 20:10 +0100
Re: [PATCHv9 1/3] rdmacg: Added rdma cgroup controller Tejun Heo <tj@kernel.org> - 2016-03-02 18:50 +0100
Re: [PATCHv9 1/3] rdmacg: Added rdma cgroup controller Parav Pandit <pandit.parav@gmail.com> - 2016-03-02 21:00 +0100
Re: [PATCHv9 1/3] rdmacg: Added rdma cgroup controller Parav Pandit <pandit.parav@gmail.com> - 2016-03-03 03:50 +0100
Re: [PATCHv9 1/3] rdmacg: Added rdma cgroup controller Parav Pandit <pandit.parav@gmail.com> - 2016-03-03 04:20 +0100
Re: [PATCHv9 1/3] rdmacg: Added rdma cgroup controller Parav Pandit <pandit.parav@gmail.com> - 2016-03-03 09:40 +0100
csiph-web