Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752468AbbDBNE7 (ORCPT ); Thu, 2 Apr 2015 09:04:59 -0400 Received: from mailout4.w1.samsung.com ([210.118.77.14]:50346 "EHLO mailout4.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751260AbbDBNE4 (ORCPT ); Thu, 2 Apr 2015 09:04:56 -0400 X-AuditID: cbfec7f4-b7f126d000001e9a-a3-551d3dc848b4 Message-id: <551D3E73.9070405@partner.samsung.com> Date: Thu, 02 Apr 2015 16:04:51 +0300 From: Stefan Strogin User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-version: 1.0 To: Joonsoo Kim Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, Steven Rostedt , Ingo Molnar , Andrew Morton , Marek Szyprowski , Michal Nazarewicz , aneesh.kumar@linux.vnet.ibm.com, Laurent Pinchart , Sasha Levin , Dmitry Safonov , Pintu Kumar , Laura Abbott , Dyasly Sergey , Vyacheslav Tyrtov , Aleksei Mateosian , gioh.kim@lge.com, stefan.strogin@gmail.com Subject: Re: [PATCH] mm: cma: add trace events for CMA allocations and freeings References: <1427895103-9431-1-git-send-email-s.strogin@partner.samsung.com> <20150402073340.GA13158@js1304-P5Q-DELUXE> In-reply-to: <20150402073340.GA13158@js1304-P5Q-DELUXE> Content-type: text/plain; charset=utf-8 Content-transfer-encoding: 7bit X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrOIsWRmVeSWpSXmKPExsVy+t/xq7onbGVDDea1qVs8nDeJ3WLO+jVs Fo9fz2Ox+LTyKZvFs6YvjBYru5vZLLZ3zmC36Jy4hN3i8q45bBb31vxntVh75C67xYLjLawW lw4sYLLo+36Y3WJfxwMmi8mzpSy+nZzDbLH4yG1mi8tv/rNbTJ3xg91BxONyXy+Tx85Zd9k9 WvbdYveY3TGT1WPTp0nsHl1vrzB5nJjxm8XjwaHNLB7r/rxi8vj49BaLx8F3e5g83u+7yubR t2UVo8fnTXIBfFFcNimpOZllqUX6dglcGRdajjAWPOauaH9yn62BcQVnFyMnh4SAicSdD0uY IGwxiQv31rN1MXJxCAksZZRY23gbLCEk8JFR4tXjGhCbV8BIYvvOM2wgNouAqsTDjjVgNWxA g45dmM7YxcjBISoQIXH7MidEuaDEj8n3WEBsEQENidWrNjODzGcW2MAqcf9/JytIvbCAv8Sv o6wQqyolduxYCTaeU8BcorHpDDtICbOAusSUKbkgYWYBeYnNa94yT2AUmIVkwyyEqllIqhYw Mq9iFE0tTS4oTkrPNdQrTswtLs1L10vOz93ECIncLzsYFx+zOsQowMGoxMN745N0qBBrYllx Ze4hRgkOZiUR3gfasqFCvCmJlVWpRfnxRaU5qcWHGJk4OKUaGJt1ytyq+c9FPBH509Qjd1ru 3Yf0Js2fnUdq5WLkus5vj7vyvCop7VYxZ9HKPXLZlUkM250bGkSLVzEu078XoMteaLBJrWoO v5Xm/xKWyg9+7cKXc/KvzduXdEKF8av+VA/1KeIG28vWvVafMaec48yyllSt5Tcv8EWt8Aqz 7v7VkvuW4aGNEktxRqKhFnNRcSIAXI7jgboCAAA= Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1707 Lines: 50 Hello Joonsoo, On 02/04/15 10:33, Joonsoo Kim wrote: > Hello, > > On Wed, Apr 01, 2015 at 04:31:43PM +0300, Stefan Strogin wrote: >> Add trace events for cma_alloc() and cma_release(). >> >> The cma_alloc tracepoint is used both for successful and failed allocations, >> in case of allocation failure pfn=-1UL is stored and printed. >> >> Signed-off-by: Stefan Strogin >> --- >> >> Took out from the patch set "mm: cma: add some debug information for CMA" v4 >> (http://thread.gmane.org/gmane.linux.kernel.mm/129903) because of probable >> uselessness of the rest of the patches. > > I think that patch 5/5 in previous submission is handy and > simple to merge. Although we can calculate it by using bitmap, > it would be good to get that information(used size and maxchunk size) > directly. Well, then I can send the patch 5/5 once more, this time singly. > >> @@ -414,6 +416,8 @@ struct page *cma_alloc(struct cma *cma, unsigned int count, unsigned int align) >> start = bitmap_no + mask + 1; >> } >> >> + trace_cma_alloc(page ? pfn : -1UL, page, count); >> + > > I think that tracing align is also useful. > Is there any reason not to include it? In our case (DMA) alignment is easily calculated from the allocation size and CONFIG_CMA_ALIGNMENT. But I think you're right, e.g. it may be not so obvious on powerpc kvm? Anyway it won't be a shortcoming if we trace 'align' too. > > Thanks. Thank you for the reply. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/