Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp10914648ybi; Thu, 25 Jul 2019 07:01:50 -0700 (PDT) X-Google-Smtp-Source: APXvYqxHN2BJ37EWvOHREaT4jjJjujnZE7mcFMv+6zxyHSnxhiggbr9yYAJ6bX8CGDFIAALJwu5G X-Received: by 2002:a17:90a:8c0c:: with SMTP id a12mr92924401pjo.67.1564063310432; Thu, 25 Jul 2019 07:01:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564063310; cv=none; d=google.com; s=arc-20160816; b=L3IvqRMkxyLv8JtXfEAK3YqOSIjZMARP65Ms55crOB6M3Ac2RjeVxti2VyTmqYg2fy yAi55mAno7tt60iUpG+3HHSSq76GWzRKfYt0xK+3k/9Iy0jL43sdSGDLm/hWLNYBCUDD jnL7ufDFzaf87BkZHHWSK19ZjHzypJ5aC2jClE0KueFJTFBlVHShQJclM2ohi6Ghz3XO 9UNVdEbsCaFyF1e/Qu5GYFiCtKoZtvC4lV++jZBLBAJiHXhZcEKSHUtOXmabOidOac7d pVwpALmiby+H0rNyYVDmm9/5xSJq9/yQfkZFhKaj8jsSbCVLoa/Qivxekka3v8/42fFL 8lFg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=05xwHelLjSHHBuReW+EIr66fHPltEo6bHo2T1pZhDCg=; b=nuWV/Qz5GXAc48X9MMRnTh8la7pdRkpiHEQ4S3LaRlEoNyW1g5OkmujSmnOvMtPhIn 9hpimNJkD28Ga5WOvtwyESCQEZ5Rs/WXhoTrbVOyGN8qPJNU1SBorHuPevbzRcicRp5P LZeY1LzzcXa41NgvLrMaSHTA3s/4wiexTRsTt9kYWY2a9GWkjJDtdonOxqjeJVkvQ4r4 wQyztLaaTTXo6I0Kkp1vM4tMh7qNnmuwxr/KUO1X7OqBNkmqZR4P1w16xwJDP3kivdHf 4gxA0uVwUIISNi/QdwkxRJax4GoKZiBja3Z3WhN2CDlVDfUXAPifAsfe4QcK0Y34SMcF W4MA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b="Q/tA4mT0"; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i95si17540899plb.106.2019.07.25.07.01.35; Thu, 25 Jul 2019 07:01:50 -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=fail header.i=@infradead.org header.s=bombadil.20170209 header.b="Q/tA4mT0"; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389223AbfGYMsX (ORCPT + 99 others); Thu, 25 Jul 2019 08:48:23 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:40706 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388497AbfGYMsX (ORCPT ); Thu, 25 Jul 2019 08:48:23 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=05xwHelLjSHHBuReW+EIr66fHPltEo6bHo2T1pZhDCg=; b=Q/tA4mT0PXt+o9525krpx7Q7B zuIKWtu8R3tg8EuI2BRFi4bwQ/bBDfZgR2BOsraAY6TDYT7CQcExzTW7WgqRcRKS0ElmcHclHcxpy jHZB2p/o8KKMODwWQdjcxX7n5sQXs5BJfDe3OI7KOd/Z69BRd39yfyhAbPnfE4s7ScMJeuuPP1xe1 Ijj8fw4A3Gx9s3oLKRbrN7CYJQAdl7lfBfrLgPdzj3WiiY14YAnWy6VGHCEeT0/UFL/ssx+cmQDAr QHCahuSme8WRIkn7skl0W0g+F4m7ygHjF4rdrGQJhNGZUgfTKpFJVUbGmXKDj2J6Y+lMrx9HHo05J TGNY1nDeA==; Received: from hch by bombadil.infradead.org with local (Exim 4.92 #3 (Red Hat Linux)) id 1hqdAS-0000dx-3H; Thu, 25 Jul 2019 12:48:20 +0000 Date: Thu, 25 Jul 2019 05:48:20 -0700 From: Christoph Hellwig To: Laura Abbott Cc: Christoph Hellwig , John Stultz , lkml , Benjamin Gaignard , Sumit Semwal , Liam Mark , Pratik Patel , Brian Starkey , Vincent Donnefort , Sudipto Paul , "Andrew F . Davis" , Xu YiPing , "Chenfeng (puck)" , butao , "Xiaqing (A)" , Yudongbin , Chenbo Feng , Alistair Strachan , dri-devel Subject: Re: [PATCH v6 4/5] dma-buf: heaps: Add CMA heap to dmabuf heaps Message-ID: <20190725124820.GC20286@infradead.org> References: <20190624194908.121273-1-john.stultz@linaro.org> <20190624194908.121273-5-john.stultz@linaro.org> <20190718100840.GB19666@infradead.org> <20190724065958.GC16225@infradead.org> <25353c4f-5389-0352-b34e-78698b35e588@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <25353c4f-5389-0352-b34e-78698b35e588@redhat.com> User-Agent: Mutt/1.11.4 (2019-03-13) X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jul 24, 2019 at 07:38:07AM -0400, Laura Abbott wrote: > It's not just an optimization for Ion though. Ion was designed to > let the callers choose between system and multiple CMA heaps. Who cares about ion? That some out of tree android crap that should not be relevant for upstream except as an example for how not to design things.. > On other > systems there may be multiple CMA regions dedicated to a specific > purpose or placed at a specific address. The callers need to > be able to choose exactly whether they want a particular CMA region > or discontiguous regions. At least in cma is only used either with the global pool or a per-device cma pool. I think if you want to make this new dma-buf API fit in with the rest with the kernel you follow that model, and pass in a struct device to select the particular cma area, similar how the DMA allocator works.