All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Christian König" <christian.koenig@amd.com>
To: "Tvrtko Ursulin" <tvrtko.ursulin@igalia.com>,
	"Maíra Canal" <mcanal@igalia.com>,
	"Melissa Wen" <mwen@igalia.com>, "Iago Toral" <itoral@igalia.com>,
	"Maarten Lankhorst" <maarten.lankhorst@linux.intel.com>,
	"Maxime Ripard" <mripard@kernel.org>,
	"Thomas Zimmermann" <tzimmermann@suse.de>,
	"David Airlie" <airlied@gmail.com>,
	"Daniel Vetter" <daniel@ffwll.ch>
Cc: dri-devel@lists.freedesktop.org, kernel-dev@igalia.com,
	"Russell King" <linux@armlinux.org.uk>,
	"Lucas Stach" <l.stach@pengutronix.de>,
	"Christian Gmeiner" <christian.gmeiner@gmail.com>,
	"Inki Dae" <inki.dae@samsung.com>,
	"Seung-Woo Kim" <sw0312.kim@samsung.com>,
	"Kyungmin Park" <kyungmin.park@samsung.com>,
	"Krzysztof Kozlowski" <krzysztof.kozlowski@linaro.org>,
	"Alim Akhtar" <alim.akhtar@samsung.com>,
	"Patrik Jakobsson" <patrik.r.jakobsson@gmail.com>,
	"Sui Jingfeng" <suijingfeng@loongson.cn>,
	"Chun-Kuang Hu" <chunkuang.hu@kernel.org>,
	"Philipp Zabel" <p.zabel@pengutronix.de>,
	"Matthias Brugger" <matthias.bgg@gmail.com>,
	"AngeloGioacchino Del Regno"
	<angelogioacchino.delregno@collabora.com>,
	"Rob Clark" <robdclark@gmail.com>,
	"Abhinav Kumar" <quic_abhinavk@quicinc.com>,
	"Dmitry Baryshkov" <dmitry.baryshkov@linaro.org>,
	"Sean Paul" <sean@poorly.run>,
	"Marijn Suijten" <marijn.suijten@somainline.org>,
	"Karol Herbst" <kherbst@redhat.com>,
	"Lyude Paul" <lyude@redhat.com>,
	"Danilo Krummrich" <dakr@redhat.com>,
	"Tomi Valkeinen" <tomi.valkeinen@ideasonboard.com>,
	"Gerd Hoffmann" <kraxel@redhat.com>,
	"Sandy Huang" <hjc@rock-chips.com>,
	"Heiko Stübner" <heiko@sntech.de>,
	"Andy Yan" <andy.yan@rock-chips.com>,
	"Thierry Reding" <thierry.reding@gmail.com>,
	"Mikko Perttunen" <mperttunen@nvidia.com>,
	"Jonathan Hunter" <jonathanh@nvidia.com>,
	"Huang Rui" <ray.huang@amd.com>,
	"Oleksandr Andrushchenko" <oleksandr_andrushchenko@epam.com>,
	"Karolina Stolarek" <karolina.stolarek@intel.com>,
	"Andi Shyti" <andi.shyti@linux.intel.com>
Subject: Re: [PATCH 2/5] drm/gem: Add a mountpoint parameter to drm_gem_object_init()
Date: Tue, 12 Mar 2024 11:37:30 +0100	[thread overview]
Message-ID: <69576e6d-9704-42b9-905f-289f9f9017b9@amd.com> (raw)
In-Reply-To: <e8165baa-9ded-4149-aaa6-6713d112b621@igalia.com>

