Messages in this thread | | | Date | Tue, 27 Jan 2015 13:25:05 -0500 | From | Sasha Levin <> | Subject | Re: [PATCH v2 3/3] mm: cma: release trigger |
| |
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?
Thanks, Sasha
| |