From: Mark Brown <broonie@opensource.wolfsonmicro.com>
To: Marek Szyprowski <m.szyprowski@samsung.com>
Cc: Michal Nazarewicz <m.nazarewicz@samsung.com>,
'Daniel Walker' <dwalker@codeaurora.org>,
linux-mm@kvack.org, Pawel Osciak <p.osciak@samsung.com>,
'Xiaolin Zhang' <xiaolin.zhang@intel.com>,
'Hiremath Vaibhav' <hvaibhav@ti.com>,
'Robert Fekete' <robert.fekete@stericsson.com>,
'Marcus Lorentzon' <marcus.xm.lorentzon@stericsson.com>,
linux-kernel@vger.kernel.org,
'Kyungmin Park' <kyungmin.park@samsung.com>,
linux-arm-msm@vger.kernel.org
Subject: Re: [PATCH 2/4] mm: cma: Contiguous Memory Allocator added
Date: Thu, 22 Jul 2010 11:52:03 +0100 [thread overview]
Message-ID: <20100722105203.GD4737@rakim.wolfsonmicro.main> (raw)
In-Reply-To: <000901cb297f$e28f2b10$a7ad8130$%szyprowski@samsung.com>
On Thu, Jul 22, 2010 at 11:25:48AM +0200, Marek Szyprowski wrote:
> The driver may specify memory requirements (like memory address range or
> alignment), but it cannot provide enough information to avoid or reduce
> memory fragmentation. More than one memory region can be perfectly used
> to reduce memory fragmentation IF common usage patterns are known. In
> embedded world usually not all integrated device are being used at the
> same time. This way some memory regions can be shared by 2 or more devices.
I do have some passing familiarity with the area, typically a lot of the
features of a SoC won't get used at all at runtime on any given system.
> Just assume that gfx accelerator allocates memory is rather small chunks,
> but keeps it while relevant surface is being displayed or processed by
> application. It is not surprising that GUI (accelerated by the hardware
> engine) is used almost all the time on a mobile device. This usage pattern
> would produce a lot of fragmentation in the memory pool that is used by gfx
> accelerator. Then we want to run a camera capture device to take a 8Mpix
I'd expect that the devices would be able to reserve blocks of memory to
play with separately to the actual allocations (ie, allocate regions
like those on the command line) and things like the GPU would make use
of that. I think you're already doing part of this?
> photo. This require a large contiguous buffer. If we try to allocate it from
> common pool it might happen that it is not possible (because of the
> fragmentation).
Sure, but none of this is saying to me that it's specifically important
to supply a static configuration via this textual configuration language
on the command line - half the problem is that you're trying to write
the configuration down in a format which is fairly tightly constrained
by needing to be there. If the configuration is more dynamic there's a
lot more flexibility to either allow the system to figure things out
dynamically (which will hopefully work a lot of the time, for example in
your use case only the GPU really needs memory reserving).
Remember also that if you can configure this at runtime (as you say
you're working towards) then even if you have a fairly static
configuration you can inject it into the kernel from the application
layer rather than having to either hard code it in the image or bodge it
in via the command line. This keeps the resource allocation joined up
with the application layer (which is after all what determines the
resource usage).
next prev parent reply other threads:[~2010-07-22 10:52 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <cover.1279639238.git.m.nazarewicz@samsung.com>
[not found] ` <d6d104950c1391eaf3614d56615617cee5722fb4.1279639238.git.m.nazarewicz@samsung.com>
[not found] ` <adceebd371e8a66a2c153f429b38068eca99e99f.1279639238.git.m.nazarewicz@samsung.com>
2010-07-20 18:15 ` [PATCH 2/4] mm: cma: Contiguous Memory Allocator added Daniel Walker
2010-07-20 19:14 ` Michał Nazarewicz
2010-07-20 19:38 ` Daniel Walker
2010-07-21 12:01 ` Michał Nazarewicz
2010-07-21 17:35 ` Daniel Walker
2010-07-21 18:11 ` Michał Nazarewicz
2010-07-21 18:19 ` Daniel Walker
2010-07-21 18:38 ` Michał Nazarewicz
2010-07-21 18:58 ` Daniel Walker
2010-07-21 19:21 ` Michał Nazarewicz
2010-07-21 19:37 ` Daniel Walker
2010-07-21 19:53 ` Michał Nazarewicz
2010-07-21 20:03 ` Daniel Walker
2010-07-21 20:22 ` Michał Nazarewicz
2010-07-21 20:34 ` Daniel Walker
2010-07-21 20:43 ` Michał Nazarewicz
2010-07-21 20:45 ` Daniel Walker
2010-07-21 20:56 ` Michał Nazarewicz
2010-07-21 21:01 ` Daniel Walker
2010-07-22 9:34 ` Michał Nazarewicz
2010-07-21 13:52 ` Mark Brown
2010-07-21 14:31 ` Michał Nazarewicz
2010-07-21 18:24 ` Mark Brown
2010-07-21 18:41 ` Michał Nazarewicz
2010-07-22 9:06 ` Mark Brown
2010-07-22 9:25 ` Marek Szyprowski
2010-07-22 10:52 ` Mark Brown [this message]
2010-07-22 11:30 ` Michał Nazarewicz
2010-07-22 12:46 ` Mark Brown
2010-07-22 13:24 ` Michał Nazarewicz
2010-07-22 13:40 ` Mark Brown
2010-07-22 14:58 ` Michał Nazarewicz
2010-07-22 15:05 ` Mark Brown
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=20100722105203.GD4737@rakim.wolfsonmicro.main \
--to=broonie@opensource.wolfsonmicro.com \
--cc=dwalker@codeaurora.org \
--cc=hvaibhav@ti.com \
--cc=kyungmin.park@samsung.com \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=m.nazarewicz@samsung.com \
--cc=m.szyprowski@samsung.com \
--cc=marcus.xm.lorentzon@stericsson.com \
--cc=p.osciak@samsung.com \
--cc=robert.fekete@stericsson.com \
--cc=xiaolin.zhang@intel.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;
as well as URLs for NNTP newsgroup(s).