Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1841525pxb; Sat, 27 Feb 2021 01:47:21 -0800 (PST) X-Google-Smtp-Source: ABdhPJzmcbPHlg3Vfzc0NQXmP9bsIxdN1ONMO4ODUabLcbpg4Qro1iBrywH0oy1kg5kMJCYUm5i8 X-Received: by 2002:a17:906:3850:: with SMTP id w16mr7572667ejc.286.1614419241676; Sat, 27 Feb 2021 01:47:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614419241; cv=none; d=google.com; s=arc-20160816; b=NyKjYbBsB5RsZCbBVm70tEY33/sOOFHvhRTM9eyrIHLZZBh8M+/lQftwrrSMw1mVKs xmkoRspQ6HUH3O5uPPGKh2c0iO1s5NqO0kRKTthmIMApwS76hzKayxBLeXN1PxvqcvUB Dcc3KCJo35AVAXu/lXKO7g/T7bti9aTM8lb0U5WP16SJsreTjgbcFgFRo9yZQYHb1ddD llL24uH8WpM9ay93faTd/6Wgu8t5n/yW3F2hihCzkQCoxP1A4HaiK0b66AkUaWChInq6 4cRTLrr21tf/XVoVpRCjIBDPPIkHag+KjGcpYA9uyKHGrGD2MlrzOrmS8QbEcCg6MKZ0 FBkA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=VM97Uq4A/bCQIc/VoHqSqFkNPx4rjzARqOagWBxiges=; b=jX3JfGKTHWuM0WVUDjcp4hE5T6vo03N6GdLogNF/fuUzwV5O+xMm00L7i7ZpYofPmI ndu+kCcBodxfM7x/41eLcehbm8Q9w9kmwNoPLxYPaFClem58TGdc2xUyHx9DmnyqKK9p dmgZyRysrTxrD2OM/5EUcNRph+RMoEgNheJhnPjTrlR02MxeYZ1oIhqI6JYDbemRd4A/ /0bR/0t0/VaHiJBbxLQjweBx+DKUIIJ1vRb1+Lbns05xTECrWmKbZK2BEMAPW60hct35 9pvG1gL2VA4XUEgWR4EgUvDM7tHTaNa4xVkHljd4QEGLNzqdYmlPyFk7blaz+p4Cb4u7 L1dQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=SKkxTFVQ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a18si6951051edy.522.2021.02.27.01.46.51; Sat, 27 Feb 2021 01:47:21 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=SKkxTFVQ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229993AbhB0Jp0 (ORCPT + 99 others); Sat, 27 Feb 2021 04:45:26 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43944 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229835AbhB0JpZ (ORCPT ); Sat, 27 Feb 2021 04:45:25 -0500 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 39571C06174A; Sat, 27 Feb 2021 01:44:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.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; bh=VM97Uq4A/bCQIc/VoHqSqFkNPx4rjzARqOagWBxiges=; b=SKkxTFVQGBEexrjxqtvuYKWWED aAQ8DzdHIn0tLqrmToW8ZXHVMYFIwYEx7wi8Ex29ZliP2FIwM9UeXgfxISkr4wt+zJrxbVfQiF0JD pRk8z/HTstagvSa0jQAT6a5xA700xOBEG1+ykRjF5o4b2aDAnVO3yZ3fuYgrHzYZ+Fi0/zAlPXqqz J8o9NZ/vX0+N5e3HX6QMy81r/ZrNh6nVHXEx9aSAQUwtzlTOqHtV7D+00NX9c1mlKJ82e4V54KPKs xlPTSrn+LWw0YWNPIwEYroc1iy8Jb7zPLnxtM+MqbI0e3AYj/sedUodrc8j7sAzocxflolvpkla7k bVbVxCJA==; Received: from hch by casper.infradead.org with local (Exim 4.94 #2 (Red Hat Linux)) id 1lFw9M-00D9J5-Lf; Sat, 27 Feb 2021 09:44:37 +0000 Date: Sat, 27 Feb 2021 09:44:36 +0000 From: Christoph Hellwig To: Daniel Vetter Cc: John Stultz , lkml , Jason Gunthorpe , Christian Koenig , Sumit Semwal , Liam Mark , Chris Goldsworthy , Laura Abbott , Brian Starkey , Hridya Valsaraju , Suren Baghdasaryan , Sandeep Patil , Daniel Mentz , ??rjan Eide , Robin Murphy , Ezequiel Garcia , Simon Ser , James Jones , "open list:DMA BUFFER SHARING FRAMEWORK" , dri-devel Subject: Re: [PATCH] dma-buf: heaps: Set VM_PFNMAP in mmap for system and cma heaps Message-ID: <20210227094436.GA3130571@infradead.org> References: <20210226040908.3274666-1-john.stultz@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-SRS-Rewrite: SMTP reverse-path rewritten from by casper.infradead.org. See http://www.infradead.org/rpr.html Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Feb 26, 2021 at 08:36:55AM +0100, Daniel Vetter wrote: > Also given that both deal with struct page there's a ton of divergence > between these two that doesn't make much sense. Maybe could even share > the code fully, aside from how you allocate the struct pages. I've been saying that since the code was first submitted. Once pages are allocated from CMA they should be treated not different from normal pages. Please take a look at how the DMA contigous allocator manages to share all code for handling CMA vs alloc_pages pages.