Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp683659pxb; Tue, 9 Feb 2021 09:47:49 -0800 (PST) X-Google-Smtp-Source: ABdhPJwNGKLyeGUezDKja2tGH5HsiTbhN36qDE/xOeP8pKuKSIfKNcc8YJTUeYPanWxNEwM6mRSY X-Received: by 2002:a17:906:3444:: with SMTP id d4mr18780552ejb.410.1612892868885; Tue, 09 Feb 2021 09:47:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612892868; cv=none; d=google.com; s=arc-20160816; b=lsp2VDWPUcBp09I8Bz14qsXOnKKGJZOFgKyqh3eC5onAY6LUFvr5ZPTqCBo4k3NSlK 9I54no1iaa5k4IA+9vTCjHfORnR1OWkqtDEbBnR41xfLRi/OwbG3xMqjYVREC4gGVDZI ZJj15mq1ZiKm9j5ODfWFZrsNl2B5F4DypfbvCvCEKwdjTghfkz40Vm3vQwvoiahx+366 ZMCgHnEt/2nqWX2YjxExm32HHU9cIlPaLA4K23upg4Ypg5P1ydCdfpqYR52sAuXY328w 7cTkHTI3iZycVwpZ2EAjDf8gG2L7dMonPb/JmLivsSuT4l8dYD+BLDiJMhw5lcRQ2Pob 51nQ== 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=RkQ9vh4yHUNqVTEH9lJ/reKjXo3DF861DsD0QmnSzao=; b=l5Sd5UwNYQ4L9FQAinygdoIgbagaFrUZkvZ1QJ5i9T+h3V+fryqUYCpRlrhulem/+0 xad3mmcIeIDY29/LEHnVq5Q5BT+cL4QhMF9Jq2RT0kYC1y4ptQLEFf4Zi6hbUbeu59Jm oP9IXOHBipkIT0A26Nq7q0Dwl9jwEhpoePwsAX8qjx8ItYkJCb9bn3E/3Ws7p9BDBSSD UEGWBvwzVMREc/GBTvb2uSYLPQkArZbYh2hmQYAPc6m8ALtqoic4PEecBHv12WJCwvTR +BPGEaVnu/kC+L/BJMTBeLYnU29L6lSfcu2KDYjB8Ot02YW93Y9JGjZiHiHA6kdQUah/ lwCQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=N7llKSi9; 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 dr8si11443870ejc.138.2021.02.09.09.47.24; Tue, 09 Feb 2021 09:47:48 -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=N7llKSi9; 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 S233284AbhBIRlV (ORCPT + 99 others); Tue, 9 Feb 2021 12:41:21 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54532 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233322AbhBIRk1 (ORCPT ); Tue, 9 Feb 2021 12:40:27 -0500 Received: from mail-lf1-x12d.google.com (mail-lf1-x12d.google.com [IPv6:2a00:1450:4864:20::12d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 496ECC061756 for ; Tue, 9 Feb 2021 09:39:47 -0800 (PST) Received: by mail-lf1-x12d.google.com with SMTP id p21so29598826lfu.11 for ; Tue, 09 Feb 2021 09:39:47 -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 :cc:content-transfer-encoding; bh=RkQ9vh4yHUNqVTEH9lJ/reKjXo3DF861DsD0QmnSzao=; b=N7llKSi9PpveMhdKx9xFWCvBHfHBAEZF2BNttLhfhzwUAdD4W9ReMGo73szZaANrKl VcnbJBIFTnpQJgDor/Od67/25QCDuIiZxkwbDVkQowxGCk65fCPdLuhz1RQfNgFYUHiq olCZzFff5vrRI5lmdsAgq7azbkEU5MjZ9MRmqu6uGbX4bF2leAoJf0YkRFQmq+H1JbCu PSZwQADyTLn6WNsuifyYk256YVp1/VtEkqN7/LHzaYayGGCSMElb6bwh2aDwIzWaRwCG NVO5zzMJzunaFugHouKNsVDFDmlAD4Q/BDXv8xdRFndRX6nX698viwIk2ZfuK0qWgrp0 IpFQ== 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=RkQ9vh4yHUNqVTEH9lJ/reKjXo3DF861DsD0QmnSzao=; b=l1U+0UAWs7gPwY/n75NNfxEa2cwgXTvnMPmDYugKMbSPQ47vpI/X973wgp0/2xhL8k dRgy90bf5Z7Uur7d+fiskHwPTsgLDIklnskD0+LbY7F61/HUkRen13tLeCPkRfKedi1R WgYYNsQBqkX5PCilCPh8Ub8WhymMJSiSgvng2GJgE1HEinyI6Wd+aAVoF4Ys1pgbgo9U DODCduGvcViLEBna7+1HtWci8VD9VDvgOd6miBZ3AlVk6j2wUuHslXcyZrp9kWVVOhpG eaaBrtT113J9rRSE7l1AG7eGRDlp7oZhrNVhuipBhjZgC1cuofjDZxc4DpHoPJgKT1Wz 1vMQ== X-Gm-Message-State: AOAM532yT32MVXIUVpK6kqG9sdvujuo7qBPQfnKYtPpGPlM5Um1S2kmN h2HQIUXLpqtyQ2IfFrUv8LOOanJk6/DYIqtpRelhow== X-Received: by 2002:a05:6512:11f2:: with SMTP id p18mr4450601lfs.535.1612892385826; Tue, 09 Feb 2021 09:39:45 -0800 (PST) MIME-Version: 1.0 References: <20210205080621.3102035-1-john.stultz@linaro.org> <20210205080621.3102035-4-john.stultz@linaro.org> <8a4cacb7-3042-53c7-02fe-de18cc49fc0e@amd.com> <884a5f8f-00e2-5aa6-6dfb-67e86c89e599@amd.com> In-Reply-To: <884a5f8f-00e2-5aa6-6dfb-67e86c89e599@amd.com> From: John Stultz Date: Tue, 9 Feb 2021 09:39:33 -0800 Message-ID: Subject: Re: [RFC][PATCH v6 3/7] drm: ttm_pool: Rework ttm_pool_free_page to allow us to use it as a function pointer To: =?UTF-8?Q?Christian_K=C3=B6nig?= Cc: lkml , Daniel Vetter , Sumit Semwal , Liam Mark , Chris Goldsworthy , Laura Abbott , Brian Starkey , Hridya Valsaraju , Suren Baghdasaryan , Sandeep Patil , Daniel Mentz , =?UTF-8?Q?=C3=98rjan_Eide?= , Robin Murphy , Ezequiel Garcia , Simon Ser , James Jones , linux-media , dri-devel 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 Tue, Feb 9, 2021 at 4:14 AM Christian K=C3=B6nig wrote: > Am 05.02.21 um 20:47 schrieb John Stultz: > > On Fri, Feb 5, 2021 at 12:28 AM Christian K=C3=B6nig > > wrote: > >> Adding this to all pages would increase the memory footprint drastical= ly. > > Yea, that's a good point! Hrm... bummer. I'll have to see if there's > > some other way I can get the needed context for the free from the > > generic page-pool side. > > What exactly is the problem here? Me, usually. :) > As far as I can see we just have the > lru entry (list_head) and the pool. Yea, I reworked it to an embedded drm_page_pool struct, but that is mostly a list_head. > How the lru is cast to the page can be completely pool implementation > specific. Yea, I had it do container_of(), just haven't gotten around to sending it out yet. Thanks so much for the feedback and ideas! thanks -john