Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp1766824ybg; Sat, 19 Oct 2019 02:04:59 -0700 (PDT) X-Google-Smtp-Source: APXvYqylMmP4lF8PnyJRsuUT1lK7fDJFxdri/j3e8AToqWZLc283e5Qwuo8DmZTA8Ui4kQ+sqOTj X-Received: by 2002:a17:906:8308:: with SMTP id j8mr12722767ejx.29.1571475899667; Sat, 19 Oct 2019 02:04:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571475899; cv=none; d=google.com; s=arc-20160816; b=sdCikKKtEgHuw5duVJBk68dBw3w1uwcPPXOvd/Z/3sDRiHcnFYnnXEXcNhjJ5PzKWy thEvxTea9uA+iJEvG/1johaZ42AmF6HHZZX/dnkRMH5YyPGRt5eWfwPodRjEq6DLcvIK fpsaPG4YDhEQssf5ZB6Sk3PcPCab4pwIzxzJUihs0ALZ4Q4aP+3LZ15elHg0B0EN/Rpp ryYj3xYC2GYjBWYgAXl+OwK7wAC238c2i/BTSql7pTFWMARJXRAMcITAKbfe1+ooa7Ng DTUiLrPSaNW6Sl75V3d9mrC3fqWzty2T7nhepA6AZSX0zyd3FPyLs3Zxr40J3Bm6vx76 q8Mw== 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=YTy5f2+zY9spxEP1tzucC058EkWg/q4aswm6QPb2oF8=; b=jEwMEJ5tzcJScPFY9k1jyc9w/Gv8rpLiFDtWoYCSDzBMzUmxcuLMTY+Bi9At4n9JuA are8cJwCFtmVUoopDI4/66hmTJPOcvfs8l2rMxiTqYG1HKOVNHLQpGIJpIT+6TB5y36t B5u2NyUrlVxpRg6QFjztTGgeLAY8pB7SxTqSZrzDpGTL4gbJz40lE6pLqWK+c0kmBExs b+Ou5lJM7o1FB5TPO5BL8A3qmdcnGQliMVsuGBG3EwvvkuU50SdmAYQQ1vLx9MYh3Upj c7giQWonhIn6s2NyqPUKaoGe5DaV46rPoSkdO54f7zjgBVu6IngOoRC/Ka6Mbn9Z+FZ4 /UhQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=WVDJqeiQ; 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 g19si4880004ejw.373.2019.10.19.02.04.34; Sat, 19 Oct 2019 02:04:59 -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=WVDJqeiQ; 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 S2394306AbfJRSd2 (ORCPT + 99 others); Fri, 18 Oct 2019 14:33:28 -0400 Received: from mail-wr1-f68.google.com ([209.85.221.68]:33624 "EHLO mail-wr1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2394205AbfJRSd2 (ORCPT ); Fri, 18 Oct 2019 14:33:28 -0400 Received: by mail-wr1-f68.google.com with SMTP id b9so7288468wrs.0 for ; Fri, 18 Oct 2019 11:33:25 -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=YTy5f2+zY9spxEP1tzucC058EkWg/q4aswm6QPb2oF8=; b=WVDJqeiQYZtH8hMM+aXz0b4B3qmg0/C8GHS3Y81PPaEmhwXFfwl8SfTtRMuZjNubb3 m6cCeKKkHeqwn71IIO50qf6q1obwl93SEh+GpPs2FwyRrwjFwcG0SPatLwlF4sG0kj1p p/P3HfZljB3iekyAnxJMgLM1qQn+o/fugsMezmvSABMaXwIvODfjs4CcbV1xZSPMxozD kf6sap/+C7IRy8scXVPNTohcP7Q5TzcpK7vB58dH+0UYVfnUgVHJzwRKty3rAWSGli30 xLz5Cy3sY/fOI9EzzW0AYr/VZHjGWGtvVC+3dBORbo5/s9U9RGnSFEXXk4kI8XdMnxlb UTXw== 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=YTy5f2+zY9spxEP1tzucC058EkWg/q4aswm6QPb2oF8=; b=d9IugJYYWGKmU0/MojKFWO/dTPuRfkb3LdxRxGP/7pROSSJFGrp9WmixEj9NbrCJgz rjRprqlkDhHrrvNZXbviU8N1wgKqa/h9sfRNI3kV1COgrj+jV5HHJKFFGmw3orxfGQkX rlh8hTh/E2+xlUQ9Vo1nPVbEzofILQTCoaCj/tPnTrQthCNixZVZuFEn+RgH4pMf2nU+ CVrm6Kbbs5tCB+anFpww+na5q2kUcS682eduuN4WwxKt7yJASU4uAlZyg1MbGV+l9LZt kE/1ocDU8xIfDpab5Z0qUqmEOBK+CQiHZonDy6alqItAhkPfzDyUHFC5hkdvr20I+Nvv uuVQ== X-Gm-Message-State: APjAAAXg5GTbnftFaxM0Hi6X1qDv+qdmBdVYLp0l6Z4adR7m4dH9V7Nj dfC0+RzPdSfUwdC172Rk2usC5rmqXau3kzEtr4b1ow== X-Received: by 2002:adf:fb0b:: with SMTP id c11mr9356659wrr.50.1571423604842; Fri, 18 Oct 2019 11:33:24 -0700 (PDT) MIME-Version: 1.0 References: <20190906184712.91980-1-john.stultz@linaro.org> <20190924162217.GA12974@arm.com> <20191009173742.GA2682@arm.com> <20191014090729.lwusl5zxa32a7uua@DESKTOP-E1NTVVP.localdomain> <20191018095516.inwes5avdeixl5nr@DESKTOP-E1NTVVP.localdomain> In-Reply-To: <20191018095516.inwes5avdeixl5nr@DESKTOP-E1NTVVP.localdomain> From: John Stultz Date: Fri, 18 Oct 2019 11:33:13 -0700 Message-ID: Subject: Re: [RESEND][PATCH v8 0/5] DMA-BUF Heaps (destaging ION) To: Brian Starkey Cc: "Andrew F. Davis" , nd , Sudipto Paul , Vincent Donnefort , Chenbo Feng , Alistair Strachan , Liam Mark , lkml , Christoph Hellwig , DRI mailing list , Hridya Valsaraju , Ayan Halder , Pratik Patel 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 Fri, Oct 18, 2019 at 2:55 AM Brian Starkey wrote: > On Thu, Oct 17, 2019 at 01:57:45PM -0700, John Stultz wrote: > > On Thu, Oct 17, 2019 at 12:29 PM Andrew F. Davis wrote: > > > On 10/17/19 3:14 PM, John Stultz wrote: > > > > But if the objection stands, do you have a proposal for an alternative > > > > way to enumerate a subset of CMA heaps? > > > > > > > When in staging ION had to reach into the CMA framework as the other > > > direction would not be allowed, so cma_for_each_area() was added. If > > > DMA-BUF heaps is not in staging then we can do the opposite, and have > > > the CMA framework register heaps itself using our framework. That way > > > the CMA system could decide what areas to export or not (maybe based on > > > a DT property or similar). > > > > Ok. Though the CMA core doesn't have much sense of DT details either, > > so it would probably have to be done in the reserved_mem logic, which > > doesn't feel right to me. > > > > I'd probably guess we should have some sort of dt binding to describe > > a dmabuf cma heap and from that node link to a CMA node via a > > memory-region phandle. Along with maybe the default heap as well? Not > > eager to get into another binding review cycle, and I'm not sure what > > non-DT systems will do yet, but I'll take a shot at it and iterate. > > > > > The end result is the same so we can make this change later (it has to > > > come after DMA-BUF heaps is in anyway). > > > > Well, I'm hesitant to merge code that exposes all the CMA heaps and > > then add patches that becomes more selective, should anyone depend on > > the initial behavior. :/ > > How about only auto-adding the system default CMA region (cma->name == > "reserved")? Great minds... :) > And/or the CMA auto-add could be behind a config option? It seems a > shame to further delay this, and the CMA heap itself really is useful. thanks -john