lkml.org 
[lkml]   [2015]   [Jan]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH v2 3/3] mm: cma: release trigger
From
2015-01-28 5:13 GMT+09:00 Sasha Levin <sasha.levin@oracle.com>:
> On 01/27/2015 01:25 PM, Sasha Levin wrote:
>> On 01/27/2015 03:10 AM, Joonsoo Kim wrote:
>>>> >> + if (mem->n <= count) {
>>>>> >> > + cma_release(cma, mem->p, mem->n);
>>>>> >> > + count -= mem->n;
>>>>> >> > + kfree(mem);
>>>>> >> > + } else {
>>>>> >> > + cma_release(cma, mem->p, count);
>>>>> >> > + mem->p += count;
>>>>> >> > + mem->n -= count;
>>>>> >> > + count = 0;
>>>>> >> > + cma_add_to_cma_mem_list(mem);
>>>>> >> > + }
>>>>> >> > + }
>>> > If order_per_bit is not 0 and count used in cma_release() is
>>> > different with the count used in cma_alloc(), problem could
>>> > occur since bitmap management code can't handle that situation.
>>> >
>>> > Could we just disable this case in this testing module?
>> How should it behave then? Just free a max of 'count' pages and
>> stop beforehand if we're going to go over it?
>
> Actually, Can I just check for order_per_bit == 0 and execute it
> then? I don't want to avoid testing these paths.

Okay. I'm okay if you check order_per_bit == 0 in such case.

Thanks.


\
 
 \ /
  Last update: 2015-01-28 02:41    [W:0.052 / U:3.084 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site