Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp10915216ybi; Thu, 25 Jul 2019 07:02:16 -0700 (PDT) X-Google-Smtp-Source: APXvYqxS3rl6BQNKyn8ZMnJqqsHtFUwBN/D3HXKDNUm86hVtVhbEOQuGjQda+HZvTDW3xBBQOb0f X-Received: by 2002:a17:902:b093:: with SMTP id p19mr88201531plr.141.1564063336704; Thu, 25 Jul 2019 07:02:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564063336; cv=none; d=google.com; s=arc-20160816; b=d2DN0nHL6oIx9E8nXtzIKIXFaoBN7H2GfxMvd4mdvtbTiNUFDiu2flhI3cz/7fSgot b8HQ56n1D3S9rORBLFryErorAfik59kRLs/rRMKQZicpaJCDsH4fzCKP12vd9rLUgFCv 68qVZZ0OOq9BAJiXO6Bz/QJXpcyR+D1T5h3/dwKHhYE+9I3WxMJsg2coeOJ3DSUQCfgy H3s/lD2qOK2MeZGZYuI/ASRWPzuhy5UrTh1mNM9KGfVHBl+LOoh7D1w4YsIMtiw1Y4gV Mtd9Giw0x/ExmT7mZ43xZVC9NbJoPRbRkkKygYOqMhjkbM7RDX0soW4p+TvHtTKeafu6 r2VQ== 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=sCZEIVmVGag1Egj1E+yjyGvhHi5tCLTiY1ZkJsuHwvg=; b=ZoNY3cyfj9cj9A8oR4Q264ikVRdhuhfTu9wuu7+B2W0rVUR591wYD35mTuIYs/1k0l X/esi8XZfxQWaAPOCuxfUUysh4BGQfIa+cZE9wVPr6j+2IP+kMPltQFw/JP2Cy7YNS0W maVdFPGu4eRWi1tg0uQyiEIgl3v0GIi0rQpCgOynTDx8beBLkIbtgn0mkfBNC49hza1D PMbu40Wc8Xt897x18QIVmVGlBy7BcWFvT2HD/6ihLgbObHRGqPxZnnujHzWlYGhkU6zR q722iRoXL49wMSyJkuLAZLXWyKKfO3JgjWW+v9TQvkuIBKm7cZ7W0qukMs6ftYucD0MC rTWQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=tBE4Mbdj; 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 r6si15222017pls.145.2019.07.25.07.02.01; Thu, 25 Jul 2019 07:02:16 -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=tBE4Mbdj; 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 S2389276AbfGYMuP (ORCPT + 99 others); Thu, 25 Jul 2019 08:50:15 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:42088 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389217AbfGYMuP (ORCPT ); Thu, 25 Jul 2019 08:50:15 -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=sCZEIVmVGag1Egj1E+yjyGvhHi5tCLTiY1ZkJsuHwvg=; b=tBE4MbdjsLwKSWHwdDkl8lvuY tAV5UcM6qphIcUwSQ6Khdv9Zq/EZ3oHJE9NET/SGaC+MDSuNoaSt6dM2Ye2A9fAJ4YgluQdLcBG3A xq56UM26WYZaH9sW9w350wSbtwvPthQ6ZA6xBFEobEMzHmnKhpb80Xr+++7NGfPTEKxwuE55l/g5C CamGc8MssEw5/YxIQvh2/GrQsDOQk3pqfnSo1vZ0cWFM1fzk6JmExZpCcjClGowpLZ+DtlUUTWvXY dt8IhP29tBwk91T3dpey/JmJ5Remdd9VUUCZHwb2/N8gVCk7f2UWYSL2Hu6M3BZ8gQ66MsQpPRYEk V9CeIx+9g==; Received: from hch by bombadil.infradead.org with local (Exim 4.92 #3 (Red Hat Linux)) id 1hqdCI-000294-6E; Thu, 25 Jul 2019 12:50:14 +0000 Date: Thu, 25 Jul 2019 05:50:14 -0700 From: Christoph Hellwig To: "Andrew F. Davis" Cc: Christoph Hellwig , John Stultz , lkml , Laura Abbott , Benjamin Gaignard , Sumit Semwal , Liam Mark , Pratik Patel , Brian Starkey , Vincent Donnefort , Sudipto Paul , 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: <20190725125014.GD20286@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> <8e6f8e4f-20fc-1f1f-2228-f4fd7c7c5c1f@ti.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <8e6f8e4f-20fc-1f1f-2228-f4fd7c7c5c1f@ti.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 11:46:01AM -0400, Andrew F. Davis wrote: > https://patchwork.kernel.org/patch/10863957/ > > It's actually a more simple heap type IMHO, but the logic inside is > incompatible with the system/CMA heaps, if you move any of their code > into the core framework then this heap stops working. Leading to out of > tree hacks on the core to get it back functional. I see the same for the > "complex" heaps with ION. Well, this mostly is just another allocator (gen_pool). And given that the whole dma-buf infrastucture assumes things are backed by pages we really shouldn't need much more than an alloc and a free callback (and maybe the pgprot to map it) and handle the rest in common code.