Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp5868341pxv; Wed, 7 Jul 2021 13:42:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz6U2L0ld/NslYTva+GtQcXAHD25yKFdX7AkV4tp9TG3y5uouqB7tRq4oBkHs/QQWGt083j X-Received: by 2002:a02:c7c4:: with SMTP id s4mr23009035jao.82.1625690552545; Wed, 07 Jul 2021 13:42:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625690552; cv=none; d=google.com; s=arc-20160816; b=QgD0H9X6LMBa7Z/FYUjXQSCYMh41uDWgGGUZOmkkZN4pzfjFhQGXkGNgRf5PV9wnKX iFyFXmxEp+s8H8GjuQFsVhTD0XiHx+g8K5vVMwHfhEmDpb54X4y8QXDxcic1nKtfc0tE tNdVNsgxrlLmyjt2Rm7J00kXAgqYLOJkrhzv95Qx7ETB36X18fDA0CAxSX8qxAhZIl1k 4CW7gJw46FLDV7g4Ga4LDT0aPIrDmNWBF9KEm2d4T6cPi2NyRzgIg1BQ7VnrWdVhZG6A UBvhzEgiULjSBDgSzMr1nf7HSzjeJ+Xhrj7jnO/GjHMwkEYFSvPao52NvTwav1Xw6Ydv f2xg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=8r2Sihww/r2eDq532jyXn6fdk4Gdh3BwgDNIfLgaV/E=; b=ZkEK2RNhzv78Kup1z+onhFDrE1jpmOS4iLJDYMaqT1Q1oByYycjlYKpfBuWDYEvZFE X27GMpLeAZtoVVH5Uu9IEZJjn9xxbQsagpTt3f0tsIvOHL8/O9gJjQaGhfyjtP9E6r2+ k2BxenWD+1GBc5xJkkExZCptc7k26nWzU3cUMPrwwwp3cwLueIoKG2MTGFB3WkS+8Whq rvCBQyMSnd/qwiCEA46kKHS2xJI3jeb6fVYvKg0QYmKQ8mwjM4ButSvU8z59xEFzd2CV qYpErlkzqgfvKMyomNaqOrtIDC0SKkyEc4VfDJDxQfmnJDtdDwkTktM9MQg5O4njFwI3 aRPA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=MszDYgh+; 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 d14si10342855iow.80.2021.07.07.13.42.20; Wed, 07 Jul 2021 13:42:32 -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=MszDYgh+; 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 S232113AbhGGTiS (ORCPT + 99 others); Wed, 7 Jul 2021 15:38:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53418 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229519AbhGGTiR (ORCPT ); Wed, 7 Jul 2021 15:38:17 -0400 Received: from mail-lf1-x12e.google.com (mail-lf1-x12e.google.com [IPv6:2a00:1450:4864:20::12e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8729AC06175F for ; Wed, 7 Jul 2021 12:35:36 -0700 (PDT) Received: by mail-lf1-x12e.google.com with SMTP id n14so7015637lfu.8 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=Q8h7DSDHamNNGw7jRQkvfIfySEBEDSLa08R+sc5qYwBTcfMEI/xgje3h9rRKqpqfra 85/TV3uFofsgnvAV1yXzoo3hwtlCnuCS6eNTapKxy0Emu6EIp62ZUML5SwrmN+7WPrCQ oradR84UAd1kHY8My24j5KTBnHgYUgGqk9PQ8HcQAOeFVvObLhZqJbigcPJoEN9hI20r 0BlMgv8g/B25xZmlbV70OM10GC8ODp9yQRoC4A6/Au/npwECJ7OH29qNcAD12LFRttOR VcOnZ18ArknxwoPHcSglVpX/Lk0yHydgk6tBuIiv9+GUw/zh8SXGoCjiCMYrzbgPjE9U Xhhg== X-Gm-Message-State: AOAM532hq5dZB/8x+RHwd1OpnGIXzEpu5DYJrPG5qDiUAu0HI6HZBkYS O6sw/MBcI0l1v9rcN7N+c3P/sa4wCN4XsRyJ2kaA4Q== 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" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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