From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 05DBFC07E95 for ; Wed, 7 Jul 2021 19:43:01 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id A1E9D61CBE for ; Wed, 7 Jul 2021 19:43:00 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A1E9D61CBE Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 29D706B0011; Wed, 7 Jul 2021 15:43:00 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 226D86B005D; Wed, 7 Jul 2021 15:43:00 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 078FE6B006C; Wed, 7 Jul 2021 15:42:59 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0084.hostedemail.com [216.40.44.84]) by kanga.kvack.org (Postfix) with ESMTP id D0F926B0011 for ; Wed, 7 Jul 2021 15:42:59 -0400 (EDT) Received: from smtpin25.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 3496E1837DCA3 for ; Wed, 7 Jul 2021 19:42:59 +0000 (UTC) X-FDA: 78336814878.25.11C83EC Received: from mail-lf1-f47.google.com (mail-lf1-f47.google.com [209.85.167.47]) by imf18.hostedemail.com (Postfix) with ESMTP id B084A400208A for ; Wed, 7 Jul 2021 19:42:52 +0000 (UTC) Received: by mail-lf1-f47.google.com with SMTP id p1so7051205lfr.12 for ; Wed, 07 Jul 2021 12:42:52 -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; bh=LRtFQfyk5rkHzCvBDJ7m/53ib3pszFLVwjo8wznH6UE=; b=yFcO6aCHT5Wp8XcHLs3x7QjI1v+tekgMJbmj6pPFaNrWmUZ3yjUxexHb2wvivrLnvk wpPtu8QUxvDBn0Z7SDU7DAa/e8ONb2256TAahLeb4MKewzgad9koVgCZx/tc9KSYH8Nk MkMQmMz/XSiGUA513D3Y2WGA7AY6rnls41T6Neg+NDC2MyS5DPdVLd+letBRoFYEz5Vy XFdsxz/8jbYQwq88kH3vktlGJdUyOxN5GUjfgp9sXS9tdux2jP8qSeBbCa+7nhGIfXzW xW3bjO1Su9ioQZNguLLj3A4OlCZGjhI9jOoxP0iPSTjeO0IWgWxPafFneFHgMuxtuEMJ nsnA== 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; bh=LRtFQfyk5rkHzCvBDJ7m/53ib3pszFLVwjo8wznH6UE=; b=P/SWZ0Jx6AnzBZFUEKNHrnQTp4CcMYFHoso1zoqY8xiZoOlMBVzRzJKG5Knrb8qspJ TzyPSKN3xTsStw79x5vcLQY2xNoBF7Rnp07dk44rGumPiwtUrdY9IznuzET6j8+2LLaj x49aZH3991T3jtkQXAuXmoA/wiA5VbYVopqALnPgchptbq4U7d0BhPuqTKn63IlxqUfC rui1kTbm1gG52yH36kYQArDs8OiaEClakpCRkVP66Kg9tkhKJtcfvaD5Agvwns/hXclk uEN1viotVGaASvMQZj30FpLlPur0q1rLICZRUQ+zKSTFxNGnWwibjSLdbXAH5dlqjQSD 2LOw== X-Gm-Message-State: AOAM532AE0loI/SKyxqP4Za4JdkjN83okJGayjYIMSGc8uy/yAdTjhlc aFlS15YbMt7tVcwXaWTlCUBzWufjY4ZCfkoKM7bYrw== X-Google-Smtp-Source: ABdhPJwxhl4aUAm4oVA+H8xrPvcXq5kElGbA8grQFD3N2KD69Hh/pYn0WdVnS32vEA1aPDwawe5JdRzQHP5s+cnOh2Y= X-Received: by 2002:a05:651c:102c:: with SMTP id w12mr10051224ljm.170.1625686971167; Wed, 07 Jul 2021 12:42:51 -0700 (PDT) MIME-Version: 1.0 References: <20210630013421.735092-1-john.stultz@linaro.org> <20210630013421.735092-2-john.stultz@linaro.org> In-Reply-To: From: John Stultz Date: Wed, 7 Jul 2021 12:42:40 -0700 Message-ID: Subject: Re: page pools, was Re: [PATCH v9 1/5] drm: Add a sharable drm page-pool implementation To: Christoph Hellwig Cc: "Christian K??nig" , lkml , Daniel Vetter , 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 , linux-media , dri-devel , Mel Gorman , linux-mm Content-Type: text/plain; charset="UTF-8" Authentication-Results: imf18.hostedemail.com; dkim=pass header.d=linaro.org header.s=google header.b=yFcO6aCH; dmarc=pass (policy=none) header.from=linaro.org; spf=pass (imf18.hostedemail.com: domain of john.stultz@linaro.org designates 209.85.167.47 as permitted sender) smtp.mailfrom=john.stultz@linaro.org X-Rspamd-Server: rspam02 X-Rspam-User: nil X-Rspamd-Queue-Id: B084A400208A X-Stat-Signature: 3irpq1rp86e1tyxeiffagcuw1gz5merr X-HE-Tag: 1625686972-720691 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Wed, Jul 7, 2021 at 12:15 AM Christoph Hellwig wrote: > > On Wed, Jul 07, 2021 at 09:10:26AM +0200, Christian K??nig wrote: > > Well, the original code all this is based on already had the comment that > > this really belong into the page allocator. > > > > The key point is traditionally only GPUs used uncached and write-combined > > memory in such large quantities that having a pool for them makes sense. > > > > Because of this we had this separately to reduce the complexity in the page > > allocator to handle another set of complexity of allocation types. > > > > For the upside, for those use cases it means huge performance improvements > > for those drivers. See the numbers John provided in the cover letter. > > > > But essentially at least I would be totally fine moving this into the page > > allocator, but moving it outside of TTM already helps with this goal. So > > this patch set is certainly a step into the right direction. > > Unless I'm badly misreading the patch and this series there is nothing > about cache attributes in this code. It just allocates pages, zeroes > them, eventually hands them out to a consumer and registers a shrinker > for its freelist. > > If OTOH it actually dealt with cachability that should be documented > in the commit log and probably also the naming of the implementation. So the cache attributes are still managed in the tmm_pool code. This series just pulls the pool/shrinker management out into common code so we can use it in the dmabuf heap code without duplicating things. thanks -john