Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1402812

Re: malloc() size in CMA region seems to be aligned to CMA_ALIGNMENT

From Michal Hocko <mhocko@kernel.org>
Newsgroups linux.kernel
Subject Re: malloc() size in CMA region seems to be aligned to CMA_ALIGNMENT
Date 2016-05-18 10:50 +0200
Message-ID <rA5l0-87e-31@gated-at.bofh.it> (permalink)
References <rzPge-6lc-15@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


[CC linux-mm and some usual suspects]

On Tue 17-05-16 23:37:55, lunar12 lunartwix wrote:
> A 4MB dma_alloc_coherent  in kernel after malloc(2*1024) 40 times in
> CMA region by user space will cause an error on our ARM 3.18 kernel
> platform with a 32MB CMA.
> 
> It seems that the malloc in CMA region will be aligned to
> CMA_ALIGNMENT everytime even if the requested malloc size is very
> small so the CMA region is not available after the malloc operations.
> 
> Is there any configuraiton that can change this behavior??
> 
> Thanks
> 
> Cheers
> Ken

-- 
Michal Hocko
SUSE Labs

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

malloc() size in CMA region seems to be aligned to CMA_ALIGNMENT lunar12 lunartwix <lunartwix@gmail.com> - 2016-05-17 17:40 +0200
  Re: malloc() size in CMA region seems to be aligned to CMA_ALIGNMENT Michal Hocko <mhocko@kernel.org> - 2016-05-18 10:50 +0200
    Re: malloc() size in CMA region seems to be aligned to CMA_ALIGNMENT lunar12 lunartwix <lunartwix@gmail.com> - 2016-05-18 15:20 +0200
      Re: malloc() size in CMA region seems to be aligned to CMA_ALIGNMENT Joonsoo Kim <iamjoonsoo.kim@lge.com> - 2016-05-19 03:00 +0200

csiph-web