Received: by 2002:a25:b323:0:0:0:0:0 with SMTP id l35csp123061ybj; Thu, 19 Sep 2019 11:40:03 -0700 (PDT) X-Google-Smtp-Source: APXvYqyUwwrnIGgtLq2G81yIk+AuYH11r/dBomZn7fPMXBFjTKXS+3luMr++pnp9tWABLPeTnilm X-Received: by 2002:a17:906:ecf9:: with SMTP id qt25mr15343055ejb.249.1568918403719; Thu, 19 Sep 2019 11:40:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568918403; cv=none; d=google.com; s=arc-20160816; b=bIehe2GgFM5NRRH/3i3ltd0UbVTZrBuhNaKtgePyiVLLhoBW19RJ7qF0hWZC9yh0j0 qav4VA2fUfzmbZRSZMw7eMBuwwf7tbcpe4Kf/c0mvWTrMguA+vgpxpqPid/Zt61siZpp LoodcZA6jl/xZ++4Ovy2Axa9m0UP3vjezwsxzliOkz+QA8R18WV7G1tyQO3Vn20OIiK1 FmyaR34VkM2l66Le0yaBOElKlt6C3TNdWCKtKMEFEd33dZ0GMaUkJHqp8DT8MP+Db5M8 rhuJQNFKiMfAozQwt3zTdLCOQiLz71b12OQaAXU6HSdOPBEsFptNyd+wKvSkJofbNi2W kLzA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=s+MeooT8MC1ceHz/F61nLHOvnsbLpM4gTCQiQySmE2s=; b=maO43FDUmoBcJ/9aYw3TNkXdU0J6EfWmAjOInyeI5E25MlwHb5s5BJvwXZzwIM5Y1K In0H7/shWRg37lJnOR68tWwT5vqjnN+y94ms/a/C7ztKbqgpwXKT1BvJ/0//q03ke2BV oMjbFUJIM/IG+gFTFlx/o8Bda3wgpTnoESeFSDljcWhYLS9HNiFvm4rAkkXHvNHBBZMd 5PtAXcBGxoljIEHhsd34vTchm2FV5BdnqikOmpS1Jqkx5URRsDmB7zLxXchA/h7murpA DTjLvNlBxKlUk5V/ECclw0E6mxDLOr5XvS+IBGS7zT7guDsJL+kanPsjK4s/WJ16YaDe N0cA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=gLzZY8uF; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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. [209.132.180.67]) by mx.google.com with ESMTP id s18si5064823ejb.49.2019.09.19.11.39.09; Thu, 19 Sep 2019 11:40:03 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=gLzZY8uF; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 S2389337AbfISQwH (ORCPT + 99 others); Thu, 19 Sep 2019 12:52:07 -0400 Received: from mail-ot1-f68.google.com ([209.85.210.68]:40710 "EHLO mail-ot1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726007AbfISQwH (ORCPT ); Thu, 19 Sep 2019 12:52:07 -0400 Received: by mail-ot1-f68.google.com with SMTP id y39so3701983ota.7 for ; Thu, 19 Sep 2019 09:52:04 -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:content-transfer-encoding; bh=s+MeooT8MC1ceHz/F61nLHOvnsbLpM4gTCQiQySmE2s=; b=gLzZY8uF/boSl4oCwqXWngNHkJYjnx2DZj3yk0PMVbpEQv2Szs/+z23ktTW1L94B0r y7P9Y90beRh+HnCCKbL3kEKL8La7/Swkv9sT64oKmZSqgnrZVQayv3FZixuHhYdrGnHK iMLP3X4SlWR/tX8CI26TZLErcz2rR3uYmvb6anWxBKe7kSLfgAw3T6yRMTlHSfdpyXXg nHwwb8Aiuhm+1lDpoQGGKeIIqr6hRMgOGNo/l6w21Qp5o6HlKxmi8WOAjmKsE26kdTfW 0lZ/RyuoYim+VJQLm82IZdJ3edFiMfKXrkKrze+BlQsswKLZmqGtA0RsUoCTHY5WGDks OhKw== 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:content-transfer-encoding; bh=s+MeooT8MC1ceHz/F61nLHOvnsbLpM4gTCQiQySmE2s=; b=jfSSTCkohKVmPuIFhYEoMWpDO5YmwIMt+06klH3orh313M89y3wd6OY7koFKJ1kCWK c2A5P+PCX9OXkgHjCG9rHgJkkZ7Rj9g0tlu865TY5BDmX3JeLkfKNI4R/Vn3M4V/izY5 G8nJM24yBU8szSDWGAJpc+2kD7qZIGxXW8ccge/k3xuIpw1S2UZ2ey4wdieTq/2WJlQk /EbvbA3dsPRR1CWcoWK9rSQUsRRl5ByDaAm0JZsURL3Q3yK0d30aoB5sR/4J//blGDCN 7tDV1O/dYxV1jehXA9wum6OQkPwgDV/WNNrM0gvlGl5xkSkeNpP2B+DCBk/QTrbBQ8ZU gWfg== X-Gm-Message-State: APjAAAXN4HnrAwkfURP9u1+t+iaYx/p5nfOVo0b3M/2OhZgxosU2lWA2 vVmz1sMbZhj/F0YkfKloJGjMxugTnwLWV3hdKMVWzQ== X-Received: by 2002:a05:6830:1e72:: with SMTP id m18mr1337213otr.371.1568911924352; Thu, 19 Sep 2019 09:52:04 -0700 (PDT) MIME-Version: 1.0 References: <20190906184712.91980-1-john.stultz@linaro.org> In-Reply-To: <20190906184712.91980-1-john.stultz@linaro.org> From: Sumit Semwal Date: Thu, 19 Sep 2019 22:21:52 +0530 Message-ID: Subject: Re: [RESEND][PATCH v8 0/5] DMA-BUF Heaps (destaging ION) To: John Stultz Cc: lkml , Laura Abbott , Benjamin Gaignard , Liam Mark , Pratik Patel , Brian Starkey , Vincent Donnefort , Sudipto Paul , "Andrew F . Davis" , Christoph Hellwig , Chenbo Feng , Alistair Strachan , Hridya Valsaraju , DRI mailing list Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello Christoph, everyone, On Sat, 7 Sep 2019 at 00:17, John Stultz wrote: > > Here is yet another pass at the dma-buf heaps patchset Andrew > and I have been working on which tries to destage a fair chunk > of ION functionality. > > The patchset implements per-heap devices which can be opened > directly and then an ioctl is used to allocate a dmabuf from the > heap. > > The interface is similar, but much simpler then IONs, only > providing an ALLOC ioctl. > > Also, I've provided relatively simple system and cma heaps. > > I've booted and tested these patches with AOSP on the HiKey960 > using the kernel tree here: > https://git.linaro.org/people/john.stultz/android-dev.git/log/?h=3Ddev/= dma-buf-heap > > And the userspace changes here: > https://android-review.googlesource.com/c/device/linaro/hikey/+/909436 > > Compared to ION, this patchset is missing the system-contig, > carveout and chunk heaps, as I don't have a device that uses > those, so I'm unable to do much useful validation there. > Additionally we have no upstream users of chunk or carveout, > and the system-contig has been deprecated in the common/andoid-* > kernels, so this should be ok. > > I've also removed the stats accounting, since any such accounting > should be implemented by dma-buf core or the heaps themselves. > > Most of the changes in this revision are adddressing the more > concrete feedback from Christoph (many thanks!). Though I'm not > sure if some of the less specific feedback was completely resolved > in discussion last time around. Please let me know! It looks like most of the feedback has been taken care of. If there's no more objection to this series, I'd like to merge it in soon. If there are any more review comments, may I request you to please provide = them? > > New in v8: > * Make struct dma_heap_ops consts (Suggested by Christoph) > * Add flush_kernel_vmap_range/invalidate_kernel_vmap_range calls > (suggested by Christoph) > * Condense dma_heap_buffer and heap_helper_buffer (suggested by > Christoph) > * Get rid of needless struct system_heap (suggested by Christoph) > * Fix indentation by using shorter argument names (suggested by > Christoph) > * Remove unused private_flags value > * Add forgotten include file to fix build issue on x86 > * Checkpatch whitespace fixups > > Thoughts and feedback would be greatly appreciated! > > thanks > -john Best, Sumit. > > Cc: Laura Abbott > Cc: Benjamin Gaignard > Cc: Sumit Semwal > Cc: Liam Mark > Cc: Pratik Patel > Cc: Brian Starkey > Cc: Vincent Donnefort > Cc: Sudipto Paul > Cc: Andrew F. Davis > Cc: Christoph Hellwig > Cc: Chenbo Feng > Cc: Alistair Strachan > Cc: Hridya Valsaraju > Cc: dri-devel@lists.freedesktop.org > > > Andrew F. Davis (1): > dma-buf: Add dma-buf heaps framework > > John Stultz (4): > dma-buf: heaps: Add heap helpers > dma-buf: heaps: Add system heap to dmabuf heaps > dma-buf: heaps: Add CMA heap to dmabuf heaps > kselftests: Add dma-heap test > > MAINTAINERS | 18 ++ > drivers/dma-buf/Kconfig | 11 + > drivers/dma-buf/Makefile | 2 + > drivers/dma-buf/dma-heap.c | 250 ++++++++++++++++ > drivers/dma-buf/heaps/Kconfig | 14 + > drivers/dma-buf/heaps/Makefile | 4 + > drivers/dma-buf/heaps/cma_heap.c | 164 +++++++++++ > drivers/dma-buf/heaps/heap-helpers.c | 269 ++++++++++++++++++ > drivers/dma-buf/heaps/heap-helpers.h | 55 ++++ > drivers/dma-buf/heaps/system_heap.c | 122 ++++++++ > include/linux/dma-heap.h | 59 ++++ > include/uapi/linux/dma-heap.h | 55 ++++ > tools/testing/selftests/dmabuf-heaps/Makefile | 9 + > .../selftests/dmabuf-heaps/dmabuf-heap.c | 230 +++++++++++++++ > 14 files changed, 1262 insertions(+) > create mode 100644 drivers/dma-buf/dma-heap.c > create mode 100644 drivers/dma-buf/heaps/Kconfig > create mode 100644 drivers/dma-buf/heaps/Makefile > create mode 100644 drivers/dma-buf/heaps/cma_heap.c > create mode 100644 drivers/dma-buf/heaps/heap-helpers.c > create mode 100644 drivers/dma-buf/heaps/heap-helpers.h > create mode 100644 drivers/dma-buf/heaps/system_heap.c > create mode 100644 include/linux/dma-heap.h > create mode 100644 include/uapi/linux/dma-heap.h > create mode 100644 tools/testing/selftests/dmabuf-heaps/Makefile > create mode 100644 tools/testing/selftests/dmabuf-heaps/dmabuf-heap.c > > -- > 2.17.1 > --=20 Thanks and regards, Sumit Semwal Linaro Consumer Group - Kernel Team Lead Linaro.org =E2=94=82 Open source software for ARM SoCs