From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pa0-f54.google.com (mail-pa0-f54.google.com [209.85.220.54]) by kanga.kvack.org (Postfix) with ESMTP id C2F646B006E for ; Fri, 26 Dec 2014 09:40:27 -0500 (EST) Received: by mail-pa0-f54.google.com with SMTP id fb1so13282636pad.41 for ; Fri, 26 Dec 2014 06:40:27 -0800 (PST) Received: from mailout1.w1.samsung.com (mailout1.w1.samsung.com. [210.118.77.11]) by mx.google.com with ESMTPS id yg8si42082469pab.86.2014.12.26.06.40.25 for (version=TLSv1 cipher=RC4-MD5 bits=128/128); Fri, 26 Dec 2014 06:40:26 -0800 (PST) Received: from eucpsbgm1.samsung.com (unknown [203.254.199.244]) by mailout1.w1.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0NH70064F2A5N210@mailout1.w1.samsung.com> for linux-mm@kvack.org; Fri, 26 Dec 2014 14:44:29 +0000 (GMT) From: "Stefan I. Strogin" Subject: [PATCH 0/3] mm: cma: /proc/cmainfo Date: Fri, 26 Dec 2014 17:39:01 +0300 Message-id: Sender: owner-linux-mm@kvack.org List-ID: To: linux-mm@kvack.org, linux-kernel@vger.kernel.org Cc: "Stefan I. Strogin" , 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 , Minchan Kim , Dyasly Sergey , Vyacheslav Tyrtov 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. 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