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 B8042C07E9C for ; Wed, 7 Jul 2021 19:35:38 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 4CD6C61CC1 for ; Wed, 7 Jul 2021 19:35:38 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4CD6C61CC1 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 0105F6B0011; Wed, 7 Jul 2021 15:35:38 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id EDC206B005D; Wed, 7 Jul 2021 15:35:37 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id D2E3F6B006C; Wed, 7 Jul 2021 15:35:37 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0154.hostedemail.com [216.40.44.154]) by kanga.kvack.org (Postfix) with ESMTP id A73186B0011 for ; Wed, 7 Jul 2021 15:35:37 -0400 (EDT) Received: from smtpin22.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 0EA6C181D5503 for ; Wed, 7 Jul 2021 19:35:37 +0000 (UTC) X-FDA: 78336796314.22.41CC0DD Received: from mail-lf1-f43.google.com (mail-lf1-f43.google.com [209.85.167.43]) by imf17.hostedemail.com (Postfix) with ESMTP id 7692BF002C82 for ; Wed, 7 Jul 2021 19:35:36 +0000 (UTC) Received: by mail-lf1-f43.google.com with SMTP id r26so7066818lfp.2 for ; Wed, 07 Jul 2021 12:35:36 -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=8r2Sihww/r2eDq532jyXn6fdk4Gdh3BwgDNIfLgaV/E=; b=MszDYgh+2NKqhOHbW6T5LEDSW9GergXNfLJILyRlimCcLRDhvW35rAjdXYDUOohkVo wHdpvCXENIyxge/RR1xi+LcJozdm2KYSM6ty7uAy2OpcI06vVjK12HCKxqbEndRHk9Cb TyANaMtKc4b6zf+KsQEe8ku5flehh9j9ipk0jUaKUQeixBjw+ghFN2nGBgUAoSXGVVb2 CAoq/zr7DNXYTeimJi4DXHo1zfyu3X1Kk3MwEbq+p+GDEsObLp2GImtWTJWiuPHkHTgo cU34/ShPKF6Rem9Fo1O4//yhd3uepwZYFdVbHvlE2UK2DWipfOsqxfPEw9toHb8HxW6H 0kZQ== 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=8r2Sihww/r2eDq532jyXn6fdk4Gdh3BwgDNIfLgaV/E=; b=TfRi6ngDxKCCPfD5Rr283uKifSYkLFztHvnfA/moYWMpZq0tIyBDuxEb0ommd66Dbz At7/1M+dFq4MRt2qY6tOUG27PjDUdWpvhCAn4UId76PNKdy2hRMuriwPx6l8swFRhT0w bzp3nK2OwmOgx6mRKJts+ej1HIerUzaQkpzoNeJhmvjlfFtTMi0swouoGMxV2WSc4tX/ 6L4z53xgWqiJrqoJ362ahjoKQkZbzSpj9cpiNgU04yAZDRuKHleNhv5y9Fg1W0k5bE8h 3O+qSvfGCNBrLG8+z5V+q1TBDeIQbJ1P5F01rkCcviruyaBN9iIZDNoFB5/QCpvcQmWf 7wFA== X-Gm-Message-State: AOAM531rcY57OmhQdnFw8D8rVK1lkL2LA/qhymZo0TRZfs8UsoGKkAfn x/tUHUWgT4mbuUaIs9EsI23KLhgNtuI2kGgdk2XkWA== X-Google-Smtp-Source: ABdhPJzq0vYBbcbRJcpJ1wm18X49R0cZKa1F2pwLnWsMpB+SU+peQArLpyP1JAM9LeGI4+7Rz1ZU9cgjkoNN3RCUOQg= X-Received: by 2002:a05:6512:2246:: with SMTP id i6mr11859231lfu.7.1625686534805; Wed, 07 Jul 2021 12:35:34 -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:35:23 -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: lkml , Daniel Vetter , 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 , linux-media , dri-devel , Mel Gorman , linux-mm Content-Type: text/plain; charset="UTF-8" Authentication-Results: imf17.hostedemail.com; dkim=pass header.d=linaro.org header.s=google header.b=MszDYgh+; spf=pass (imf17.hostedemail.com: domain of john.stultz@linaro.org designates 209.85.167.43 as permitted sender) smtp.mailfrom=john.stultz@linaro.org; dmarc=pass (policy=none) header.from=linaro.org X-Rspamd-Server: rspam05 X-Stat-Signature: p8n3jo31gtr9qkd9w45u9gdqcz7txd51 X-Rspamd-Queue-Id: 7692BF002C82 X-Rspam-User: nil X-HE-Tag: 1625686536-94321 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 Tue, Jul 6, 2021 at 11:38 PM Christoph Hellwig wrote: > On Wed, Jun 30, 2021 at 01:34:17AM +0000, John Stultz wrote: > > This adds a shrinker controlled page pool, extracted > > out of the ttm_pool logic, and abstracted out a bit > > so it can be used by other non-ttm drivers. > > Can you explain in detail why you need a differnt page pool over the one > maintained by the page allocator? Fragmenting the memory into all kinds > of pools has lots of downsides, so the upsides need to be explained in > detail. So, as Christian mentioned, on the TTM side it's useful, as they are trying to avoid TLB flushes when changing caching attributes. For the dmabuf system heap purposes, the main benefit is moving the page zeroing to the free path, rather than the allocation path. This on its own doesn't save much, but allows us to defer frees (and thus the zeroing) to the background, which can get that work out of the hot path. thanks -john