linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Joonsoo Kim <iamjoonsoo.kim@lge.com>
To: Stefan Strogin <s.strogin@partner.samsung.com>
Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org,
	Andrew Morton <akpm@linux-foundation.org>,
	Marek Szyprowski <m.szyprowski@samsung.com>,
	Michal Nazarewicz <mina86@mina86.com>,
	aneesh.kumar@linux.vnet.ibm.com,
	Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
	Dmitry Safonov <d.safonov@partner.samsung.com>,
	Pintu Kumar <pintu.k@samsung.com>,
	Weijie Yang <weijie.yang@samsung.com>,
	Laura Abbott <lauraa@codeaurora.org>,
	SeongJae Park <sj38.park@gmail.com>, Hui Zhu <zhuhui@xiaomi.com>,
	Minchan Kim <minchan@kernel.org>,
	Dyasly Sergey <s.dyasly@samsung.com>,
	Vyacheslav Tyrtov <v.tyrtov@samsung.com>,
	Aleksei Mateosian <a.mateosian@samsung.com>,
	gregory.0xf0@gmail.com, sasha.levin@oracle.com, gioh.kim@lge.com,
	pavel@ucw.cz, stefan.strogin@gmail.com
Subject: Re: [PATCH v4 0/5] mm: cma: add some debug information for CMA
Date: Tue, 17 Mar 2015 10:43:06 +0900	[thread overview]
Message-ID: <20150317014306.GB19483@js1304-P5Q-DELUXE> (raw)
In-Reply-To: <cover.1426521377.git.s.strogin@partner.samsung.com>

On Mon, Mar 16, 2015 at 07:06:55PM +0300, Stefan Strogin wrote:
> Hi all.
> 
> Here is the fourth version of a patch set that adds some debugging facility for
> CMA.
> 
> This patch set is based on next-20150316.
> It is also available on git:
> git://github.com/stefanstrogin/linux -b cmainfo-v4
> 
> We want an interface to see a list of currently allocated CMA buffers and some
> useful information about them (like /proc/vmallocinfo but for physically
> contiguous buffers allocated with CMA).
> 
> For example. We want a big (megabytes) CMA buffer to be allocated in runtime
> in default CMA region. If someone already uses CMA then the big allocation
> could fail. If it happened then with such an interface we could find who used
> CMA at the moment of failure, who caused fragmentation and so on. Ftrace also
> would be helpful here, but with ftrace we can see the whole history of
> allocations and releases, whereas with this patch set we can see a snapshot of
> CMA region with actual information about its allocations.

Hello,

Hmm... I still don't think that this is really helpful to find root
cause of fragmentation. Think about following example.

Assume 1024 MB CMA region.

128 MB allocation * 4
1 MB allocation
128 MB allocation
128 MB release * 4 (first 4)
try 512 MB allocation

With above sequences, fragmentation happens and 512 MB allocation would
be failed. We can get information about 1 MB allocation and 128 MB one
from the buffer list as you suggested, but, fragmentation are related
to whole sequence of allocation/free history, not snapshot of allocation.

Thanks.

--
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: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

  parent reply	other threads:[~2015-03-17  1:43 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-16 16:06 Stefan Strogin
2015-03-16 16:06 ` [PATCH v4 1/5] mm: cma: add trace events to debug physically-contiguous memory allocations Stefan Strogin
2015-03-16 20:49   ` Stefan Strogin
2015-03-16 23:47     ` Steven Rostedt
2015-03-19 20:18       ` Stefan Strogin
2015-03-19 20:34         ` Steven Rostedt
2015-03-20 10:46           ` Stefan Strogin
2015-03-20 14:31             ` Steven Rostedt
2015-03-17  7:40     ` Ingo Molnar
2015-03-19 20:22       ` Stefan Strogin
2015-03-23 14:04         ` Ingo Molnar
2015-03-16 16:06 ` [PATCH v4 2/5] mm: cma: add number of pages to debug message in cma_release() Stefan Strogin
2015-03-16 16:06 ` [PATCH v4 3/5] stacktrace: add seq_print_stack_trace() Stefan Strogin
2015-03-16 17:33   ` Michal Nazarewicz
2015-03-16 16:06 ` [PATCH v4 4/5] mm: cma: add list of currently allocated CMA buffers to debugfs Stefan Strogin
2015-03-16 17:51   ` Michal Nazarewicz
2015-03-16 16:09 ` [PATCH v4 5/5] mm: cma: add functions to get region pages counters Stefan Strogin
2015-03-17  1:43 ` Joonsoo Kim [this message]
2015-03-17  1:54   ` [PATCH v4 0/5] mm: cma: add some debug information for CMA Sasha Levin
2015-03-17  2:04     ` Joonsoo Kim

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150317014306.GB19483@js1304-P5Q-DELUXE \
    --to=iamjoonsoo.kim@lge.com \
    --cc=a.mateosian@samsung.com \
    --cc=akpm@linux-foundation.org \
    --cc=aneesh.kumar@linux.vnet.ibm.com \
    --cc=d.safonov@partner.samsung.com \
    --cc=gioh.kim@lge.com \
    --cc=gregory.0xf0@gmail.com \
    --cc=lauraa@codeaurora.org \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=m.szyprowski@samsung.com \
    --cc=mina86@mina86.com \
    --cc=minchan@kernel.org \
    --cc=pavel@ucw.cz \
    --cc=pintu.k@samsung.com \
    --cc=s.dyasly@samsung.com \
    --cc=s.strogin@partner.samsung.com \
    --cc=sasha.levin@oracle.com \
    --cc=sj38.park@gmail.com \
    --cc=stefan.strogin@gmail.com \
    --cc=v.tyrtov@samsung.com \
    --cc=weijie.yang@samsung.com \
    --cc=zhuhui@xiaomi.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox