Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp18444pxa; Tue, 18 Aug 2020 14:21:06 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwjmpx7K670DVcLhwpfD5TezRF0ivI7iKf3Fm508ukMszOOSTt7w981OEGXSTjAvnHSL+Yw X-Received: by 2002:a17:906:27db:: with SMTP id k27mr21953221ejc.433.1597785666332; Tue, 18 Aug 2020 14:21:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597785666; cv=none; d=google.com; s=arc-20160816; b=SNhVjxAQC66Ohno5aTUILvMQLB0PrbX5B6lgUdLHnx0krfVB32dFBQzIdrd9bDPnxg Zz5XIwYUQEqQ84xHmVfaQQC6DE1MfEEQ2EQf28sHtHZxZBt6ESXhurVJbENg1KJGolYZ z1JwEv6NeRsspSCn3i+kyRfAxi6TZ7k7JobE/CpqGxZ3EIDwUUocOyuN5Vv84ODi0RWw ze+ZNMwgtgafQOwzxE1DFJWSFVgUehO87ALj/lbmOv7WcoV2IZ51Ush32MPOWL/2/i5o GzSQQPDaOi4rLCE6LVjYG3E1KG/W6+B8/1+miuaDGYyeRH7bTeQLZyWPizrIAeRZ2ZOE lYkg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=WVlaqaJEkLaogLxHkb59x+3913QcwhMo1tlZOm9AT0s=; b=c6xhayo8Y/hOTH4gkCtDB1CvfnUtvKJ4ikm91bfJOw+lXgJ+rzqn9t98au+N76xylt HOpJLI6yAHFffruqjavGYBu2PdU/hnUFLYOnwlZpk/ceSz7LWxgTf2Q/fUpA0UttWZ35 cXPsqcEv7JjN8QhY+waBZcJyqGH8nmwvm97cgkO/8bwsDTbBMPj5AIwDmuPy6LoFXpq2 ES/IbyaIPh3sgflhRHFLr2U8xwl7W3I4jNgBQaw/NcJcSyhVqpWWzgDWdFHYNEigB7zI pxuWiHXRuYdGYbo7Od2w9HwYNbDAOOhgJnfpfhZaoXcU/Cwk5aXWf3gd2oMR9XT9V3V1 9PIQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=F7t4t8R2; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v16si13872636ejq.43.2020.08.18.14.20.42; Tue, 18 Aug 2020 14:21:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=F7t4t8R2; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726858AbgHRU4N (ORCPT + 99 others); Tue, 18 Aug 2020 16:56:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56464 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726829AbgHRU4L (ORCPT ); Tue, 18 Aug 2020 16:56:11 -0400 Received: from mail-oi1-x243.google.com (mail-oi1-x243.google.com [IPv6:2607:f8b0:4864:20::243]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DDDC4C061343 for ; Tue, 18 Aug 2020 13:56:10 -0700 (PDT) Received: by mail-oi1-x243.google.com with SMTP id u24so18020386oic.7 for ; Tue, 18 Aug 2020 13:56:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=WVlaqaJEkLaogLxHkb59x+3913QcwhMo1tlZOm9AT0s=; b=F7t4t8R2e65gCr9vdIxnNuliGDt2ahdeDAfavI7tANLzu2aQ0/Dm9nm68MjGmfDIEn +INKamv7mBD5XwNAn5unHK7F4wcGpKBzLWiimwLuJuMjurd9FzQdSLd4A3XwNq4oZgON 0mJ1mp3STPu72DoEU6s2oGDaAPZc1d9iqm6UukG6YQUqg1rxoULI89OmVCHGV1I5M6PW LehxdYwb6AkyftI67q/r18iiMmsk+U2qcn2C0MXIx9alBu+BWFFFFCArG9HhsRjc+0Ow eHMsfDTsciu66LcErJpINTzl2QMt9ciDVh42trJ4L0rc+/x0fLt7IxkYDBuYtyO6wsbj 4YsQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=WVlaqaJEkLaogLxHkb59x+3913QcwhMo1tlZOm9AT0s=; b=uSf5nT4mYyZCTBdwioPP8uk1m/pJ23GelfTSA8KwiIFW2bjHASpTr+hjJtMXgNQjnA wAdmGOPUnYmEnbzgQDa+8fTtU90N2XkHilifpdAvm+6fODJPbWyMPdbhWJmP+9V/NzDI FjilpIad3LgKuPmx+jDTBIufXPCaUeHhG2bYnrv7pzYImXKCgB2mGkxyf1SemavKJj0X UgpytkB1W6wKPEVhCu5Efu2eygYJn44aw3i+KzXWrbi0dQqj16q7KaVasb9MO/t36Iyp eplm/vAHo922YDEaiF2ZGkS0RL2E7Oq8s43cY/Aiv9BCDf1jiKQekeSLOPXJm1ur3RqJ 6R4g== X-Gm-Message-State: AOAM531xTofVQkmGufvrYbSGTKZzQE/5eeWZ4+ZvEGo4/FchEi37kvd8 QPno1ziMdptrEr1jrb8naJleEvA52UXj0xQpfWfm1Q== X-Received: by 2002:aca:1117:: with SMTP id 23mr1367198oir.97.1597784170084; Tue, 18 Aug 2020 13:56:10 -0700 (PDT) MIME-Version: 1.0 References: <20200818080415.7531-1-hyesoo.yu@samsung.com> In-Reply-To: <20200818080415.7531-1-hyesoo.yu@samsung.com> From: John Stultz Date: Tue, 18 Aug 2020 13:55:59 -0700 Message-ID: Subject: Re: [PATCH 0/3] Chunk Heap Support on DMA-HEAP To: Hyesoo Yu Cc: Sumit Semwal , Minchan Kim , Andrew Morton , iamjoonsoo.kim@lge.com, joaodias@google.com, linux-mm , KyongHo Cho , Suren Baghdasaryan , vbabka@suse.cz, "Andrew F. Davis" , "(Exiting) Benjamin Gaignard" , Liam Mark , Laura Abbott , Brian Starkey , Christian Koenig , linux-media , dri-devel , "moderated list:DMA BUFFER SHARING FRAMEWORK" , lkml , Rob Herring , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Aug 18, 2020 at 12:45 AM Hyesoo Yu wrote: > > These patch series to introduce a new dma heap, chunk heap. > That heap is needed for special HW that requires bulk allocation of > fixed high order pages. For example, 64MB dma-buf pages are made up > to fixed order-4 pages * 1024. > > The chunk heap uses alloc_pages_bulk to allocate high order page. > https://lore.kernel.org/linux-mm/20200814173131.2803002-1-minchan@kernel.org > > The chunk heap is registered by device tree with alignment and memory node > of contiguous memory allocator(CMA). Alignment defines chunk page size. > For example, alignment 0x1_0000 means chunk page size is 64KB. > The phandle to memory node indicates contiguous memory allocator(CMA). > If device node doesn't have cma, the registration of chunk heap fails. > > The patchset includes the following: > - export dma-heap API to register kernel module dma heap. > - add chunk heap implementation. > - document of device tree to register chunk heap > > Hyesoo Yu (3): > dma-buf: add missing EXPORT_SYMBOL_GPL() for dma heaps > dma-buf: heaps: add chunk heap to dmabuf heaps > dma-heap: Devicetree binding for chunk heap Hey! Thanks so much for sending this out! I'm really excited to see these heaps be submitted and reviewed on the list! The first general concern I have with your series is that it adds a dt binding for the chunk heap, which we've gotten a fair amount of pushback on. A possible alternative might be something like what Kunihiko Hayashi proposed for non-default CMA heaps: https://lore.kernel.org/lkml/1594948208-4739-1-git-send-email-hayashi.kunihiko@socionext.com/ This approach would insteal allow a driver to register a CMA area with the chunk heap implementation. However, (and this was the catch Kunihiko Hayashi's patch) this requires that the driver also be upstream, as we need an in-tree user of such code. Also, it might be good to provide some further rationale on why this heap is beneficial over the existing CMA heap? In general focusing the commit messages more on the why we might want the patch, rather than what the patch does, is helpful. "Special hardware" that doesn't have upstream drivers isn't very compelling for most maintainers. That said, I'm very excited to see these sorts of submissions, as I know lots of vendors have historically had very custom out of tree ION heaps, and I think it would be a great benefit to the community to better understand the experience vendors have in optimizing performance on their devices, so we can create good common solutions upstream. So I look forward to your insights on future revisions of this patch series! thanks -john