Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp2565572pxu; Fri, 18 Dec 2020 17:18:55 -0800 (PST) X-Google-Smtp-Source: ABdhPJx06Vt5mrrPQpQylP4Bg7jdIN8iFE/9zATznExOVtM4b3Hyls+qL6N2RnD+g8grzehNghVE X-Received: by 2002:aa7:ce94:: with SMTP id y20mr6853551edv.361.1608340735741; Fri, 18 Dec 2020 17:18:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1608340735; cv=none; d=google.com; s=arc-20160816; b=eMRFHOlQvU7BsVlLMlFEIvlXHaBxfo1r3RtrjzA/eG0SopwhAm3alHiN+hepZntfPf yxm9pb1LlYAo3iKxGvJ6Yfw0RY8JAbd0iudfSjPD1uMunVeuttmpzhACQ2iK3CQ4YUiT zZVk/mMtRB5tPwh0WKMUACyjDLZjrWJm+749DDKRLo2RYT6khEU8+mDtbbShph8WeBGt 1mdWUF8G73N/v6iU1KVU4rF5H2/4ADU/6yuAXMLeYKgGMXdJqkUOnMDg/r6gpYAFGVls lG90etQqmqglp7GS9zLlMlQvGFpgFaBYYReFsHdk3wUGhtKe8dKLj6i/7ExRVhJEX53Y 5epA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=kqfzYZjd8v2qCtr+CwGBLV3Vs/0PzggZH8o2lrmVRy4=; b=kxJ/7HCrCuvnWLO40T4IJ0GQ6wiD5N9+tn/R1id0SnzmYZcTppZe8xnRT70vKHwpcf s9KnvLXgR9rgHUAvdetVj40FdhJDkEoHD4DfXwK/veeENVP+VcJEJ5DB4j5jV9GAGEqp DSoQwbgbNFf04nfCCGTwCjqxkeMv+lTvqywkNveGqVmu9l1RjpqigdUTw7Liesx2XMsc o6SHk9TlJW+jeJgTtuDG0TdgZ0q4bFBuVPIJbf80ie6ny55hgLmXTc7muwHNwnuvslwU gWN86kYhm0Qn6H7XmjcRHJIMu41kLI/js8h8rvBu9Ot0VWWHZNimWCMl08LysHAememj Si3g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ls5MoaMq; 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 i8si7324705edr.271.2020.12.18.17.18.32; Fri, 18 Dec 2020 17:18:55 -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=@linaro.org header.s=google header.b=ls5MoaMq; 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 S1726171AbgLSBRv (ORCPT + 99 others); Fri, 18 Dec 2020 20:17:51 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46532 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725879AbgLSBRv (ORCPT ); Fri, 18 Dec 2020 20:17:51 -0500 Received: from mail-lf1-x129.google.com (mail-lf1-x129.google.com [IPv6:2a00:1450:4864:20::129]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BCE49C0617B0 for ; Fri, 18 Dec 2020 17:17:10 -0800 (PST) Received: by mail-lf1-x129.google.com with SMTP id m25so10064211lfc.11 for ; Fri, 18 Dec 2020 17:17:10 -0800 (PST) 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; bh=kqfzYZjd8v2qCtr+CwGBLV3Vs/0PzggZH8o2lrmVRy4=; b=ls5MoaMqVOyX5M6LeJ7eYoWXDLcSL2zNpvZdCh8SldBLA67re9nR3vHyOr9Kk845sS EL3Ta6jkQM+r9MiA76QGqXSQN9M8bA1OAzpN4vxrPndmuVcBUIDqzCLU7Ehrxhy/qkJ8 lSr9P+WugopXsX7cQ6F0rx08k2CPzs0XNLdixfRVDsPviFrVwtFzuKu+r8QAMqrSxkGl yaZZDujJhyMeX5FDAax0n1odd8tQAmYwOy9ca8sfIeuoQdSrqYzTHZEik8Lcu8D3+SHT QB8WMkr44X6wnzsjCZgUeNp17FOX/Ftfku/Ea+p9go1GbGHfSlfrj7dub0jmJpY2g/1A 5hzA== 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; bh=kqfzYZjd8v2qCtr+CwGBLV3Vs/0PzggZH8o2lrmVRy4=; b=tv9zFiTaIHFW0nf4NF6maD7Dy4C9kjA+HJ/85V4FxO6QSeSbTmjCeh7kfPq+kxo7b7 PcuPl4J7kXbpUk5O5eTz6M8jQ3DW5jyE0omdp2lzpEHXnUxLNz6q1u+7B1rp6zsdwk5O b9x6Cs7V4SaLLLIJoG1E/o3whG7ImfrimqGZLT3pRf09n1pXJEzp5t0Zb8oz1SOv7kWi XrTBpUsK/5fzZnA3c/vzoyH1O/tJS5eldNfpGs1W6inus8IK6SNnvTvtmbhhJDDqInvP rw9Gnq6jziSbbPD7cqPQJIC6HsASe5GQpLz1LRMmD++AgD7ADf1Jx5+FDFPDg7pEc99D RtOg== X-Gm-Message-State: AOAM532ORjvyOp6Ayy/RLICAPQp6L4YIU2yKEmJ4r/Zr7YwNqUp45w3+ r8DfYoGt54MyoLNq9rBMZ79NdXo27p1OqzhRIJQYsA== X-Received: by 2002:a05:6512:6c3:: with SMTP id u3mr2309354lff.204.1608340629119; Fri, 18 Dec 2020 17:17:09 -0800 (PST) MIME-Version: 1.0 References: <20201217230612.32397-1-john.stultz@linaro.org> <20201217230612.32397-2-john.stultz@linaro.org> In-Reply-To: From: John Stultz Date: Fri, 18 Dec 2020 17:16:56 -0800 Message-ID: Subject: Re: [RFC][PATCH 2/3] dma-buf: system_heap: Add pagepool support to system heap To: John Stultz , lkml , Sandeep Patil , dri-devel , Ezequiel Garcia , Robin Murphy , James Jones , Liam Mark , Laura Abbott , Chris Goldsworthy , Hridya Valsaraju , =?UTF-8?Q?=C3=98rjan_Eide?= , linux-media , Suren Baghdasaryan , Daniel Mentz Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Dec 18, 2020 at 6:36 AM Daniel Vetter wrote: > On Thu, Dec 17, 2020 at 11:06:11PM +0000, John Stultz wrote: > > Reuse/abuse the pagepool code from the network code to speed > > up allocation performance. > > > > This is similar to the ION pagepool usage, but tries to > > utilize generic code instead of a custom implementation. > > We also have one of these in ttm. I think we should have at most one of > these for the gpu ecosystem overall, maybe as a helper that can be plugged > into all the places. > > Or I'm kinda missing something, which could be since I only glanced at > yours for a bit. But it's also called page pool for buffer allocations, > and I don't think there's that many ways to implement that really :-) Yea, when I was looking around the ttm one didn't seem quite as generic as the networking one, which more easily fit in here. The main benefit for the system heap is not so much the pool itself (the normal page allocator is pretty good), as it being able to defer the free and zero the pages in a background thread, so the pool is effectively filled with pre-zeroed pages. But I'll take another look at the ttm implementation and see if it can be re-used or the shared code refactored and pulled out somehow. thanks -john