lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 22 Jul 2010 18:35:07 +0900
From:	FUJITA Tomonori <fujita.tomonori@....ntt.co.jp>
To:	m.szyprowski@...sung.com
Cc:	fujita.tomonori@....ntt.co.jp, corbet@....net,
	m.nazarewicz@...sung.com, linux-mm@...ck.org, p.osciak@...sung.com,
	xiaolin.zhang@...el.com, hvaibhav@...com,
	robert.fekete@...ricsson.com, marcus.xm.lorentzon@...ricsson.com,
	linux-kernel@...r.kernel.org, kyungmin.park@...sung.com
Subject: RE: [PATCH 2/4] mm: cma: Contiguous Memory Allocator added

On Thu, 22 Jul 2010 09:28:02 +0200
Marek Szyprowski <m.szyprowski@...sung.com> wrote:

> > About the framework, it looks too complicated than we actually need
> > (the command line stuff looks insane).
> 
> Well, this command line stuff was designed to provide a way to configure
> memory allocation for devices with very sophisticated memory requirements.

You have the feature in the wrong place.

Your example: a camera driver and a video driver can share 20MB, then
they want 20MB exclusively.

You can reserve 20MB and make them share it. Then you can reserve 20MB
for both exclusively.

You know how the whole system works. Adjust drivers (probably, with
module parameters).


> > Why can't we have something simpler, like using memblock to reserve
> > contiguous memory at boot and using kinda mempool to share such memory
> > between devices?
> 
> There are a few problems with such simple approach:
> 
> 1. It does not provide all required functionality for our multimedia
> devices. The main problem is the fact that our multimedia devices
> require particular kind of buffers to be allocated in particular memory
> bank. Then add 2 more requirements: a proper alignment (for some of them
> it is even 128Kb) and particular range of addresses requirement (some
> buffers must be allocated at higher addresses than the firmware).
> This is very hard to achieve with such simple allocator.

When a video driver needs 20MB to work properly, what's the point of
releasing the 20MB for others then trying to get it again later?

Even with the above example (two devices never use the memory at the
same time), the driver needs memory regularly. What's the point of
split the 20MB to small chunks and allocate them to others?
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