From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.5 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 27062C64E7C for ; Wed, 2 Dec 2020 13:54:34 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 5240321D7A for ; Wed, 2 Dec 2020 13:54:33 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5240321D7A Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 801FF6B0036; Wed, 2 Dec 2020 08:54:32 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 78B008D0002; Wed, 2 Dec 2020 08:54:32 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 6525D8D0001; Wed, 2 Dec 2020 08:54:32 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0063.hostedemail.com [216.40.44.63]) by kanga.kvack.org (Postfix) with ESMTP id 477BC6B0036 for ; Wed, 2 Dec 2020 08:54:32 -0500 (EST) Received: from smtpin19.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 0F389180AD802 for ; Wed, 2 Dec 2020 13:54:32 +0000 (UTC) X-FDA: 77548487184.19.magic38_4816230273b3 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin19.hostedemail.com (Postfix) with ESMTP id E00D31ACEAD for ; Wed, 2 Dec 2020 13:54:31 +0000 (UTC) X-HE-Tag: magic38_4816230273b3 X-Filterd-Recvd-Size: 3361 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf04.hostedemail.com (Postfix) with ESMTP for ; Wed, 2 Dec 2020 13:54:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=BPF0p8LwieotIqQ8Se3apv9Pv1/DdLdEpA/PB50rgWE=; b=eZh2zF8eJPaRth8HUFz0TGpx8F 52xnoX1GPcWv2V550kvu6crFKf4puciDYEltqg33ZKqsG0KioGTAf/tgro8L9LKpHWrsHsTFpJtd5 AaMLzwy2gn6WGJcAXK2wNHxarxbzENK9QRPqW2SG4vsvOL8hYKKMwGDWMPKpbykmLL5Q1ssaj7rtU NYQuWjGiZRfPZ9CvefK+9e6X4QbK+ohuXNGJZMVNHCh1i4GGbM/7oBn8L15EXB7tTatqMPNOa4mDm XcenqB8C5CSejKZ7tChuYSM+tWCqonRBkLZ9Wj2JjX5rV4UZwmzGekVtjzxFvZ77U/JJG03t5wd3p KERx78jg==; Received: from hch by casper.infradead.org with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1kkSaM-0001t5-RK; Wed, 02 Dec 2020 13:54:23 +0000 Date: Wed, 2 Dec 2020 13:54:22 +0000 From: Christoph Hellwig To: Minchan Kim Cc: Andrew Morton , LKML , linux-mm , 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 Message-ID: <20201202135422.GB5902@infradead.org> References: <20201201175144.3996569-1-minchan@kernel.org> <20201201175144.3996569-5-minchan@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201201175144.3996569-5-minchan@kernel.org> X-SRS-Rewrite: SMTP reverse-path rewritten from by casper.infradead.org. See http://www.infradead.org/rpr.html X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Tue, Dec 01, 2020 at 09:51:44AM -0800, Minchan Kim wrote: > From: Hyesoo Yu > > 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.