Re: [PATCH 2/4] mm: cma: add functions to get region pages counters
From: Safonov Dmitry
Date: Wed Feb 18 2015 - 08:12:45 EST
On 02/14/2015 10:32 AM, Gioh Kim wrote:
> 2015-02-13 오전 7:15에 Stefan Strogin 이(가) 쓴 글:
>> From: Dmitry Safonov <d.safonov@xxxxxxxxxxxxxxxxxxx>
>> Here are two functions that provide interface to compute/get used size
>> and size of biggest free chunk in cma region.
> I usually just try to allocate memory, not check free size before try,
> becuase free size can be changed after I check it.
> Could you tell me why biggest free chunk size is necessary?
It may have changed after checking - at beginning of allocation
this information is completely useless as you mentioned, but
it may be very helpful after failed allocation to detect fragmentation
problem: i.e, you failed to alloc 20 Mb from 100 Mb CMA region
with 60 Mb free space, so you will know the reason.
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/