Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp1287738ybg; Fri, 18 Oct 2019 15:15:59 -0700 (PDT) X-Google-Smtp-Source: APXvYqzh94n2Bs3meOhz0ADa+5kV0Eav9D+0FIHJl2y40srDicH3qTJZ/Bv/gzpnPIhomjXYtJhd X-Received: by 2002:a17:906:181b:: with SMTP id v27mr11312274eje.117.1571436959439; Fri, 18 Oct 2019 15:15:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571436959; cv=none; d=google.com; s=arc-20160816; b=CvfC+Fot2HJm5oEQTHWhqIga6xO6v7xPz4pperF6N1FKZ8bQqr727QsYohgNCahXfp 27352Eu/ypf6A6ClsBk0qt6570uZuMwDLfz80P4ZiWJdqL3ze/qkPWMgp48/en4UPGM7 t/+Ju/ChCVacHWO2X59HuIcqbHyPMfomLrdaNn5YOdXlj9VrMGeDLHb9c5qyL0GidzaY cmDnMD9lkokv4XjY0QD3AmInf5uPcpXer2l6WFhZNz85ghBgSyus0KkPGzS7HRPKAhxp vTYLLuiG6CaPxsmCl5TE5fXvre2dp44fBvsirS6REeXcpEtqjam3ZW0p5Q/x5sAsec8C d6xA== 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=mvGIqAYge04E8FhX6sBpxVjaOFRt097ptSHTXXfneKk=; b=FISAR/RZfKiJs/cVAGnZPBB5pzdgy3Hoih2IIzOndndrKSTQih933UkRha3COpOBH7 HcI3buFVGp/V8Px6/Zwc/ihEDO01aCe2j3kurChpiSn/8L0h1wg4JlDWQckIp2FOsZ8z sCtUCB7+2yNPZzW9gWi24YXhw2h6BWR8rtc5YM9mBuBzKBvgVBf58TCm1VsywP1T6al4 pMoLlKqQM/08dowugDiJUj1mQzegdLIYaX5XrhNWsIGtkBdEYd+kwyQiFdpnl6DfkGx7 pOhLEBwPmxZjYB/N2Un/N9K6mJ5ic6jxZ2ft+ioCeZekm038F1GUTa58UkzYwDF0Mjl1 icGw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=cZ4QO9rl; 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 dv21si4262110ejb.241.2019.10.18.15.15.36; Fri, 18 Oct 2019 15:15: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=cZ4QO9rl; 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 S2439329AbfJQTO3 (ORCPT + 99 others); Thu, 17 Oct 2019 15:14:29 -0400 Received: from mail-wr1-f65.google.com ([209.85.221.65]:43417 "EHLO mail-wr1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727397AbfJQTO2 (ORCPT ); Thu, 17 Oct 2019 15:14:28 -0400 Received: by mail-wr1-f65.google.com with SMTP id j18so3596441wrq.10 for ; Thu, 17 Oct 2019 12:14:27 -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=mvGIqAYge04E8FhX6sBpxVjaOFRt097ptSHTXXfneKk=; b=cZ4QO9rlkFXmbsu9Pg73hXjoos4HnGGzGTdFGgn+xOCCdXRtpg7LeIGvGwTIoMw9ir yPYX4zU3b+IOKDprgcX3V8YeiNv30hdK6FHrTtEblw/9jIvucazynts8Sm3w3iojII4f jcj12a7NBzmuMuqo3yHpRCONapbJ1WK8dRrAyKAdayuMMu+7uJUkazi4jizlRLHW0irZ 3h6WKcrxwBzmFh8TNXtOB5l2toN2kdgDknHB4W0h+kSyemLc3smo+gaf4+lOHEdJm0ue dHoM6ia55QGIvtmY/fZIOYCG4C4mXDGng8Ii+Q9ffHwREpGZqO4j2bk6AYo+krBvd/hk +2Wg== 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=mvGIqAYge04E8FhX6sBpxVjaOFRt097ptSHTXXfneKk=; b=gx5oBjbBSF24XOmGZMx/bVIFz/OYY+zuGJTBVLOXkmAlyCaPmOX0L9CvKg8yLPH6n5 kam+kheA/B/6RMjWDNlm785k8QRsDjjZ2ROYMVbN4fzJKmTS8UkolK7CFswPZQWTOiwa dVH23vHn/8M+3p2benEK2UcTd04QHKWpAFitFox46/NCwqOcLVoIVFfxX8CFlGVUM/n3 +Fk67wortXyZ04asB3FgZvWHzeNjpu9JKr5xEbG572RLtoEgStoB2+WdUlOzYc//xLo7 dYB9uCburB4rf8OY7NLtRXnWoPVhibWmThs6ru1ltjffF/PMclowmV2r5tuEQgV2xi1L wlWw== X-Gm-Message-State: APjAAAWnrTvuuhmSvgXidBp31FIdFdEqydH5m7tdCYWdtB0XqJMJRzi+ 9M8RtHsRrjZXC1McbEydkeQbWt/8ByQGaEuSMbUxSA== X-Received: by 2002:a05:6000:92:: with SMTP id m18mr1030503wrx.105.1571339666625; Thu, 17 Oct 2019 12:14:26 -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> In-Reply-To: From: John Stultz Date: Thu, 17 Oct 2019 12:14:14 -0700 Message-ID: Subject: Re: [RESEND][PATCH v8 0/5] DMA-BUF Heaps (destaging ION) To: "Andrew F. Davis" Cc: Brian Starkey , 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 Wed, Oct 16, 2019 at 10:41 AM Andrew F. Davis wrote: > On 10/14/19 5:07 AM, Brian Starkey wrote: > > Hi Andrew, > > > > On Wed, Oct 09, 2019 at 02:27:15PM -0400, Andrew F. Davis wrote: > >> The CMA driver that registers these nodes will have to be expanded to > >> export them using this framework as needed. We do something similar to > >> export SRAM nodes: > >> > >> https://lkml.org/lkml/2019/3/21/575 > >> > >> Unlike the system/default-cma driver which can be centralized in the > >> tree, these extra exporters will probably live out in other subsystems > >> and so are added in later steps. > >> > >> Andrew > > > > I was under the impression that the "cma_for_each_area" loop in patch > > 4 would do that (add_cma_heaps). Is it not the case? > > > > For these cma nodes yes, I thought you meant reserved memory areas in > general. Ok, sorry I didn't see this earlier, not only was I still dropped from the To list, but the copy I got from dri-devel ended up marked as spam. > Just as a side note, I'm not a huge fan of the cma_for_each_area() to > begin with, it seems a bit out of place when they could be selectively > added as heaps as needed. Not sure how that will work with cma nodes > specifically assigned to devices, seems like we could just steal their > memory space from userspace with this.. So this would be a concern with ION as well, since it does the same thing because being able to allocate from multiple CMA heaps for device specific purpose is really useful. And at least with dmabuf heaps each heap can be given its own permissions so there's less likelihood for any abuse as you describe. And it also allows various device cma nodes to still be allocated from using the same interface (rather then having to use a custom driver ioctl for each device). But if the objection stands, do you have a proposal for an alternative way to enumerate a subset of CMA heaps? thanks -john