Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp1353343ybg; Fri, 18 Oct 2019 16:33:28 -0700 (PDT) X-Google-Smtp-Source: APXvYqzFfUeYaEVB8N6JbLgBmIqcEr4QCy/fGs9alrBZOWcSNdDxSY1SzkEW56t5JC+nfdKqyfFr X-Received: by 2002:a50:ef17:: with SMTP id m23mr12320872eds.200.1571441608776; Fri, 18 Oct 2019 16:33:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571441608; cv=none; d=google.com; s=arc-20160816; b=Ij+X5gzb8OVMGst6fSvMz1J1umrGt6adAljbIKdtdB7AXkeQORLWrhFH8BsrNRJtga uAfcoQZ4liOsx0T9IIofq2jKJEIqgV1eFY9iJq0p5O39ihJTWB52xdDkjz4o7o7C4hXL TX2faje2y8QQNRD6ZzN0TazzkaJx0lVq54mYQdijQaVIL6RhFmv1LtBARnWYF/Cgme3l lIdY9AQeOAaCcQpIvb3Q4+go0LCmLhpKfWPm1hA1rYHGSdWlsOJzfgbyg6JF+ZwFdU2u Izbn/D3q7go5rLbo1oIvQwSkWzvX0Kl+lHk7wC/f4cx7KPUdC1T/MSdOIyNceLLw6/Js AOTg== 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=UkjADtH3OoY5PrcZf8XHmujRh7ZLWGmK8dpbgj0S1eU=; b=nV0uqDtwBfjgyeA3YzsyJrhA+b/1A9k4fX0pfild/mq5w1keYzndnFpxamJBu/m0cG +lz3OuiZDFqj12tCBzf1woSnDWRkTQv1vI9HQ/d5t8wpPMIw/AAi8uZVLXYnWM0GpKrX RzFa+g4uA1Twbq/T2TCtllxyn/AHbXFmqrxVI2fq+N450EvMZ/QxcLSzBE6wyrqDsyeW DEq+0pdxjElXl9G57GnruIE/JSoxmVGmRsppW7G8GuUiJetabkEIaVGDIss7N7kQ486X UArHpv2covwn2UHiA+kk8E0KiKPKaMH7J+NUiUYUGT3tKTBWrdS6KJfH4ttaNeQy9onm 8WdQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=TQ3ny8Ae; 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 p43si5082337edc.368.2019.10.18.16.33.06; Fri, 18 Oct 2019 16:33:28 -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=TQ3ny8Ae; 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 S2504366AbfJRGWF (ORCPT + 99 others); Fri, 18 Oct 2019 02:22:05 -0400 Received: from mail-ot1-f66.google.com ([209.85.210.66]:43835 "EHLO mail-ot1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2392981AbfJRGWE (ORCPT ); Fri, 18 Oct 2019 02:22:04 -0400 Received: by mail-ot1-f66.google.com with SMTP id o44so4023247ota.10 for ; Thu, 17 Oct 2019 23:22: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; bh=UkjADtH3OoY5PrcZf8XHmujRh7ZLWGmK8dpbgj0S1eU=; b=TQ3ny8Ae1igp5m/vKmUDvMb4mX4I6kYGW4WLCXlpHo5hjFym6sUlALfnk9H0K0xuZw vxntYIkvzjqSKTwAXiTzTZnIEyP4s30APVsVmNv2qbF+6NVR4v+/w3djWQdk1IjXooOj byLtBC067wmsJzz2JSOUEIYd73PRAERcbELduLBIHJXs0RVC1OJSejk8tIMkmtMeeY3J flFsZmb0hzwMKhSqc1Y2S1qkpyohRMMFbrKyeBMeyfdeegC5eLwi+qffuYiEuZaWE/iY nxYCxGqa/zScFUKxexHNhjf0pr4Whqqwj1CL70BNoBVs7T+B0FyIigYwib10DOPIWdpu 6p4w== 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=UkjADtH3OoY5PrcZf8XHmujRh7ZLWGmK8dpbgj0S1eU=; b=kpIWgqM1V9IrwvytIQWzSmEvLrV/EZKvOpX7Xn9nz3F9mtNtPMZ+3dMmDf6ao6zui0 x9DgZktXa4CcrbA0iWynZJVxovXk0OPv3unYPH4dvG1dPE31W3OqPvlCjPuBdyDu7j5j vHxloclYLkY+1VLHYflUMYtsqRzWJyakTH7Grn8WCxXtqLUoKGDr1vrU1JJEHhPyVhjs OVSk1UB+NSLhTN9b5rwhPVFeuAg3cPzlhTLJb97n6gLk/U1M6QjW+R2J8lc6lEuHcLgl 2p0+Q2HOCAgfbDBB9NlZb7IookaVMWrxNrIz0VG4MRqwD2i+uk3903/dkWm+7YwuX28h wezw== X-Gm-Message-State: APjAAAU/I4+2MtLDfz63DeRt9qQaNFdZujpt5IqpuPv+dOolhF7EU0EC Jv7gD7P/TtL5e0JwpBdeicsQS6yoWUy8ZIZY3jFT3Q== X-Received: by 2002:a9d:3e17:: with SMTP id a23mr6485132otd.105.1571379723521; Thu, 17 Oct 2019 23:22:03 -0700 (PDT) MIME-Version: 1.0 References: <20191018052323.21659-1-john.stultz@linaro.org> In-Reply-To: <20191018052323.21659-1-john.stultz@linaro.org> From: Sumit Semwal Date: Fri, 18 Oct 2019 11:51:51 +0530 Message-ID: Subject: Re: [PATCH v12 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 , Hillf Danton , DRI mailing list 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 Hi John, Andrews, On Fri, 18 Oct 2019 at 10:53, John Stultz wrote: > > Andrew brought up a reasonable concern with the CMA heap > enumeration in the previous patch set, and I had a few other > minor cleanups to add, so 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. Thanks much for all your hardwork in getting these patches ready. It looks like a sane approach to me to first just add the default cma heap and work out the selection of other heaps later on. I will wait out this weekend for any objections from others, and if I hear none, will merge this series on Monday. Hope that sounds reasonable? > > 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=dev/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. > > New in v12: > * To address Andrew's concern about adding all CMA areas, the > CMA heap only adds the default CMA region for now. > * Minor cleanups and prep for loading heaps from modules > * I have patches to add other specified CMA regions, as well as > loading heaps from modules in my WIP tree, which I will submit > once this set is queued, here: > https://git.linaro.org/people/john.stultz/android-dev.git/log/?h=dev/dma-buf-heap-WIP > > thanks > -john Best, Sumit.