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]
Message-Id: <20100722143652V.fujita.tomonori@lab.ntt.co.jp>
Date:	Thu, 22 Jul 2010 14:37:49 +0900
From:	FUJITA Tomonori <fujita.tomonori@....ntt.co.jp>
To:	corbet@....net
Cc:	m.nazarewicz@...sung.com, linux-mm@...ck.org,
	m.szyprowski@...sung.com, 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 Tue, 20 Jul 2010 18:12:39 -0600
Jonathan Corbet <corbet@....net> wrote:

> One other thing occurred to me as I was thinking about this...
> 
> > +    There are four calls provided by the CMA framework to devices.  To
> > +    allocate a chunk of memory cma_alloc() function needs to be used:
> > +
> > +            unsigned long cma_alloc(const struct device *dev,
> > +                                    const char *kind,
> > +                                    unsigned long size,
> > +                                    unsigned long alignment);
> 
> The purpose behind this interface, I believe, is pretty much always
> going to be to allocate memory for DMA buffers.  Given that, might it
> make more sense to integrate the API with the current DMA mapping
> API?

IMO, having separate APIs for allocating memory and doing DMA mapping
is much better. The DMA API covers the latter well. We could extend
the current API to allocate memory or create new one similar to the
current. 

I don't see any benefit of a new abstraction that does both magically.


About the framework, it looks too complicated than we actually need
(the command line stuff looks insane).

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?
--
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