Re: [PATCH] mm: cma: print allocation failure reason and bitmap status

2017-01-02 Thread Michal Hocko
On Sun 01-01-17 22:59:40, Michal Nazarewicz wrote: [...] > Actually, Linux style is more like: > > #ifdef CONFIG_CMA_DEBUG > static void cma_debug_show_areas() > { > … > } > #else > static inline void cma_debug_show_areas() { } > #endif yes, we usually do that when the function is externall

Re: [PATCH] mm: cma: print allocation failure reason and bitmap status

2017-01-02 Thread Jaewon Kim
= 0; >> unsigned long bitmap_maxno, bitmap_no, bitmap_count; >> struct page *page = NULL; >> -int ret; >> +int ret = -ENOMEM; >> >> if (!cma || !cma->count) >> return NULL; >> @@ -426,6 +452,12 @@ struct page *cma_alloc(struct cma *cma, size_t

Re: [PATCH] mm: cma: print allocation failure reason and bitmap status

2017-01-01 Thread Michal Nazarewicz
On Mon, Jan 02 2017, Jaewon Kim wrote: > There are many reasons of CMA allocation failure such as EBUSY, ENOMEM, EINTR. > But we did not know error reason so far. This patch prints the error value. > > Additionally if CONFIG_CMA_DEBUG is enabled, this patch shows bitmap status to > know available p

Re: [PATCH] mm: cma: print allocation failure reason and bitmap status

2017-01-01 Thread Jaewon Kim
gt;> Date: Thu, 29 Dec 2016 11:00:16 +0900 >>> Subject: [PATCH] mm: cma: print allocation failure reason and bitmap status >>> >>> There are many reasons of CMA allocation failure such as EBUSY, ENOMEM, >>> EINTR. >>> But we did not know error reason so f

Re: [PATCH] mm: cma: print allocation failure reason and bitmap status

2017-01-01 Thread Michal Nazarewicz
On Fri, Dec 30 2016, Michal Hocko wrote: > On Fri 30-12-16 16:24:46, Jaewon Kim wrote: > [...] >> >From 7577cc94da3af27907aa6eec590d2ef51e4b9d80 Mon Sep 17 00:00:00 2001 >> From: Jaewon Kim >> Date: Thu, 29 Dec 2016 11:00:16 +0900 >> Subject: [PATCH] mm: cma: pr

Re: [PATCH] mm: cma: print allocation failure reason and bitmap status

2016-12-30 Thread Michal Hocko
On Fri 30-12-16 16:24:46, Jaewon Kim wrote: [...] > >From 7577cc94da3af27907aa6eec590d2ef51e4b9d80 Mon Sep 17 00:00:00 2001 > From: Jaewon Kim > Date: Thu, 29 Dec 2016 11:00:16 +0900 > Subject: [PATCH] mm: cma: print allocation failure reason and bitmap status > > There ar

Re: [PATCH] mm: cma: print allocation failure reason and bitmap status

2016-12-29 Thread Jaewon Kim
xpensive (even involving mutex locking) on > the other it’s in allocation failure path. bitmap status, I think, could be in side of CMA_DEBUG with the mutex but the first error log, I hope, to be out of CMA_DEBUG. > >>> return page; >>> } >>> >>>

Re: [PATCH] mm: cma: print allocation failure reason and bitmap status

2016-12-29 Thread Jaewon Kim
On 2016년 12월 29일 18:43, Michal Hocko wrote: > On Thu 29-12-16 18:26:38, Jaewon Kim wrote: >> >> On 2016년 12월 29일 18:14, Michal Hocko wrote: >>> On Thu 29-12-16 11:28:02, Jaewon Kim wrote: There are many reasons of CMA allocation failure such as EBUSY, ENOMEM, EINTR. This patch pri

Re: [PATCH] mm: cma: print allocation failure reason and bitmap status

2016-12-29 Thread Michal Nazarewicz
On Thu, Dec 29 2016, Michal Hocko wrote: > On Thu 29-12-16 11:28:02, Jaewon Kim wrote: >> There are many reasons of CMA allocation failure such as EBUSY, ENOMEM, >> EINTR. >> This patch prints the error value and bitmap status to know available pages >> regarding fragmentation. >> >> This is an E

Re: [PATCH] mm: cma: print allocation failure reason and bitmap status

2016-12-29 Thread Michal Hocko
On Thu 29-12-16 18:26:38, Jaewon Kim wrote: > > > On 2016년 12월 29일 18:14, Michal Hocko wrote: > > On Thu 29-12-16 11:28:02, Jaewon Kim wrote: > >> There are many reasons of CMA allocation failure such as EBUSY, ENOMEM, > >> EINTR. > >> This patch prints the error value and bitmap status to know

Re: [PATCH] mm: cma: print allocation failure reason and bitmap status

2016-12-29 Thread Jaewon Kim
On 2016년 12월 29일 18:14, Michal Hocko wrote: > On Thu 29-12-16 11:28:02, Jaewon Kim wrote: >> There are many reasons of CMA allocation failure such as EBUSY, ENOMEM, >> EINTR. >> This patch prints the error value and bitmap status to know available pages >> regarding fragmentation. >> >> This is

Re: [PATCH] mm: cma: print allocation failure reason and bitmap status

2016-12-29 Thread Michal Hocko
On Thu 29-12-16 11:28:02, Jaewon Kim wrote: > There are many reasons of CMA allocation failure such as EBUSY, ENOMEM, EINTR. > This patch prints the error value and bitmap status to know available pages > regarding fragmentation. > > This is an ENOMEM example with this patch. > [ 11.616321] [2:

[PATCH] mm: cma: print allocation failure reason and bitmap status

2016-12-28 Thread Jaewon Kim
There are many reasons of CMA allocation failure such as EBUSY, ENOMEM, EINTR. This patch prints the error value and bitmap status to know available pages regarding fragmentation. This is an ENOMEM example with this patch. [ 11.616321] [2: Binder:711_1: 740] cma: cma_alloc: alloc failed, re