Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp1417389pxj; Fri, 21 May 2021 13:50:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz3SZSfqW/gB0wpBzRKZHMFUC0W4FqWlPiSX9coWq8sHTG9xD+BgxO+HANYI68roDJlGW1V X-Received: by 2002:aa7:ca10:: with SMTP id y16mr12717275eds.280.1621630210367; Fri, 21 May 2021 13:50:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621630210; cv=none; d=google.com; s=arc-20160816; b=kn4moaUyqeJpgXvQSfkt/0kVB0kSOWqVdBAqxfYgMmtoXrUGXv0GGwN617y7CVxFIO 4W1Zqx2DoTZPmlCmb7WbtYKe7ixT/+UZV8pT3AdpmXZRNrsIZ6imwB7cyQkX2YgXj3AU qP+Lt8hzV7ESzvXbneKJzcSkSAImAfDDKO6e3/WRbRoieYwryTu6IVHyUy/6QV4K0vzK oauKM0TTiV4P3BLgLshEXjXo+1mu1ScEtJVXUcryaQCYvt8esXLaXfDBj6FVaG8109J8 +K9x8qEbracpV/uuPEsafGbg81Yam73Nrd9qwuMkcQYJ9OdFsMyRXiquLm5BAKSgIvX7 5o9Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=xvfpVd2OzH4+o/D/vVDC31Zzvji7CpUDutlyGbWSS2M=; b=M2EfQGvN5zEn8iyh684EPwI6WQud06gyO6vwSUgJaWqWNHmoMY4xgzhfA4tXCkhtWz EUTvM8Qjklbe8eBiQx7XkjKUyQVKTRKxWTvj+SYV4okKD/62H9vDgys8lFNu5Nc3qVg2 szeKnRV30ZrDBDS8MZFMB1shlBL+gARERpiK8YlC9aeznRy+EDBHe2C/yQO+DLaUqKK8 lPYrBQafNAxZjkuXFj3sksJttbxr11U533Zq+0LjawZzLUcZk5ElyUhau1qCVV4nYXjG KFF0DbSlfIXMHPN6L8lmVhlkDP7Y+2THLed+580we97bAYAQPb22h+uJXyiSXkSr5QhC Orcg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=EbaAG9yK; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id rh9si6143581ejb.139.2021.05.21.13.49.46; Fri, 21 May 2021 13:50:10 -0700 (PDT) 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=@linaro.org header.s=google header.b=EbaAG9yK; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231869AbhEUUJq (ORCPT + 99 others); Fri, 21 May 2021 16:09:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33778 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231805AbhEUUJp (ORCPT ); Fri, 21 May 2021 16:09:45 -0400 Received: from mail-lf1-x130.google.com (mail-lf1-x130.google.com [IPv6:2a00:1450:4864:20::130]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D8873C06138A for ; Fri, 21 May 2021 13:08:21 -0700 (PDT) Received: by mail-lf1-x130.google.com with SMTP id q7so30078007lfr.6 for ; Fri, 21 May 2021 13:08:21 -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:content-transfer-encoding; bh=xvfpVd2OzH4+o/D/vVDC31Zzvji7CpUDutlyGbWSS2M=; b=EbaAG9yK/DK3FcwWC04VW6QzRYN89xRqlD00mrvuESUFgBxV9HY8hkAXOyT5Lt0xpx PppMV5UTCm21S4B9qt/ncdmHkOMYb27DbVQ9WV5E09GdcFKA0hRbhSVghHeaEPPoJaSb dEcBcUUDgAw4ejb0yilsMouDiF0KWMY5GDKlYDPEhctNS87/jVTGh5VE5vDzRgUx3Q1P ImYqL0JyA4p95+SC38XbOoxlTbUyOgGY7+aBPyPpC6NgRTzAHg92siUlFxEhm3olReik 2zNUFAEeFXvA/EXlg42qs5DoJCeGPD0efucoC+esFnELqjhO9qUj2rveosnwnT78ncVZ PUhA== 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:content-transfer-encoding; bh=xvfpVd2OzH4+o/D/vVDC31Zzvji7CpUDutlyGbWSS2M=; b=Di4MihDYlioq0/mAvZxrVnoUkKGeN3ooTcu/w8UuCTT2IPVFbCoBR6fWnxa2SbrDEl AdAFWKYJVvQFu/yx+ReyiuDyTXu+peAx8QnY3WZqoAlOSt1XpnBhRIRKl24X69oAiCQ3 kkQ/5GYj+yv2RjF84gkgsKeGeq/a80c+ZfCU8KDXnBrJRiANrlz/jHH+C9oDZG0ymeZW Soz6ingYkYyd0OTadr5K0nJEIbhPPlOhxSqC3L+IcBfJxAQSWwbRbTEh+qhJneEDPGua 5BCS7DZARFnE/I3zs9Vu44ITluJCjUB2VVvvVzRSBzNaw0XBFuK+1LQ2RW2b3/jIXsl1 ZYHQ== X-Gm-Message-State: AOAM533yVIOn3oqn5eHLmLUQus7KSAeLvAIn1K7Bmi+xsx012ITV2AEQ psOJV9BijcRZ4IB1igDiv4TavpeGS2BUFtcxBEfxwA== X-Received: by 2002:a19:8083:: with SMTP id b125mr3166068lfd.204.1621627700167; Fri, 21 May 2021 13:08:20 -0700 (PDT) MIME-Version: 1.0 References: <20201110034934.70898-1-john.stultz@linaro.org> In-Reply-To: From: John Stultz Date: Fri, 21 May 2021 13:08:07 -0700 Message-ID: Subject: Re: [PATCH v5 0/7] dma-buf: Performance improvements for system heap & a system-uncached implementation To: Lee Jones Cc: lkml , Sumit Semwal , Liam Mark , Laura Abbott , Brian Starkey , Hridya Valsaraju , Suren Baghdasaryan , Sandeep Patil , Daniel Mentz , Chris Goldsworthy , =?UTF-8?Q?=C3=98rjan_Eide?= , Robin Murphy , Ezequiel Garcia , Simon Ser , James Jones , "open list:DMA BUFFER SHARING FRAMEWORK" , dri-devel , Nicolas Dufresne Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, May 21, 2021 at 2:40 AM Lee Jones wrote: > On Tue, 10 Nov 2020 at 03:49, John Stultz wrote: >> This series reworks the system heap to use sgtables, and then >> consolidates the pagelist method from the heap-helpers into the >> CMA heap. After which the heap-helpers logic is removed (as it >> is unused). I'd still like to find a better way to avoid some of >> the logic duplication in implementing the entire dma_buf_ops >> handlers per heap. But unfortunately that code is tied somewhat >> to how the buffer's memory is tracked. As more heaps show up I >> think we'll have a better idea how to best share code, so for >> now I think this is ok. >> >> After this, the series introduces an optimization that >> =C3=98rjan Eide implemented for ION that avoids calling sync on >> attachments that don't have a mapping. >> >> Next, an optimization to use larger order pages for the system >> heap. This change brings us closer to the current performance >> of the ION allocation code (though there still is a gap due >> to ION using a mix of deferred-freeing and page pools, I'll be >> looking at integrating those eventually). >> >> Finally, a reworked version of my uncached system heap >> implementation I was submitting a few weeks back. Since it >> duplicated a lot of the now reworked system heap code, I >> realized it would be much simpler to add the functionality to >> the system_heap implementation itself. >> >> While not improving the core allocation performance, the >> uncached heap allocations do result in *much* improved >> performance on HiKey960 as it avoids a lot of flushing and >> invalidating buffers that the cpu doesn't touch often. >> > > > John, did this ever make it past v5? I don't see a follow-up. So most of these have landed upstream already. The one exception is the system-uncached heap implementation, as DanielV wanted a usecase where it was beneficial to a device with an open driver. Unfortunately this hasn't been trivial to show with the open gpu devices I have, but taking Nicolas Dufresne's note, we're looking to enable v4l2 integration in AOSP on db845c, so we can hopefully show some benefit there. The HAL integration work has been taking some time to get working though. So it's a bit blocked on that for now. thanks -john