Received: by 2002:ac0:a874:0:0:0:0:0 with SMTP id c49csp744578ima; Fri, 15 Mar 2019 13:09:52 -0700 (PDT) X-Google-Smtp-Source: APXvYqyLLkSUiOJCP65rZ597o6kp8TZ+9knNV+2Y6zX6WuCWXRFxqQUZBR+RRB8MpTmNbpYJtgWA X-Received: by 2002:a63:c310:: with SMTP id c16mr4990691pgd.233.1552680592335; Fri, 15 Mar 2019 13:09:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1552680592; cv=none; d=google.com; s=arc-20160816; b=Gme7mNrmD8cPTzPcXYVLppVx15t1YBq7irI/X1Euyv8zVldX2eoJ+wX2bUGcs+vWXo onWUbcTcw99uSRPEOkHwNOxHalHBCZ5vyjy3dBYCHyf8DwKxgN0KUdejWJzeMH0sk92r rKFh3AsAYmflaXE/oi3McXmWYeb+tcXZHn2glPFl0uRNQju7RWwmxUpjtb9of/M6dSI7 kSMXJki++bt+Fjd/FHw4rMUKZuSn7oYXFOSunWkp58Q1cGb3zUAA5MAxZ6H0pO7znaqJ wmJb7vAjOyQrXlKpVRba/sD7E980nI54cByoageVMXH9lcwG2meDPTwtNcGyikF7yXlo 7zbg== 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=5qLtdzUN+oogw64VyyyhknYdUWM49blhNmdnvz9q5iw=; b=NXsxdSddvf/bd37xOrXQ8vhUOUjX997d2JD3kn3xHn6IeJwNWNgA1ml2WjNvo4RBYu C+78W9CWeYRBUcBCHm3ucJnpPKxgCjJMv5RS4pjjsQjoSgQPjqojiGHigYWqxWmgBNku iqhGL7dw2ssajYRV8xA+TeUyFTNzrsNDNdigXpYjUm0r6/K39z7n79Axbq21vL7AVNU9 kINNQvVOSJv+3FnHfWzHGj/Qa1cPoKQzxRcZoJnkX+Ho131csgjtDbm/BtcxNsED8bUF kIz3pO+DuM5YidH2TU5sdvFEfxQj93cKX9eFiVsC42LXMpbaoY3KAT/Dm8FmNL886sVh gRGA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=fcZQkLp6; 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 61si2691081plq.154.2019.03.15.13.09.37; Fri, 15 Mar 2019 13:09:52 -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=fcZQkLp6; 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 S1726809AbfCOUIz (ORCPT + 99 others); Fri, 15 Mar 2019 16:08:55 -0400 Received: from mail-wr1-f65.google.com ([209.85.221.65]:40452 "EHLO mail-wr1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726326AbfCOUIy (ORCPT ); Fri, 15 Mar 2019 16:08:54 -0400 Received: by mail-wr1-f65.google.com with SMTP id t5so10865401wri.7 for ; Fri, 15 Mar 2019 13:08:53 -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=5qLtdzUN+oogw64VyyyhknYdUWM49blhNmdnvz9q5iw=; b=fcZQkLp6Vf72cBvsviN6ZR3p5TcOlBhnUzUmuAhGAYhU1xu74LAKyJmLyvG7JNMYO7 aX+u5tWoAHYY8+JlQT3oF3MtC2IB3GkUCJaNH5cGPta4yshX+3NNbLMkqG+U7r0eFcpF RgU88QOvVgQYVcWw8xxED2cSQ8Srlvd/n8IWXrstr6rzcxnvXmCMCxiODoZYSI0FT+dR geCcEVtFpRJ6/hZqGJoemO2ZOeMEd4s+jhMMc2+8b295ZaE9hQjVds0B8kJAj0dYwhXg urtDyMi2z2/LEe9n1/Vmqa+v9mMSG926Po/NV0+97e9oNLIDdXHdpKQwW3lJL3yD2ZAQ gQQQ== 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=5qLtdzUN+oogw64VyyyhknYdUWM49blhNmdnvz9q5iw=; b=H2N6bg51D6/0VEWrPWkeLXf08fbgiiJhymBNy68+eSPsZE4F5GRJsKlRrhvdmdwmK4 oasEmfYi1wRn9zOzedha98i/v0ie/vDT5ICb3StBlHH3Hkp5sir1fPMnRVv56Qey9T2w 8d+ZQYqGuhb6iMrmPfUVXBuRaNYKgXgkEdZGUNAFJIRqq/BH2tW1UFOEEL2/GSN61kgd g9cVJbKdbySrn4degFDlqSoTSMJ5FZJqQnzZtMW3V+zhkImRTkVOB/rbvIkt6WZSZCjx o/iUVA2e79fxR/v6Lb/NhtsAqTWT2mXd4wDbt7l0wiBCusU92VoAhqdEOr9ngOU0KYkk fZnQ== X-Gm-Message-State: APjAAAXKMhwbGbEkpHodRVnbEEDo/uhung/B4w3R0VMyjzg9bpP2iJ6f En4nUB8H1zvV7DBxffauUHf+wpqDyHrY6K2LibPURw== X-Received: by 2002:adf:fa51:: with SMTP id y17mr3824176wrr.233.1552680532567; Fri, 15 Mar 2019 13:08:52 -0700 (PDT) MIME-Version: 1.0 References: <1551819273-640-1-git-send-email-john.stultz@linaro.org> <1551819273-640-5-git-send-email-john.stultz@linaro.org> <20190315090652.GE4470@infradead.org> In-Reply-To: <20190315090652.GE4470@infradead.org> From: John Stultz Date: Fri, 15 Mar 2019 13:08:38 -0700 Message-ID: Subject: Re: [RFC][PATCH 4/5 v2] dma-buf: heaps: Add CMA heap to dmabuf heapss To: Christoph Hellwig Cc: lkml , Laura Abbott , Benjamin Gaignard , Greg KH , Sumit Semwal , Liam Mark , Brian Starkey , "Andrew F . Davis" , Chenbo Feng , Alistair Strachan , dri-devel 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, Mar 15, 2019 at 2:06 AM Christoph Hellwig wrote: > > On Tue, Mar 05, 2019 at 12:54:32PM -0800, John Stultz wrote: > > This adds a CMA heap, which allows userspace to allocate > > a dma-buf of contiguous memory out of a CMA region. > > With my previous suggestion of DMA API usage you'd get CMA support for > free in the system one instead of all this duplicate code.. Hey Christoph! Thanks for the review here! I'm still digesting your comments, so apologies if I misunderstand. On the point here, unless you're referring to some earlier suggestion on a previous discussion (and not the system heap feedback), part of the reason there are separate heaps is to allow Android to be able to optimize where the allocations are coming from to best match the use case. So they only want to allocate CMA backed dmabufs when the use case has devices that require it, or they may even want to have separate a CMA region reserved for a specific use case (like camera buffers). Similarly for any future heap for allocating secure dma-bufs. So while in the implementation we can consolidate the code more, but we'd still probably want to have separate heaps. Does that make sense? Am I misinterpreting your feedback? thanks -john