From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751478AbaFLFSs (ORCPT ); Thu, 12 Jun 2014 01:18:48 -0400 Received: from LGEMRELSE6Q.lge.com ([156.147.1.121]:59770 "EHLO lgemrelse6q.lge.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750901AbaFLFSq (ORCPT ); Thu, 12 Jun 2014 01:18:46 -0400 X-Original-SENDERIP: 10.177.220.169 X-Original-MAILFROM: minchan@kernel.org Date: Thu, 12 Jun 2014 14:18:53 +0900 From: Minchan Kim To: Joonsoo Kim Cc: Andrew Morton , "Aneesh Kumar K.V" , Marek Szyprowski , Michal Nazarewicz , Russell King - ARM Linux , kvm@vger.kernel.org, linux-mm@kvack.org, Gleb Natapov , Greg Kroah-Hartman , Alexander Graf , kvm-ppc@vger.kernel.org, linux-kernel@vger.kernel.org, Paul Mackerras , Benjamin Herrenschmidt , Paolo Bonzini , linuxppc-dev@lists.ozlabs.org, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH v2 01/10] DMA, CMA: clean-up log message Message-ID: <20140612051853.GD12415@bbox> References: <1402543307-29800-1-git-send-email-iamjoonsoo.kim@lge.com> <1402543307-29800-2-git-send-email-iamjoonsoo.kim@lge.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1402543307-29800-2-git-send-email-iamjoonsoo.kim@lge.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Joonsoo, On Thu, Jun 12, 2014 at 12:21:38PM +0900, Joonsoo Kim wrote: > We don't need explicit 'CMA:' prefix, since we already define prefix > 'cma:' in pr_fmt. So remove it. > > And, some logs print function name and others doesn't. This looks > bad to me, so I unify log format to print function name consistently. > > Lastly, I add one more debug log on cma_activate_area(). When I take a look, it just indicates cma_activate_area was called or not, without what range for the area was reserved successfully so I couldn't see the intention for new message. Description should explain it so that everybody can agree on your claim. > > Signed-off-by: Joonsoo Kim > > diff --git a/drivers/base/dma-contiguous.c b/drivers/base/dma-contiguous.c > index 83969f8..bd0bb81 100644 > --- a/drivers/base/dma-contiguous.c > +++ b/drivers/base/dma-contiguous.c > @@ -144,7 +144,7 @@ void __init dma_contiguous_reserve(phys_addr_t limit) > } > > if (selected_size && !dma_contiguous_default_area) { > - pr_debug("%s: reserving %ld MiB for global area\n", __func__, > + pr_debug("%s(): reserving %ld MiB for global area\n", __func__, > (unsigned long)selected_size / SZ_1M); > > dma_contiguous_reserve_area(selected_size, selected_base, > @@ -163,8 +163,9 @@ static int __init cma_activate_area(struct cma *cma) > unsigned i = cma->count >> pageblock_order; > struct zone *zone; > > - cma->bitmap = kzalloc(bitmap_size, GFP_KERNEL); > + pr_debug("%s()\n", __func__); > > + cma->bitmap = kzalloc(bitmap_size, GFP_KERNEL); > if (!cma->bitmap) > return -ENOMEM; > > @@ -234,7 +235,8 @@ int __init dma_contiguous_reserve_area(phys_addr_t size, phys_addr_t base, > > /* Sanity checks */ > if (cma_area_count == ARRAY_SIZE(cma_areas)) { > - pr_err("Not enough slots for CMA reserved regions!\n"); > + pr_err("%s(): Not enough slots for CMA reserved regions!\n", > + __func__); > return -ENOSPC; > } > > @@ -274,14 +276,15 @@ int __init dma_contiguous_reserve_area(phys_addr_t size, phys_addr_t base, > *res_cma = cma; > cma_area_count++; > > - pr_info("CMA: reserved %ld MiB at %08lx\n", (unsigned long)size / SZ_1M, > - (unsigned long)base); > + pr_info("%s(): reserved %ld MiB at %08lx\n", > + __func__, (unsigned long)size / SZ_1M, (unsigned long)base); > > /* Architecture specific contiguous memory fixup. */ > dma_contiguous_early_fixup(base, size); > return 0; > err: > - pr_err("CMA: failed to reserve %ld MiB\n", (unsigned long)size / SZ_1M); > + pr_err("%s(): failed to reserve %ld MiB\n", > + __func__, (unsigned long)size / SZ_1M); > return ret; > } > > -- > 1.7.9.5 -- Kind regards, Minchan Kim From mboxrd@z Thu Jan 1 00:00:00 1970 From: Minchan Kim Subject: Re: [PATCH v2 01/10] DMA, CMA: clean-up log message Date: Thu, 12 Jun 2014 14:18:53 +0900 Message-ID: <20140612051853.GD12415@bbox> References: <1402543307-29800-1-git-send-email-iamjoonsoo.kim@lge.com> <1402543307-29800-2-git-send-email-iamjoonsoo.kim@lge.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Andrew Morton , "Aneesh Kumar K.V" , Marek Szyprowski , Michal Nazarewicz , Russell King - ARM Linux , kvm@vger.kernel.org, linux-mm@kvack.org, Gleb Natapov , Greg Kroah-Hartman , Alexander Graf , kvm-ppc@vger.kernel.org, linux-kernel@vger.kernel.org, Paul Mackerras , Benjamin Herrenschmidt , Paolo Bonzini , linuxppc-dev@lists.ozlabs.org, linux-arm-kernel@lists.infradead.org To: Joonsoo Kim Return-path: Content-Disposition: inline In-Reply-To: <1402543307-29800-2-git-send-email-iamjoonsoo.kim@lge.com> Sender: owner-linux-mm@kvack.org List-Id: kvm.vger.kernel.org Hi Joonsoo, On Thu, Jun 12, 2014 at 12:21:38PM +0900, Joonsoo Kim wrote: > We don't need explicit 'CMA:' prefix, since we already define prefix > 'cma:' in pr_fmt. So remove it. > > And, some logs print function name and others doesn't. This looks > bad to me, so I unify log format to print function name consistently. > > Lastly, I add one more debug log on cma_activate_area(). When I take a look, it just indicates cma_activate_area was called or not, without what range for the area was reserved successfully so I couldn't see the intention for new message. Description should explain it so that everybody can agree on your claim. > > Signed-off-by: Joonsoo Kim > > diff --git a/drivers/base/dma-contiguous.c b/drivers/base/dma-contiguous.c > index 83969f8..bd0bb81 100644 > --- a/drivers/base/dma-contiguous.c > +++ b/drivers/base/dma-contiguous.c > @@ -144,7 +144,7 @@ void __init dma_contiguous_reserve(phys_addr_t limit) > } > > if (selected_size && !dma_contiguous_default_area) { > - pr_debug("%s: reserving %ld MiB for global area\n", __func__, > + pr_debug("%s(): reserving %ld MiB for global area\n", __func__, > (unsigned long)selected_size / SZ_1M); > > dma_contiguous_reserve_area(selected_size, selected_base, > @@ -163,8 +163,9 @@ static int __init cma_activate_area(struct cma *cma) > unsigned i = cma->count >> pageblock_order; > struct zone *zone; > > - cma->bitmap = kzalloc(bitmap_size, GFP_KERNEL); > + pr_debug("%s()\n", __func__); > > + cma->bitmap = kzalloc(bitmap_size, GFP_KERNEL); > if (!cma->bitmap) > return -ENOMEM; > > @@ -234,7 +235,8 @@ int __init dma_contiguous_reserve_area(phys_addr_t size, phys_addr_t base, > > /* Sanity checks */ > if (cma_area_count == ARRAY_SIZE(cma_areas)) { > - pr_err("Not enough slots for CMA reserved regions!\n"); > + pr_err("%s(): Not enough slots for CMA reserved regions!\n", > + __func__); > return -ENOSPC; > } > > @@ -274,14 +276,15 @@ int __init dma_contiguous_reserve_area(phys_addr_t size, phys_addr_t base, > *res_cma = cma; > cma_area_count++; > > - pr_info("CMA: reserved %ld MiB at %08lx\n", (unsigned long)size / SZ_1M, > - (unsigned long)base); > + pr_info("%s(): reserved %ld MiB at %08lx\n", > + __func__, (unsigned long)size / SZ_1M, (unsigned long)base); > > /* Architecture specific contiguous memory fixup. */ > dma_contiguous_early_fixup(base, size); > return 0; > err: > - pr_err("CMA: failed to reserve %ld MiB\n", (unsigned long)size / SZ_1M); > + pr_err("%s(): failed to reserve %ld MiB\n", > + __func__, (unsigned long)size / SZ_1M); > return ret; > } > > -- > 1.7.9.5 -- Kind regards, Minchan Kim -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lgemrelse6q.lge.com (LGEMRELSE6Q.lge.com [156.147.1.121]) by lists.ozlabs.org (Postfix) with ESMTP id D37C51A02BE for ; Thu, 12 Jun 2014 15:33:43 +1000 (EST) Date: Thu, 12 Jun 2014 14:18:53 +0900 From: Minchan Kim To: Joonsoo Kim Subject: Re: [PATCH v2 01/10] DMA, CMA: clean-up log message Message-ID: <20140612051853.GD12415@bbox> References: <1402543307-29800-1-git-send-email-iamjoonsoo.kim@lge.com> <1402543307-29800-2-git-send-email-iamjoonsoo.kim@lge.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii In-Reply-To: <1402543307-29800-2-git-send-email-iamjoonsoo.kim@lge.com> Cc: kvm-ppc@vger.kernel.org, Russell King - ARM Linux , kvm@vger.kernel.org, Gleb Natapov , Greg Kroah-Hartman , Alexander Graf , Michal Nazarewicz , linux-kernel@vger.kernel.org, linux-mm@kvack.org, Paul Mackerras , "Aneesh Kumar K.V" , Paolo Bonzini , Andrew Morton , linuxppc-dev@lists.ozlabs.org, linux-arm-kernel@lists.infradead.org, Marek Szyprowski List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Hi Joonsoo, On Thu, Jun 12, 2014 at 12:21:38PM +0900, Joonsoo Kim wrote: > We don't need explicit 'CMA:' prefix, since we already define prefix > 'cma:' in pr_fmt. So remove it. > > And, some logs print function name and others doesn't. This looks > bad to me, so I unify log format to print function name consistently. > > Lastly, I add one more debug log on cma_activate_area(). When I take a look, it just indicates cma_activate_area was called or not, without what range for the area was reserved successfully so I couldn't see the intention for new message. Description should explain it so that everybody can agree on your claim. > > Signed-off-by: Joonsoo Kim > > diff --git a/drivers/base/dma-contiguous.c b/drivers/base/dma-contiguous.c > index 83969f8..bd0bb81 100644 > --- a/drivers/base/dma-contiguous.c > +++ b/drivers/base/dma-contiguous.c > @@ -144,7 +144,7 @@ void __init dma_contiguous_reserve(phys_addr_t limit) > } > > if (selected_size && !dma_contiguous_default_area) { > - pr_debug("%s: reserving %ld MiB for global area\n", __func__, > + pr_debug("%s(): reserving %ld MiB for global area\n", __func__, > (unsigned long)selected_size / SZ_1M); > > dma_contiguous_reserve_area(selected_size, selected_base, > @@ -163,8 +163,9 @@ static int __init cma_activate_area(struct cma *cma) > unsigned i = cma->count >> pageblock_order; > struct zone *zone; > > - cma->bitmap = kzalloc(bitmap_size, GFP_KERNEL); > + pr_debug("%s()\n", __func__); > > + cma->bitmap = kzalloc(bitmap_size, GFP_KERNEL); > if (!cma->bitmap) > return -ENOMEM; > > @@ -234,7 +235,8 @@ int __init dma_contiguous_reserve_area(phys_addr_t size, phys_addr_t base, > > /* Sanity checks */ > if (cma_area_count == ARRAY_SIZE(cma_areas)) { > - pr_err("Not enough slots for CMA reserved regions!\n"); > + pr_err("%s(): Not enough slots for CMA reserved regions!\n", > + __func__); > return -ENOSPC; > } > > @@ -274,14 +276,15 @@ int __init dma_contiguous_reserve_area(phys_addr_t size, phys_addr_t base, > *res_cma = cma; > cma_area_count++; > > - pr_info("CMA: reserved %ld MiB at %08lx\n", (unsigned long)size / SZ_1M, > - (unsigned long)base); > + pr_info("%s(): reserved %ld MiB at %08lx\n", > + __func__, (unsigned long)size / SZ_1M, (unsigned long)base); > > /* Architecture specific contiguous memory fixup. */ > dma_contiguous_early_fixup(base, size); > return 0; > err: > - pr_err("CMA: failed to reserve %ld MiB\n", (unsigned long)size / SZ_1M); > + pr_err("%s(): failed to reserve %ld MiB\n", > + __func__, (unsigned long)size / SZ_1M); > return ret; > } > > -- > 1.7.9.5 -- Kind regards, Minchan Kim From mboxrd@z Thu Jan 1 00:00:00 1970 From: minchan@kernel.org (Minchan Kim) Date: Thu, 12 Jun 2014 14:18:53 +0900 Subject: [PATCH v2 01/10] DMA, CMA: clean-up log message In-Reply-To: <1402543307-29800-2-git-send-email-iamjoonsoo.kim@lge.com> References: <1402543307-29800-1-git-send-email-iamjoonsoo.kim@lge.com> <1402543307-29800-2-git-send-email-iamjoonsoo.kim@lge.com> Message-ID: <20140612051853.GD12415@bbox> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org Hi Joonsoo, On Thu, Jun 12, 2014 at 12:21:38PM +0900, Joonsoo Kim wrote: > We don't need explicit 'CMA:' prefix, since we already define prefix > 'cma:' in pr_fmt. So remove it. > > And, some logs print function name and others doesn't. This looks > bad to me, so I unify log format to print function name consistently. > > Lastly, I add one more debug log on cma_activate_area(). When I take a look, it just indicates cma_activate_area was called or not, without what range for the area was reserved successfully so I couldn't see the intention for new message. Description should explain it so that everybody can agree on your claim. > > Signed-off-by: Joonsoo Kim > > diff --git a/drivers/base/dma-contiguous.c b/drivers/base/dma-contiguous.c > index 83969f8..bd0bb81 100644 > --- a/drivers/base/dma-contiguous.c > +++ b/drivers/base/dma-contiguous.c > @@ -144,7 +144,7 @@ void __init dma_contiguous_reserve(phys_addr_t limit) > } > > if (selected_size && !dma_contiguous_default_area) { > - pr_debug("%s: reserving %ld MiB for global area\n", __func__, > + pr_debug("%s(): reserving %ld MiB for global area\n", __func__, > (unsigned long)selected_size / SZ_1M); > > dma_contiguous_reserve_area(selected_size, selected_base, > @@ -163,8 +163,9 @@ static int __init cma_activate_area(struct cma *cma) > unsigned i = cma->count >> pageblock_order; > struct zone *zone; > > - cma->bitmap = kzalloc(bitmap_size, GFP_KERNEL); > + pr_debug("%s()\n", __func__); > > + cma->bitmap = kzalloc(bitmap_size, GFP_KERNEL); > if (!cma->bitmap) > return -ENOMEM; > > @@ -234,7 +235,8 @@ int __init dma_contiguous_reserve_area(phys_addr_t size, phys_addr_t base, > > /* Sanity checks */ > if (cma_area_count == ARRAY_SIZE(cma_areas)) { > - pr_err("Not enough slots for CMA reserved regions!\n"); > + pr_err("%s(): Not enough slots for CMA reserved regions!\n", > + __func__); > return -ENOSPC; > } > > @@ -274,14 +276,15 @@ int __init dma_contiguous_reserve_area(phys_addr_t size, phys_addr_t base, > *res_cma = cma; > cma_area_count++; > > - pr_info("CMA: reserved %ld MiB at %08lx\n", (unsigned long)size / SZ_1M, > - (unsigned long)base); > + pr_info("%s(): reserved %ld MiB at %08lx\n", > + __func__, (unsigned long)size / SZ_1M, (unsigned long)base); > > /* Architecture specific contiguous memory fixup. */ > dma_contiguous_early_fixup(base, size); > return 0; > err: > - pr_err("CMA: failed to reserve %ld MiB\n", (unsigned long)size / SZ_1M); > + pr_err("%s(): failed to reserve %ld MiB\n", > + __func__, (unsigned long)size / SZ_1M); > return ret; > } > > -- > 1.7.9.5 -- Kind regards, Minchan Kim From mboxrd@z Thu Jan 1 00:00:00 1970 From: Minchan Kim Date: Thu, 12 Jun 2014 05:18:53 +0000 Subject: Re: [PATCH v2 01/10] DMA, CMA: clean-up log message Message-Id: <20140612051853.GD12415@bbox> List-Id: References: <1402543307-29800-1-git-send-email-iamjoonsoo.kim@lge.com> <1402543307-29800-2-git-send-email-iamjoonsoo.kim@lge.com> In-Reply-To: <1402543307-29800-2-git-send-email-iamjoonsoo.kim@lge.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Joonsoo Kim Cc: Andrew Morton , "Aneesh Kumar K.V" , Marek Szyprowski , Michal Nazarewicz , Russell King - ARM Linux , kvm@vger.kernel.org, linux-mm@kvack.org, Gleb Natapov , Greg Kroah-Hartman , Alexander Graf , kvm-ppc@vger.kernel.org, linux-kernel@vger.kernel.org, Paul Mackerras , Benjamin Herrenschmidt , Paolo Bonzini , linuxppc-dev@lists.ozlabs.org, linux-arm-kernel@lists.infradead.org Hi Joonsoo, On Thu, Jun 12, 2014 at 12:21:38PM +0900, Joonsoo Kim wrote: > We don't need explicit 'CMA:' prefix, since we already define prefix > 'cma:' in pr_fmt. So remove it. > > And, some logs print function name and others doesn't. This looks > bad to me, so I unify log format to print function name consistently. > > Lastly, I add one more debug log on cma_activate_area(). When I take a look, it just indicates cma_activate_area was called or not, without what range for the area was reserved successfully so I couldn't see the intention for new message. Description should explain it so that everybody can agree on your claim. > > Signed-off-by: Joonsoo Kim > > diff --git a/drivers/base/dma-contiguous.c b/drivers/base/dma-contiguous.c > index 83969f8..bd0bb81 100644 > --- a/drivers/base/dma-contiguous.c > +++ b/drivers/base/dma-contiguous.c > @@ -144,7 +144,7 @@ void __init dma_contiguous_reserve(phys_addr_t limit) > } > > if (selected_size && !dma_contiguous_default_area) { > - pr_debug("%s: reserving %ld MiB for global area\n", __func__, > + pr_debug("%s(): reserving %ld MiB for global area\n", __func__, > (unsigned long)selected_size / SZ_1M); > > dma_contiguous_reserve_area(selected_size, selected_base, > @@ -163,8 +163,9 @@ static int __init cma_activate_area(struct cma *cma) > unsigned i = cma->count >> pageblock_order; > struct zone *zone; > > - cma->bitmap = kzalloc(bitmap_size, GFP_KERNEL); > + pr_debug("%s()\n", __func__); > > + cma->bitmap = kzalloc(bitmap_size, GFP_KERNEL); > if (!cma->bitmap) > return -ENOMEM; > > @@ -234,7 +235,8 @@ int __init dma_contiguous_reserve_area(phys_addr_t size, phys_addr_t base, > > /* Sanity checks */ > if (cma_area_count = ARRAY_SIZE(cma_areas)) { > - pr_err("Not enough slots for CMA reserved regions!\n"); > + pr_err("%s(): Not enough slots for CMA reserved regions!\n", > + __func__); > return -ENOSPC; > } > > @@ -274,14 +276,15 @@ int __init dma_contiguous_reserve_area(phys_addr_t size, phys_addr_t base, > *res_cma = cma; > cma_area_count++; > > - pr_info("CMA: reserved %ld MiB at %08lx\n", (unsigned long)size / SZ_1M, > - (unsigned long)base); > + pr_info("%s(): reserved %ld MiB at %08lx\n", > + __func__, (unsigned long)size / SZ_1M, (unsigned long)base); > > /* Architecture specific contiguous memory fixup. */ > dma_contiguous_early_fixup(base, size); > return 0; > err: > - pr_err("CMA: failed to reserve %ld MiB\n", (unsigned long)size / SZ_1M); > + pr_err("%s(): failed to reserve %ld MiB\n", > + __func__, (unsigned long)size / SZ_1M); > return ret; > } > > -- > 1.7.9.5 -- Kind regards, Minchan Kim