Am 12.03.24 um 11:31 schrieb Tvrtko Ursulin:
>
> On 12/03/2024 10:23, Christian König wrote:
>> Am 12.03.24 um 10:30 schrieb Tvrtko Ursulin:
>>>
>>> On 12/03/2024 08:59, Christian König wrote:
>>>> Am 12.03.24 um 09:51 schrieb Tvrtko Ursulin:
>>>>>
>>>>> Hi Maira,
>>>>>
>>>>> On 11/03/2024 10:05, Maíra Canal wrote:
>>>>>> For some applications, such as using huge pages, we might want to 
>>>>>> have a
>>>>>> different mountpoint, for which we pass in mount flags that 
>>>>>> better match
>>>>>> our usecase.
>>>>>>
>>>>>> Therefore, add a new parameter to drm_gem_object_init() that 
>>>>>> allow us to
>>>>>> define the tmpfs mountpoint where the GEM object will be created. If
>>>>>> this parameter is NULL, then we fallback to shmem_file_setup().
>>>>>
>>>>> One strategy for reducing churn, and so the number of drivers this 
>>>>> patch touches, could be to add a lower level drm_gem_object_init() 
>>>>> (which takes vfsmount, call it __drm_gem_object_init(), or 
>>>>> drm__gem_object_init_mnt(), and make drm_gem_object_init() call 
>>>>> that one with a NULL argument.
>>>>
>>>> I would even go a step further into the other direction. The shmem 
>>>> backed GEM object is just some special handling as far as I can see.
>>>>
>>>> So I would rather suggest to rename all drm_gem_* function which 
>>>> only deal with the shmem backed GEM object into drm_gem_shmem_*.
>>>
>>> That makes sense although it would be very churny. I at least would 
>>> be on the fence regarding the cost vs benefit.
>>
>> Yeah, it should clearly not be part of this patch here.
>>
>>>
>>>> Also the explanation why a different mount point helps with 
>>>> something isn't very satisfying.
>>>
>>> Not satisfying as you think it is not detailed enough to say driver 
>>> wants to use huge pages for performance? Or not satisying as you 
>>> question why huge pages would help?
>>
>> That huge pages are beneficial is clear to me, but I'm missing the 
>> connection why a different mount point helps with using huge pages.
>
> Ah right, same as in i915, one needs to mount a tmpfs instance passing 
> huge=within_size or huge=always option. Default is 'never', see man 5 
> tmpfs.

Thanks for the explanation, I wasn't aware of that.

Mhm, shouldn't we always use huge pages? Is there a reason for a DRM 
device to not use huge pages with the shmem backend?

I mean it would make this patch here even smaller.

Regards,
Christian.

>
>
> Regards,
>
> Tvrtko


  reply	other threads:[~2024-03-12 10:37 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-11 10:05 [PATCH 0/5] drm/v3d: Enable Super Pages Maíra Canal
2024-03-11 10:05 ` [PATCH 1/5] drm/v3d: Fix return if scheduler initialization fails Maíra Canal
2024-03-12  8:35   ` Iago Toral
2024-03-11 10:05 ` [PATCH 2/5] drm/gem: Add a mountpoint parameter to drm_gem_object_init() Maíra Canal
2024-03-12  8:51   ` Tvrtko Ursulin
2024-03-12  8:59     ` Christian König
2024-03-12  9:30       ` Tvrtko Ursulin
2024-03-12 10:23         ` Christian König
2024-03-12 10:31           ` Tvrtko Ursulin
2024-03-12 10:37             ` Christian König [this message]
2024-03-12 13:09               ` Tvrtko Ursulin
2024-03-12 13:48                 ` Christian König
2024-03-18 12:42                   ` Maíra Canal
2024-03-18 13:10                     ` Christian König
2024-03-18 13:28                       ` Maíra Canal
2024-03-18 14:01                         ` Maíra Canal
2024-03-18 14:04                         ` Christian König
2024-03-18 14:24                           ` Maíra Canal
2024-03-18 15:05                             ` Christian König
2024-03-18 15:27                               ` Tvrtko Ursulin
2024-03-11 10:06 ` [PATCH 3/5] drm/v3d: Introduce gemfs Maíra Canal
2024-03-12  8:35   ` Iago Toral
2024-03-12  8:55   ` Tvrtko Ursulin
2024-03-11 10:06 ` [PATCH 4/5] drm/gem: Create shmem GEM object in a given mountpoint Maíra Canal
2024-03-11 10:06 ` [PATCH 5/5] drm/v3d: Enable super pages Maíra Canal
2024-03-12  8:34   ` Iago Toral
2024-03-12 13:41   ` Tvrtko Ursulin
2024-03-12  8:37 ` [PATCH 0/5] drm/v3d: Enable Super Pages Iago Toral

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=69576e6d-9704-42b9-905f-289f9f9017b9@amd.com \
    --to=christian.koenig@amd.com \
    --cc=airlied@gmail.com \
    --cc=alim.akhtar@samsung.com \
    --cc=andi.shyti@linux.intel.com \
    --cc=andy.yan@rock-chips.com \
    --cc=angelogioacchino.delregno@collabora.com \
    --cc=christian.gmeiner@gmail.com \
    --cc=chunkuang.hu@kernel.org \
    --cc=dakr@redhat.com \
    --cc=daniel@ffwll.ch \
    --cc=dmitry.baryshkov@linaro.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=heiko@sntech.de \
    --cc=hjc@rock-chips.com \
    --cc=inki.dae@samsung.com \
    --cc=itoral@igalia.com \
    --cc=jonathanh@nvidia.com \
    --cc=karolina.stolarek@intel.com \
    --cc=kernel-dev@igalia.com \
    --cc=kherbst@redhat.com \
    --cc=kraxel@redhat.com \
    --cc=krzysztof.kozlowski@linaro.org \
    --cc=kyungmin.park@samsung.com \
    --cc=l.stach@pengutronix.de \
    --cc=linux@armlinux.org.uk \
    --cc=lyude@redhat.com \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=marijn.suijten@somainline.org \
    --cc=matthias.bgg@gmail.com \
    --cc=mcanal@igalia.com \
    --cc=mperttunen@nvidia.com \
    --cc=mripard@kernel.org \
    --cc=mwen@igalia.com \
    --cc=oleksandr_andrushchenko@epam.com \
    --cc=p.zabel@pengutronix.de \
    --cc=patrik.r.jakobsson@gmail.com \
    --cc=quic_abhinavk@quicinc.com \
    --cc=ray.huang@amd.com \
    --cc=robdclark@gmail.com \
    --cc=sean@poorly.run \
    --cc=suijingfeng@loongson.cn \
    --cc=sw0312.kim@samsung.com \
    --cc=thierry.reding@gmail.com \
    --cc=tomi.valkeinen@ideasonboard.com \
    --cc=tvrtko.ursulin@igalia.com \
    --cc=tzimmermann@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.