devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: Minchan Kim <minchan@kernel.org>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	LKML <linux-kernel@vger.kernel.org>,
	linux-mm <linux-mm@kvack.org>,
	hyesoo.yu@samsung.com, willy@infradead.org, david@redhat.com,
	iamjoonsoo.kim@lge.com, vbabka@suse.cz, surenb@google.com,
	pullip.cho@samsung.com, joaodias@google.com, hridya@google.com,
	sumit.semwal@linaro.org, john.stultz@linaro.org,
	Brian.Starkey@arm.com, linux-media@vger.kernel.org,
	devicetree@vger.kernel.org, robh@kernel.org,
	christian.koenig@amd.com, linaro-mm-sig@lists.linaro.org
Subject: Re: [PATCH v2 4/4] dma-buf: heaps: add chunk heap to dmabuf heaps
Date: Wed, 2 Dec 2020 13:54:22 +0000	[thread overview]
Message-ID: <20201202135422.GB5902@infradead.org> (raw)
In-Reply-To: <20201201175144.3996569-5-minchan@kernel.org>

On Tue, Dec 01, 2020 at 09:51:44AM -0800, Minchan Kim wrote:
> From: Hyesoo Yu <hyesoo.yu@samsung.com>
> 
> This patch supports chunk heap that allocates the buffers that
> arranged into a list a fixed size chunks taken from CMA.
> 
> The chunk heap doesn't use heap-helper although it can remove
> duplicated code since heap-helper is under deprecated process.[1]
> 
> NOTE: This patch only adds the default CMA heap to allocate chunk
> pages. We will add another CMA memory regions to the dmabuf heaps
> interface with a later patch (which requires a dt binding)

This new heap seems to largely duplicate the exsting cma_heap.c
file.  Why can't you reuse the code and allow creating different
heaps with different chunk sizes or max numbers of segments?

> +config DMABUF_HEAPS_CHUNK_ORDER
> +	int "Chunk page order for dmabuf chunk heap"
> +	default 4
> +	depends on DMABUF_HEAPS_CHUNK
> +	help
> +	  Set page order of fixed chunk size to allocate from CMA.

Using a config option for this is just broken.  It needs to be runtime
or at very least boot time / DT controllable.

> + * ION Memory Allocator chunk heap exporter

This comment seems wrong.

      parent reply	other threads:[~2020-12-02 13:55 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-01 17:51 [PATCH v2 0/4] Chunk Heap Support on DMA-HEAP Minchan Kim
2020-12-01 17:51 ` [PATCH v2 1/4] mm: introduce alloc_contig_mode Minchan Kim
2020-12-01 17:51 ` [PATCH v2 2/4] mm: introduce cma_alloc_bulk API Minchan Kim
2020-12-02  9:14   ` David Hildenbrand
2020-12-02 15:49     ` Michal Hocko
2020-12-02 16:00       ` David Hildenbrand
2020-12-02 16:15       ` Minchan Kim
2020-12-02 16:48         ` Michal Hocko
2020-12-02 17:54           ` Minchan Kim
2020-12-02 18:51             ` Michal Hocko
2020-12-02 19:26               ` Minchan Kim
2020-12-02 20:22                 ` David Hildenbrand
2020-12-02 20:48                   ` Minchan Kim
2020-12-03  8:28                   ` Michal Hocko
2020-12-03  9:47                     ` David Hildenbrand
2020-12-03 11:47                       ` Michal Hocko
2020-12-03 11:57                         ` David Hildenbrand
2020-12-02 16:00     ` Minchan Kim
2020-12-01 17:51 ` [PATCH v2 3/4] dma-buf: add export symbol for dma-heap Minchan Kim
2020-12-02 13:51   ` Christoph Hellwig
2020-12-01 17:51 ` [PATCH v2 4/4] dma-buf: heaps: add chunk heap to dmabuf heaps Minchan Kim
2020-12-01 19:48   ` John Stultz
2020-12-01 22:55     ` Minchan Kim
2020-12-01 23:38       ` John Stultz
2020-12-02  0:13         ` Minchan Kim
2020-12-02  0:33           ` John Stultz
2020-12-02  0:57             ` Minchan Kim
2020-12-02 13:54   ` Christoph Hellwig [this message]

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=20201202135422.GB5902@infradead.org \
    --to=hch@infradead.org \
    --cc=Brian.Starkey@arm.com \
    --cc=akpm@linux-foundation.org \
    --cc=christian.koenig@amd.com \
    --cc=david@redhat.com \
    --cc=devicetree@vger.kernel.org \
    --cc=hridya@google.com \
    --cc=hyesoo.yu@samsung.com \
    --cc=iamjoonsoo.kim@lge.com \
    --cc=joaodias@google.com \
    --cc=john.stultz@linaro.org \
    --cc=linaro-mm-sig@lists.linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=minchan@kernel.org \
    --cc=pullip.cho@samsung.com \
    --cc=robh@kernel.org \
    --cc=sumit.semwal@linaro.org \
    --cc=surenb@google.com \
    --cc=vbabka@suse.cz \
    --cc=willy@infradead.org \
    /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).