Messages in this thread |  | | Date | Wed, 18 Feb 2015 16:12:35 +0300 | From | Safonov Dmitry <> | Subject | Re: [PATCH 2/4] mm: cma: add functions to get region pages counters |
| |
Hello, On 02/14/2015 10:32 AM, Gioh Kim wrote: > 2015-02-13 오전 7:15에 Stefan Strogin 이(가) 쓴 글: >> From: Dmitry Safonov <d.safonov@partner.samsung.com> >> >> 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.
-- Best regards, Safonov Dmitry.
|  |