Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751950AbaL2Cei (ORCPT ); Sun, 28 Dec 2014 21:34:38 -0500 Received: from lgeamrelo01.lge.com ([156.147.1.125]:48959 "EHLO lgeamrelo01.lge.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751607AbaL2Ceh (ORCPT ); Sun, 28 Dec 2014 21:34:37 -0500 X-Original-SENDERIP: 10.177.220.156 X-Original-MAILFROM: minchan@kernel.org Date: Mon, 29 Dec 2014 11:36:39 +0900 From: Minchan Kim To: "Stefan I. Strogin" Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, Joonsoo Kim , Andrew Morton , Marek Szyprowski , Michal Nazarewicz , aneesh.kumar@linux.vnet.ibm.com, Laurent Pinchart , Dmitry Safonov , Pintu Kumar , Weijie Yang , Laura Abbott , SeongJae Park , Hui Zhu , Dyasly Sergey , Vyacheslav Tyrtov Subject: Re: [PATCH 0/3] mm: cma: /proc/cmainfo Message-ID: <20141229023639.GC27095@bbox> References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: 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 Hello, On Fri, Dec 26, 2014 at 05:39:01PM +0300, Stefan I. Strogin wrote: > Hello all, > > Here is a patch set that adds /proc/cmainfo. > > When compiled with CONFIG_CMA_DEBUG /proc/cmainfo will contain information > about about total, used, maximum free contiguous chunk and all currently > allocated contiguous buffers in CMA regions. The information about allocated > CMA buffers includes pid, comm, allocation latency and stacktrace at the > moment of allocation. It just says what you are doing but you didn't say why we need it. I can guess but clear description(ie, the problem what you want to solve with this patchset) would help others to review, for instance, why we need latency, why we need callstack, why we need new wheel rather than ftrace and so on. Thanks. > > Example: > > # cat /proc/cmainfo > CMARegion stat: 65536 kB total, 248 kB used, 65216 kB max contiguous chunk > > 0x32400000 - 0x32401000 (4 kB), allocated by pid 63 (systemd-udevd), latency 74 us > [] dma_generic_alloc_coherent+0x86/0x160 > [] rpm_idle+0x1f/0x1f0 > [] dma_generic_alloc_coherent+0x0/0x160 > [] ohci_init+0x1fe/0x430 [ohci_hcd] > [] dma_generic_alloc_coherent+0x0/0x160 > [] ohci_pci_reset+0x4f/0x60 [ohci_pci] > [] usb_add_hcd+0x1fc/0x900 [usbcore] > [] pcibios_set_master+0x38/0x90 > [] usb_hcd_pci_probe+0x176/0x4f0 [usbcore] > [] pci_device_probe+0x6f/0xd0 > [] sysfs_create_link+0x25/0x50 > [] driver_probe_device+0x92/0x3b0 > [] __mutex_lock_slowpath+0x5b/0x90 > [] __driver_attach+0x0/0x80 > [] __driver_attach+0x79/0x80 > [] __driver_attach+0x0/0x80 > > 0x32401000 - 0x32402000 (4 kB), allocated by pid 58 (systemd-udevd), latency 17 us > [] dmam_coherent_release+0x0/0x90 > [] __kmalloc_track_caller+0x31c/0x380 > [] dma_generic_alloc_coherent+0x86/0x160 > [] dma_generic_alloc_coherent+0x0/0x160 > [] dmam_alloc_coherent+0xb6/0x100 > [] ata_bmdma_port_start+0x43/0x60 [libata] > [] ata_host_start.part.29+0xb8/0x190 [libata] > [] pci_read+0x30/0x40 > [] ata_pci_sff_activate_host+0x29/0x220 [libata] > [] ata_bmdma_interrupt+0x0/0x1f0 [libata] > [] pcibios_set_master+0x38/0x90 > [] piix_init_one+0x44e/0x630 [ata_piix] > [] mutex_lock+0x10/0x20 > [] kernfs_activate+0x63/0xd0 > [] kernfs_add_one+0xc3/0x130 > [] pci_device_probe+0x6f/0xd0 > <...> > > Dmitry Safonov (1): > cma: add functions to get region pages counters > > Stefan I. Strogin (2): > stacktrace: add seq_print_stack_trace() > mm: cma: introduce /proc/cmainfo > > include/linux/cma.h | 2 + > include/linux/stacktrace.h | 4 + > kernel/stacktrace.c | 17 ++++ > mm/cma.c | 236 +++++++++++++++++++++++++++++++++++++++++++++ > 4 files changed, 259 insertions(+) > > -- > 2.1.0 > > -- > 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 -- Kind regards, Minchan Kim -- 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/